Skip to content
This repository has been archived by the owner on Mar 20, 2020. It is now read-only.

Update contract Wasm runtime interface to support multi token #14

Open
5 tasks
xlc opened this issue Jun 5, 2019 · 0 comments
Open
5 tasks

Update contract Wasm runtime interface to support multi token #14

xlc opened this issue Jun 5, 2019 · 0 comments
Assignees

Comments

@xlc
Copy link
Contributor

xlc commented Jun 5, 2019

Update contract Wasm runtime interface to support multi token by making existing one defaults to CENTRAPAY and add new one comes with asset id argument

This assumes AssetId cannot be larger than u64. We can revisit later to see if we need to drop this assumption.

  • All existing runtime interfaces use DefaultAssetId

Runtime interfaces:

define_env!(Env, <E: Ext>,

  • New ext_asset_balance(ctx, asset_id: u64) to query GA balance
  • New ext_asset_transfer(ctx, asset_id: u64)

Later will need to modify ext_call and ext_create to be able to transfer multiple tokens during contract call or deployment.

Meta issue: #13

@xlc xlc assigned xlc and leoliu-centrality and unassigned xlc Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants