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 ...
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 ...
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 ...
  • 2,348
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:
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.
  • 1,320
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:
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
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 ...
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, ...
1 vote
Accepted

Can I create a smart contract from inside another smart contract in LIGO?

Unfortunately, Tezos.create_contract does not work well in practice. It only works if the child contract is extremely simple. The child code must either be written entirely inside the Tezos....
  • 2,526
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 ...
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 ...
  • 3,220
1 vote

Trouble Initializing Contract with Lists

(Pair (Pair "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77" {}) {})
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 ...

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