-
Notifications
You must be signed in to change notification settings - Fork 48
refactor: retrieve contract address from Instantiated event #589
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
Conversation
✅ Deploy Preview for ui-use-ink ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
* @param nonce The nonce value | ||
* @returns The contract address | ||
*/ | ||
export function create1(deployer: string, nonce: number): Address { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these functions as there is no need to keep them anymore.
code: metadata?.json.source.contract_binary, | ||
}, | ||
}); | ||
return onSuccess(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same approach now for ink! v5 and ink! v6: get the address from the instantiated event
This PR updates contract deployment to retrieve the smart contract address directly from the
Instantiated
event, following the same approach already used inpallet_contracts
.Blocked: In draft because needs the changes in api-contract library to be merged: polkadot-js/api#6210Tested locally building the api-contract from polkadot-js/api#6210Closes #581 now that the contract address is fetched in the
Instantiated
event.