How not to expose the code when we upgrade the contract #287
Unanswered
neethu-satheesh-s
asked this question in
Questions
Replies: 1 comment 2 replies
-
you should be able to include the aptos move build-publish-payload
--json-output-file upgrade.json
--named-addresses source_addr=12347d47a9b0ac564856168b68f5f06408cc5f1c691yur5366c3ab116d76rsdf
--included-artifacts none This way, you won’t expose your code on-chain during the upgrade. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
neethu.satheesh
Describe your question in detail.
Hi,
I have a contract which was published via resource account and not to expose the code. The contract is an upgradable contract.
aptos move create-resource-account-and-publish-package --seed 1234 --address-name abc --named-addresses source_addr=12347d47a9b0ac564856168b68f5f06408cc5f1c691yur5366c3ab116d76rsdf --included-artifacts none --profile admin
included-artifacts none ensures the code does not get exposed.
But when I upgrade using the following command, it gets exposed.
aptos move build-publish-payload --json-output-file upgrade.json --named-addresses source_addr=12347d47a9b0ac564856168b68f5f06408cc5f1c691yur5366c3ab116d76rsdf
Then edited the function to match the update function defined in the contract.
How do I call the upgrade function without exposing the code?
Thank you.
What error, if any, are you getting?
No response
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
Linux (Ubuntu, Fedora, Windows WSL, etc.)
Which SDK or tool are you using? (if any)
N/A
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions