Questions tagged [smart-contracts]
The smart-contracts tag has no usage guidance.
71
questions with no upvoted or accepted answers
5
votes
0
answers
81
views
"Unhandled error: Failure backtracked" while trying to creating a contract
I'm trying to work with the example code from the liquidity documentation for Contract.create(). The code compiles and tests on the online-editor properly. It also deploys using the editor. But when I ...
4
votes
0
answers
32
views
Checking contract against contract type in Liquidity
With the example below, is it possible to get liquidity to check that the type of the contract C matches C_intf?
contract type C_intf = sig
type storage
val%entry check_balance : nat -> _
end
...
4
votes
0
answers
37
views
How to split a string in Liquidity?
I'm attempting to split apart a string by "." so that "my.name" returns {"my", "name"}. However, I can't seem to find an in-built method of performing this operation in Liquidity.
Lately, I've tried ...
4
votes
1
answer
114
views
How to implement a signature checker for the signature scheme BLS?
We are willing to implement a signature checker for the signature scheme BLS (or BLS12-381). To the best of our knowledge, it may not be too painful since the smart contract language already supports ...
4
votes
0
answers
48
views
getting off chain data on chain to smart contracts
Currently 80+% of smart contracts need off chain data, is there a solution to bring off chain data on chain to trigger for smart contracts? (oracles related)
4
votes
0
answers
29
views
Michelson_v1_printer.unparse error with originate contract
I am trying to use tezos client to deploy contract on alphanet but I get error
Michelson_v1_printer.unparse
Command:
tezos-client -l -A $TEZOS_NODE originate contract controller_v6 for $MANAGER ...
3
votes
1
answer
79
views
Securely moving from Ghostnet to Mainnet
Are there any important things to do or check before moving a dApp from Ghostnet to Mainnet?
3
votes
0
answers
36
views
In sandbox mode, can you bake a block with a specific timestamp?
I am testing a smart contract that enforces time delays on state transitions. I want to be able to run the bake command and have the latest block have a particular Unix timestamp (e.g. for 1 day ahead ...
2
votes
1
answer
57
views
Error 32603 Metamask to deploy an ERC20 on the EVM rollup
Hi I am trying to deploy an ERC20 on the EVM rollup
I am copying this code for ERC20 and using the Remix IDE
When I use the "Remix VM (shanghai)", it works fine
However, when I switch to &...
2
votes
1
answer
85
views
How to get randomness for my game?
Let's say a player encounters an enemy on a grid-based game, how can I generate a random number on chain to generate the enemy basic characteristics ( HP, strength, agility... ) at the time of the ...
2
votes
1
answer
52
views
Is there any Sapling contract on mainnet?
Is there on mainnet any deployed Sapling contract that anyone really uses (through tezos-client, as I believe it's the only supported way to do it now)?
2
votes
0
answers
109
views
Random # Generating Smart Contracts
I've had an idea about being able to utilize effectively random #s on tezos, but I don't know if it's totally stupid and impossible to utilize, or a possible and really simple solution:
I need to ...
2
votes
1
answer
271
views
Tezos on a ERC20 Wallet
Sorry in advanced, my english is not the best. but i have to try.
Situation: I bought Tezos on the Binance App. Then i sent all the Tezos to my Wallet (ERC20 Wallet). Now its not showing on the wallet,...
2
votes
0
answers
72
views
how can i call specific smartpy tezos contract entrypoint using ConseilJs?
I am trying to set UI that allow users to interact with tezos smart contract by pressing some buttons that have to call the corresponding function in the smart contract with relative arguments
2
votes
0
answers
26
views
Unable to deploy a Liquidity smart contract directly (without offline signature / forged operation)
I'm trying to deploy a contract directly as specified in Liquidity docs, but the CLI fails with:
Failure: edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh is not a valid private key
I have ...
2
votes
3
answers
132
views
Originate contract with init
I have a contract of type:
pair (pair (list nat) (pair mutez (map address (list nat))))
(pair address (pair address bool))
What is an example of a valid initial storage that can be passed to ...
1
vote
1
answer
49
views
Rollup Q&A: How can arbitrum or optimism update their rollup with an admin key? I thought Smart Contract were immutable?
Question from reddit
How can Arbitrum or Optimism update their rollup with an admin key? I
thought SC were immutable?
1
vote
0
answers
43
views
How does an oracle contract get data from outside the blockchain?
I want to build an oracle which gets data on chain from a weather API.
The way I'm thinking about implementing this is to run a server which periodically fetches the data from a weather API, and calls ...
1
vote
0
answers
23
views
Counter for wallet is not incremented after mint using taquito
I'm minting successfully from a contract. Then when I go to transfer the NFT I get the error: "HttpResponse: Http error response: (500) [{"kind":"branch","id":"...
1
vote
1
answer
92
views
about royalty of Tezos NFT
I want to know about the royalties of Tezos NFT. how can I collect the royalty. what are the restriction on the Tezos side. how to write the smart contract with including royalty and are there any ...
1
vote
0
answers
8
views
Suggestion more then question about tezos course on plural sight
There is a good course about BlockChain fundamentals on Plural sight but addressing ethereum. It could be great if someone can create similar curse there with targeting tezos with
1
vote
1
answer
72
views
Using the token_metadata @offchain_view to load tzip-21 compliant metadata
Are there any downsides to how I'm declaring the token_metadata in the @offchain_view below? Loading the data from storage appears to work as expected when testing it on tzcomet and BCD, though I just ...
1
vote
1
answer
74
views
Contract supplied an invalid parameter
I have a little problem because my mint does not pass because of invalid parameters, I don't quite understand why..., in the entrypoint call I deliberately did not put the token_id parameter because ...
1
vote
0
answers
65
views
How do I call a tezos smart contract over go
I have deployed a smart contract to my tezos blockchain and want to interact with it.
I found the go library tzgo (https://github.com/blockwatch-cc/tzgo) to interact with the blockchain and there is ...
1
vote
0
answers
29
views
How can we accept USDTZ in smartpy smart contracts, is it even posible?
I was working on a token sale, so is there any way we can accept USDTZ as a mode of payment for the tokens?
1
vote
2
answers
191
views
Implementing Contract Metadata (tzip-16) on an already originated FA1.2 Smart Contract
Referring to the documents and examples of tzip-16, how would one implement the contract metadata on a Fa1.2 contract on SmartPy? In order to provide balance updates and offchain events.
1
vote
0
answers
108
views
Initialize a record storage with command line
I'm trying to initialize the storage of the record through the command line. I'm trying different variations of: "ligo compile-storage college.religo main 4 Adam 1600"
For a record called ...
1
vote
0
answers
29
views
Try to confirm fundamental mechanism about the shielded pool
Can we say, in a nutshell, the shielded pool is the integration of the FA1.2 token protocol and the PGP tech? Many thanks!
1
vote
1
answer
65
views
Pascaligo map iteration issue
I try to fetch a list of addresses with expired date by appending the address to list(address).
However when doing map iteration, it encounters a persistent error says 'not True'.
Hope someone can ...
1
vote
0
answers
70
views
I got this error from conseil js TezosNodeWriter.sendContractOriginationOperation. What could be the problem
Failed to parse the request body: No case matched:
At /kind, unexpected string instead of endorsement
At /kind, unexpected string instead of seed_nonce_revelation
At /kind, unexpected string ...
1
vote
0
answers
25
views
Fi update a set with 'get'
Struggling with Ligo so took a look at Fi. I want to create a provenancy smart contract i.e. add an artwork, then transfer ownership. The Fi compiler says Error: Error with variable ext - for variable ...
1
vote
2
answers
120
views
Send tezos to contract address after origination using conseiljs
I am trying to send tez from my tz1-AAA account to KT1-AAA contract address means I want my contract address to hold some tez.
Disclaimer - I have knowingly replaced some part of address with "....(s)...
1
vote
0
answers
37
views
Split function contract template
Is there a code template for a simple contract which splits the incoming funds and sends them proportionally to a list of pre-registered addresses?
Example:
Contract has the following functions:
...
1
vote
0
answers
39
views
Deployment of a smart contract through fi compiler
I seem to fill in these parameters incorrectly. What do I need to enter in the Storage.Value and Storage.StartTime columns? If you can give examples
1
vote
0
answers
46
views
Problem with Liquidity installation
After entering this command make build-deps , I get the error message:
The following dependencies couldn't be met:
- liquidity → ocaml < 4.07.1
no matching version
No solution found, ...
1
vote
1
answer
243
views
How do you create a secondary KT1 contact under your TZ address?
I want to have multiple KT1 address on one TZ address(ledger) to delegate to multiple people
0
votes
0
answers
1
view
Sending simple data in smart contract call
I want to make a simple payment receiver contract not using default the entrypoint that also just sends a plain text message. Is there a way to just send a simple message within the input data that ...
0
votes
1
answer
35
views
Patching a contract with deprecated instructions
The following contract (Hic Et Nunc Marketplace V1) contains the deprecated instruction SUB on type mutez:
https://github.com/hicetnunc2000/objkt-swap/blob/master/michelson/objkt_swap_v1.tz
I want to ...
0
votes
2
answers
38
views
Error: TezosOperationError: (branch) proto.017-PtNairob.contract.empty_transaction
So, i'm doing the royalties function for my NFT Marketplace. My idea was to make a big map with the royalties (user and amount) for each new token created, and it's working fine. My problem is when i'...
0
votes
1
answer
22
views
Two contract interactions same time?
So, i want to list my NFT, so, i update operators and then update my metadata.
The problem is i need to accept two times, one to update operators, other to update (list) in metadata. Is that a way to ...
0
votes
1
answer
40
views
deprecated_instruction error upon contract deployment
I'm attempting to clone some contracts that are available on mainnet and deploy them to Ghostnet. When trying to deploy the Hic et Nunc Marketplace (https://tzstats.com/...
0
votes
1
answer
15
views
sp.contract can get only explicit string as an entrypoint
I'm trying to call another contract from mine.
It seems like I can't feed sp.contract with an entrypoint string that comes from an argument (it works perfectly fine with an explicit string like "...
0
votes
1
answer
31
views
The operation cannot be added because the mempool already contains a conflicting operation that should not be replaced
I am getting below issue while deploying SmartPy contract in ghostnet.
HttpResponse: Http error response: (500)
[
{
"kind":"temporary",
"id":"...
0
votes
2
answers
32
views
Contract compile error in Dapp tutorial (wine collection marketplace)
I'm trying to run through this tutorial on dapp development with ligo (https://tezos.com/developers/tutorials/nft-ligo-marketplace/) and am running into an error. In the "NFT Marketplace Contract&...
0
votes
0
answers
11
views
How to migrate storage from one contract to another?
Can we migrate storage from one contract to another,if we get any issue in first contract?
0
votes
1
answer
32
views
calling a FA2 smart contract transfer entrypoint from my contract in smartpy
Hello guys I am trying to call from my contract entry point from FA2 token contract that I have deployed. But I am unable to find anything on the internet.
The only thing I found from the ...
0
votes
0
answers
25
views
Unable to interact with other contracts because Tezos.get_contract_opt got None
I tried to interact with other contracts but failed because Tezos.get_contract_opt always returns None. Here's the demo code (ligo v0.60.0):
receiver.jsligo - A contract that the "broadcaster&...
0
votes
0
answers
59
views
Need help on translating code to convert packed address to string
There is a code on this link (https://tezos.stackexchange.com/a/5908/8795) that decodes a packed address using code that is taken from PyTezos .
I am trying to achieve the same using smartpy inside a ...
0
votes
0
answers
38
views
Is it possible to have an entrypoint call return the gas expended in Archetype mockup mode?
I am writing some basic tests and I want to confirm that the balances of various accounts are correct after an entrypoint is called. I would like to ensure fees have been properly accounted for so my ...
0
votes
1
answer
38
views
Details on VDF for randomization
so i was going through this article,
https://research-development.nomadic-labs.com/verifiable-delay-functions.html
the more i read it, the more i got confused, Is there a easy way we can achieve this ...