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

Add ADR-028 implementation and test CosmWasm contract addresses #857

Closed
wants to merge 1 commit into from

Conversation

webmaster128
Copy link
Member

No description provided.

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation

describe("adr28", () => {
describe("moduleAddressRaw", () => {
it("can be used for wasm contract address derivation", () => {
function contractAddressRaw(codeId: number, contractId: number): Uint8Array {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool. glad to see this cross-test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you want to expose this function not just in tests? (but i guess in cosmwasm package?)

The slice(0, 20) is unique to our 0.42-compatible code. The 0.43 sdk has 32 byte addresses 😱 (actually a mix between 20 and 32 I think) hope that doesn't break other tests

Copy link
Member Author

@webmaster128 webmaster128 Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to test the generic ADR-28 implementation. Turns out no CosmWasm client needs to know how contract addresses are generated. They just use them. So I don't see a point in exposing that.

@webmaster128
Copy link
Member Author

Closing as not needed. See function instantiate2Address where some of that functionality is implemented as well.

@webmaster128 webmaster128 deleted the implement-adr28 branch November 22, 2023 08:49
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.

2 participants