Skip to content

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented Sep 17, 2025

This PR updates contract deployment to retrieve the smart contract address directly from the Instantiated event, following the same approach already used in pallet_contracts.

Blocked: In draft because needs the changes in api-contract library to be merged: polkadot-js/api#6210

Tested locally building the api-contract from polkadot-js/api#6210

Closes #581 now that the contract address is fetched in theInstantiated event.

Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for ui-use-ink ready!

Name Link
🔨 Latest commit 942be4c
🔍 Latest deploy log https://app.netlify.com/projects/ui-use-ink/deploys/68d4ee692d9b8e0008bd3b2d
😎 Deploy Preview https://deploy-preview-589--ui-use-ink.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@AlexD10S AlexD10S changed the base branch from master to fix/revive-getContractInfo September 17, 2025 13:48
Base automatically changed from fix/revive-getContractInfo to master September 18, 2025 08:37
@AlexD10S AlexD10S marked this pull request as ready for review September 25, 2025 07:29
@AlexD10S AlexD10S requested a review from cmichi September 25, 2025 07:29
* @param nonce The nonce value
* @returns The contract address
*/
export function create1(deployer: string, nonce: number): Address {
Copy link
Contributor Author

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);
Copy link
Contributor Author

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

@AlexD10S AlexD10S merged commit da48a1f into master Sep 26, 2025
11 checks passed
@AlexD10S AlexD10S deleted the refactor/instantiated-event branch September 26, 2025 11:59
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

Successfully merging this pull request may close these issues.

Incorrect Contract Address Calculation When Using Vec<H160> in Constructor

1 participant