Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Customscript Account] Add importContract API #371

Open
altafan opened this issue Jul 29, 2022 · 0 comments
Open

[Customscript Account] Add importContract API #371

altafan opened this issue Jul 29, 2022 · 0 comments
Assignees

Comments

@altafan
Copy link
Collaborator

altafan commented Jul 29, 2022

This API differs from getNextAddress by the fact that it doesn't perform a substitution of the namespace pubkey in the passed contract parameters + increment of the derivation index, like the latter does, but rather it discovers the derivation index of the one already present in the contract params object.

This method turns useful when the user wants to import an existing contract to the customscript account. Ideally he would retrieve the required template and the constructor params from a general contract metadata store. This service could be a block explorer that, similarly to etherscan, would support verification of contract by uploading template and constructor params and making them publicly accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants