9 votes

How are the originated contract addreses (KT1) computed?

In case someone needs precise calculations. Say, you have an operation group hash onvsLP3JFZia2mzZKWaFuFkWg2L5p3BDUhzh5Kr6CiDDN3rtQ1D and an origination index 0 which is increased for every ...
Michael Zaikin's user avatar
7 votes

How are the originated contract addreses (KT1) computed?

KT1 addresses are computed from origination nonce. The origination nonce is made of operation hash (the operation that creates the origination) and its index (the index starts from 0 and it gets ...
Tomáš Zemanovič's user avatar
3 votes

Is it possible to originate a contract with an initial balance?

For sure! For instance, when originating with tezos-client, in this example I send 99 tez from the bootstrap1 account when originating the contract my_contract: $ tezos-client originate contract ...
arvidj's user avatar
  • 2,378
3 votes

How to delegate programmatically?

Thanks to Klassare, who kindly analysed my JSON, it worked. I was using the wrong FEEs values. This table might help many other developers:
Luiz Milfont's user avatar
2 votes

Originate smart contract with empty arguments

There is no nil on tezos. You will need to use the option type, which can be None or Some <value>. A SmartPy example
Rodrigo Quelhas's user avatar
2 votes
Accepted

Tezos Origination operation - How to do it correctly from programming?

The delegate address must be registered as a baker on the blockchain. It should give you an error message if you do the pre-apply before injecting the operation.
Klassare's user avatar
  • 1,345
2 votes
Accepted

Is it possible to originate a contract with an initial balance?

Yes, the origination operation allows you to provide the contract balance. In smartpy origination page:
Rodrigo Quelhas's user avatar
2 votes
Accepted

Got this error during ghostnet deployment, "No case matched: At /kind, unexpected string instead of endorsement"

In sp.emit(), spaces should not be given on tag. sp.emit(tag="eventGenerated") if you are giving space, then there will be an issue.
Kin's user avatar
  • 184
2 votes

What is a 'valid case' for bls12_381_fr?

Edo2net is not the default protocol in sandbox. You will need to provide the --protocol-hash arg: tezos-sandbox mini \ --size 1 \ --number-of-boot 2 \ --protocol-hash ...
Rodrigo Quelhas's user avatar
2 votes
Accepted

Ill formed storage type in origination

The problem lies in this part (set %signers key). The set requires that its elements are comparable, but key type is not comparable. To get around this, you could use key_hash for the set instead, ...
Tomáš Zemanovič's user avatar
1 vote
Accepted

Unexpected character in contract.js React issue

i fixed it by using this solution : www.stackoverflow.com/a/51349619
Muhammed Ekici's user avatar
1 vote

How to handle oversized operation while originating contract?

If the operation is packed (eg. it's alongside a public key revelation), try to inject the revelation is a separate operation. If you only injected the origination operation, the solution might be ...
iguerNL's user avatar
  • 1,141
1 vote
Accepted

Is it possible to use an existing contracts storage as the seed data for a new contract that has the same storage schema?

Yes, it is possible if you originate a contract from within a contract: The example below duplicates the storage of Creator when originating Created. (This will not work if the storage contains ...
Rodrigo Quelhas's user avatar
1 vote
Accepted

How to initialize the storage while originating a contract with storage type (pair (address %administrator) (unit %dummy))?

The unit literal is capitalized Unit. The following will work: --init '(Pair "tz1..." Unit)'.
Rodrigo Quelhas's user avatar
1 vote
Accepted

Originating a contract fails with 'unexpected_lazy_storage' ONLY when exception optimisation level is set to 'full-debug'

Full debug implies that exceptions are filled with as much information as possible. As you’ve seen, you must have a big map somewhere it shouldn’t be. I’m not sure if something changed or not in ...
FFF's user avatar
  • 3,260
1 vote

Trouble Initializing Contract with Lists

(Pair (Pair "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77" {}) {})
JellyMan's user avatar
1 vote

What is a 'valid case' for bls12_381_fr?

Can you give more information on your setup? Like which hash do you use? In the latest versions of BLS12-381 (used by Edo), it has been decided to pad the bytes for Fr elements. Some users requested ...
Danny Willems's user avatar

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