7

The difference is very simple :) The parameter is made of data that are sent to the contract with a transaction while the storage holds the state of the contract (i.e all the data that the contract saves to be reused later). It is true that both the storage and the parameter can be seen as inputs because they are fed to the contract at the beginning of its ...


7

As of 003_PsddFKi3: An originated account is forever.[1] An implicit account is 'allocated'[2] and 'deleted'[3] as its balance goes above and back to zero (if it is not a delegate[4]). Currently you must pay a storage burn to allocate an implicit account, and there is no refund upon deletion. The storage_limit for an operation accounts for this burn (...


7

In the command line ./tezos-client get contract storage for KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ You could also just call the RPC curl http://localhost:8732/chains/main/blocks/head/context/contracts/KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ/storage


6

1) Here they are $ ./tezos-client rpc get /chains/main/blocks/1/context/contracts | grep KT1 "KT1WPEis2WhAc2FciM2tZVn8qe6pCBe9HkDp", "KT1W148mcjmfvr9J2RvWcGHxsAFApq9mcfgT", "KT1VvXEpeBpreAVpfp4V8ZujqWu2gVykwXBJ", "KT1VsSxSXUkgw6zkBGgUuDXXuJs9ToPqkrCg", "KT1Um7ieBEytZtumecLqGeL56iY6BuWoBgio", "KT1TzamC1SCj68ia2E4q2GWZeT24yRHvUZay", "...


5

In the FA2.0 standard the sender and receiver is send as Bytes (vs. send as string for FA1.2). Both token standards say that sender and receiver are Michelson addresses. Michelson addresses have two allowed representations, as strings (readable representation) and as bytes (optimized representation). What is the extra byte used for? The extra byte is used ...


5

Why can I convert between address and contract. But not between address and key_hash? There is the (IMPLICIT_ACCOUNT) instruction to go from key_hash to address. For the other direction, there was (a feature request) but it was closed because no use case has been presented to motivate it.


5

key_hash is blake2b hash of a public key, in the base58 encoded form it can start only with tz, but address is more general, it can also hold KT accounts; There are no instructions for that, probably because it's a rare and arguable case; EDIT: as pointed out by Raphaël, you can convert key_hash to contract and then to address using IMPLICIT_ACCOUNT ; ...


4

No. The only way to do that is for the contract you call to explicitely send you a callback, continuation passing style.


4

You cannot create a contract and call it immediately. It goes like this, chronologically: Your script is running. You invoke CREATE_CONTRACT or CREATE_ACCOUNT. An operation and address are returned and your script continues on. The operation will create the account after your script returns it. Right now, the account does not exist. You now immediately try ...


4

Your code above has some issues that I will describe below. Also, you are confusing off-chain metadata with on-chain metadata, tzip16 and tzip21 allow those structures because they were designed to be stored off-chain. (Only possible to store onchain with stringified JSON or in bytes.) In make_metadata you are trying to create a map with different value ...


3

You need to provide an initial storage value for your contract. You can write it in Ligo and compile it too using the ligo compile-storage command.


3

No, whitespace and comments do not affect storage or gas costs. The syntax of Michelson code and values is called "Micheline". The concrete syntax (the way you actually write Micheline expressions in text, with whitespace and comments, etc) is used by clients for the convenience of humans. It is also validated to prevent some obfuscation tricks -- ...


3

In a scenario where both the TZ1 and KT1 addresses have been emptied, you can still send funds to your KT1 address. The KT1 contract never gets destroyed. You will however need fund your manager account again (TZ1 address) in order to move the funds you just sent to your KT1 address. The delegation would remain active as long as you don't change or cancel ...


3

No - these are helper functions that provide typecheck and testing features. You originate a contract via an operation (with kind origination), and you call it via a standard transaction and the parameter field.


3

Only admin can call mintOrBurn in that particular contract. As you can see in the contract storage, tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx is the admin, so you need a private key from this address. Fortunately, tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx is one of the bootstrap addresses with known private key edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh, ...


2

In my understanding, you can call a contract by sending a parametrised transaction, that's injected as an operation under /injection/operation. You can trace the flow above in the source of eztz.js. /injection/operation doesn't return much more, but a hash of the operation you've just injected. (there is a mention of a $unistring although i'm not sure what ...


2

You are using a private key which do not correspond to any account on the alphanet. It works with liquidity --tezos-node http://alphanet-node.tzscan.io:80 --private-key edsk2j7Ka5nRzh2QkGCtcD1dFLbHYvYw7XAafWL3YEAQQ3Zd61NiqS --protocol alphanet simple.liq --deploy Main contract Simple New contract KT18bLbXyH5yMY9ShDfCwtiXegWHMTa4aS8H deployed in operation ...


2

As I understand the concepts, transferring tezos is one kind of contract. It has amount to move from account to another and the move is containing a transaction to track, that the operation gets through in meaningful time. So, actually tezos transfer is a small contract, sort of. What about smart contract data types (is it amount of money in tezos, dollars, ...


2

Let's find the contract on Arronax and look at its code... storage unit; code { CDR ; NIL operation ; AMOUNT ; PUSH mutez 0 ; { COMPARE ; EQ ; IF {} { SOURCE ; CONTRACT unit ; { IF_NONE { { UNIT ; FAILWITH } } {} } ; AMOUNT ; UNIT ; TRANSFER_TOKENS ; CONS } } ; PAIR } ..you will see that nothing is effectively being ...


2

The babylonnet was terminated about 2 weeks ago. It is no longer supported. You should be on carthagenet now. "Waiting for the node to be bootstrapped" means your node is not yet synchronized with the rest of the network. You cannot submit operations until you are in sync. On carthagenet, this might take about 24 hrs to sync.


2

You created a contract which can only transfer funds when it receives a call to do so from its "manager" account which was specified at origination and is the only value the contract has in its storage. The contract can be seen here https://better-call.dev/main/KT1VSiaepk9USGAHDjJQAm4aaYRC6J8dTBHG/operations You can see that the storage has the value ...


2

The correct way to do this is simply: @sp.entry_point def withdraw(self, amount): sp.set_type(amount, sp.TMutez) sp.send(sp.sender, amount) The solidity translation tool I used didn't handle this properly


2

There is https://github.com/baking-bad/netezos, a .NET Standard 2.0 library for working with Tezos. You can easily use it to interact with Tezos node via RPC, manage keys (it also supports Ledger), forge and send operations, etc. This library is actively developing (by the way, mscappini, author of Tz.Net, is also working with us on Netezos v2) and soon we ...


2

You can use an address "KT1..." or "KT1...%entry_point". The chain is then in charge of type checking and converting to the contract type.


2

There is a bug in the SmartPy template (just discovered it). You should either: add other entry points to onEven and onOdd; or remove the specification of sp.contract(..., entry_point = "run") in the main contract.


2

I thought that it was a copy of the previous main net + the new changes to be applied (Granada in this case). It isn't, testnets share no history with mainnet, or each-other. From the Test Networks docs: every time a new protocol is proposed on Mainnet, a new test network is spawned. This also makes synchronization much faster than with a long-lived ...


2

the allowance is only 10 and when I try to chance it I get an UnsafeAllowanceChange error. This error is raised because the allowance is already 10, from the UnsafeAllowanceChange documentation: Fires if: Allowance change from non-zero value to non-zero value is performed. This contract does not allow such an update, see the corresponding attack vector for ...


2

tzBTC uses 8 decimals like Bitcoin, so you should divide tokenPool by 100000000 to get the number of tzBTC held by the contract.


1

When you originated the Collatz contract, you needed two addresses for the initial storage; these two addresses have to be the addresses that you got when you originated the two previous contracts. Can you please show all the commands that you typed and all the answers that you got?


1

I think we are in the third case: Maybe useful but none has yet proposed it with convincing use cases? It is true that the keys must be given from the outside but so are the signatures so if one needs to combine signature checking and address-based authentication it is always possible to replace all occurrences of signature with pair key signature and ...


Only top voted, non community-wiki answers of a minimum length are eligible