Neo: Calculating the script hash for a contract that hasn't been deployed

Created on 2 Dec 2020  路  1Comment  路  Source: neo-project/neo

Now that #2044 has been merged, my understanding is that the script hash used to invoke a contract is dependent on the original script contents + the address of the contract deployer. Is there a deterministic way of generating the script hash of a contract that hasn't been deployed yet? I'm guessing no.

question

Most helpful comment

@devhawk #2044 change the way scripthash generated, so if different user deploy the same contract script, they will get different script hash. and the scripthash depends on the sender, aka contract deployer.
https://github.com/neo-project/neo/blob/e835631e5491608805789f334392bf9c8fbb9107/src/neo/SmartContract/Helper.cs#L18-L26

>All comments

@devhawk #2044 change the way scripthash generated, so if different user deploy the same contract script, they will get different script hash. and the scripthash depends on the sender, aka contract deployer.
https://github.com/neo-project/neo/blob/e835631e5491608805789f334392bf9c8fbb9107/src/neo/SmartContract/Helper.cs#L18-L26

Was this page helpful?
0 / 5 - 0 ratings

Related issues

csmuller picture csmuller  路  3Comments

igormcoelho picture igormcoelho  路  3Comments

doubiliu picture doubiliu  路  3Comments

vncoelho picture vncoelho  路  3Comments

shargon picture shargon  路  4Comments