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

Cosmwasm 0.15 #225

Merged
merged 23 commits into from
Jun 24, 2021
Merged

Cosmwasm 0.15 #225

merged 23 commits into from
Jun 24, 2021

Conversation

uint
Copy link
Contributor

@uint uint commented Jun 22, 2021

Closes #224

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

👍 with this the audit job passes already.

libwasmvm/src/cache.rs Outdated Show resolved Hide resolved
@uint
Copy link
Contributor Author

uint commented Jun 23, 2021

Rebased to get rid of the libwasmvm.so update.

@uint
Copy link
Contributor Author

uint commented Jun 23, 2021

@webmaster128 I'm struggling with how to represent VoteOption in Go:
https://github.com/CosmWasm/cosmwasm/pull/973/files#diff-ee41fe4124cc812f86177ba54c9fd228f6883afb0750174b704b36faaa31929fR176

I feel like this should be some sort of integer code, and maybe iota would make this easier. But then, we would probably want to hardcode the integer values on Rust side too, wouldn't we? What do you think?

EDIT: Nvm, I think I figured it out.

@uint uint marked this pull request as ready for review June 23, 2021 14:52
@uint uint requested a review from webmaster128 June 23, 2021 14:52
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Looks very good

types/ibc.go Outdated Show resolved Hide resolved
types/msg.go Outdated Show resolved Hide resolved
types/msg.go Outdated Show resolved Hide resolved
types/msg.go Outdated Show resolved Hide resolved
@webmaster128
Copy link
Member

webmaster128 commented Jun 23, 2021

I feel like this should be some sort of integer code, and maybe iota would make this easier. But then, we would probably want to hardcode the integer values on Rust side too, wouldn't we? What do you think?

I think the single source of truth is the JSON Schema:

    "VoteOption": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "abstain",
        "no_with_veto"
      ]
    },

This is what is passed over FFI. Rust does not need to care how Go picks this up. If the int solution of a string solution is better for Go callers, I don't know. I think is is good to fail for non allowed values.

types/msg.go Outdated Show resolved Hide resolved
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

🏅

@webmaster128 webmaster128 merged commit 01153f8 into main Jun 24, 2021
@webmaster128 webmaster128 deleted the cosmwasm-0.15 branch June 24, 2021 08:08
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.

Update to pre-release of CosmWasm 0.15.0
2 participants