Skip to content

feat: add MsgPrivilegedExecuteContract, MsgInstantiateContract composer - #247

Merged
vinhphuctadang merged 3 commits into
devfrom
f/add-contract-messages-composer
Sep 14, 2023
Merged

feat: add MsgPrivilegedExecuteContract, MsgInstantiateContract composer#247
vinhphuctadang merged 3 commits into
devfrom
f/add-contract-messages-composer

Conversation

@vinhphuctadang

Copy link
Copy Markdown
Contributor

We might need this to interact with offchain vaults (and more contracts in the future!)

Example in this PR:
https://github.com/InjectiveLabs/sdk-python/pull/246/files

@aarmoa aarmoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes look good to me, but we can't merge a PR to master without updating the version number in setup.py and also updating the changelog in the README.md file clarifying the change being done.
Was the intention to point to master of was it to point to dev branch.

I have added a couple of comments to complete the missing type hints.

Comment thread pyinjective/composer.py Outdated
proposal_id=proposal_id, voter=voter, option=option
)

def MsgPrivilegedExecuteContract(self, sender: str, contract: str, msg: str, **kwargs):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add the type hint for the return value of the function

Comment thread pyinjective/composer.py Outdated
funds=kwargs.get('funds') # funds is a string of Coin strings, comma separated, e.g 100000inj,20000000000usdt
)

def MsgInstantiateContract(self, sender, admin: str, code_id: int, label: str, message: bytes, **kwargs):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add the type hint to the sender param and also to the return value of the function

@vinhphuctadang
vinhphuctadang changed the base branch from master to dev September 14, 2023 12:32

@aarmoa aarmoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good to me

@vinhphuctadang
vinhphuctadang merged commit 8e63e6e into dev Sep 14, 2023
@vinhphuctadang
vinhphuctadang deleted the f/add-contract-messages-composer branch September 14, 2023 13:18
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