NEPs icon indicating copy to clipboard operation
NEPs copied to clipboard

Introduce deployment_id for smart contracts

Open k06a opened this issue 5 years ago • 2 comments

Having deployment_id depending on deployer's deployment_id and some salt would allow to have non-interactive authorization checks between smart contracts family of the same service.

Deploying smart contract from the wallet:

deployment_id = hash(concat(hash(deployer_public_key), hash(salt)))

Deploying smart contract from the smart contract:

deployment_id = hash(concat(hash(deployer.deployment_id), hash(salt)))

I propose to discuss exact functions to be used.

k06a avatar Jun 05 '20 07:06 k06a

Can you give an example of how deployment_id is used, where salt is stored, etc?

bowenwang1996 avatar Jun 06 '20 15:06 bowenwang1996

salt is an argument for a deployment process, which should affect deployed smart contract deployment_id. I am mostly talking about the case when smart contract deploy smart contracts, such deplyment_id would allow smart contract to perform non-interactive check is some calling smart contract is created by some factory smart contract with some salt or not.

k06a avatar Jun 06 '20 18:06 k06a

Since there has been no activity for 5 years, I'm closing the issue. Feel free to open it if still relevant.

garikbesson avatar Jul 25 '25 16:07 garikbesson