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

feat: add approve, burn_from, transfer_from #29

Merged
merged 5 commits into from
Nov 19, 2020
Merged

feat: add approve, burn_from, transfer_from #29

merged 5 commits into from
Nov 19, 2020

Conversation

shiki-tak
Copy link
Contributor

Closes: #28

Description

I added approve, burn_from, transfer_from for token encode library.
The test is run with the https:/line/link-modules/pull/42.

Motivation and context

How has this been tested?

Checklist:

  • I followed the contributing guidelines.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@shiki-tak shiki-tak added the WIP label Nov 13, 2020
@@ -623,9 +622,6 @@ jobs:
name: Unit tests
env: RUST_BACKTRACE=1
command: cargo unit-test --locked
- run:
name: Integration tests
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the file for the integration test does not exist, I removed it once as it was an error.

@shiki-tak shiki-tak removed the WIP label Nov 13, 2020
Copy link
Contributor

@brew0722 brew0722 left a comment

Choose a reason for hiding this comment

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

Besides one test code change, everything else looks good to me.

@@ -525,7 +525,7 @@ mod tests {
fn create_contract(owner: String) -> (Extern<MockStorage, MockApi, MockQuerier>, Env) {
let mut deps = mock_dependencies(20, &coins(1000, "cony"));
let env = mock_env(owner, &coins(1000, "cony"));
let res = init(&mut deps, env, InitMsg {}).unwrap();
let res = init(&mut deps, env.clone(), InitMsg {}).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why should clone env?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

create_contract finally specifies env as a return value.
If you don't pass it to init function with a clone, the ownership will be moved and you'll get a build error.

Copy link
Contributor

@brew0722 brew0722 Nov 19, 2020

Choose a reason for hiding this comment

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

got it thanks, LGTM

@shiki-tak shiki-tak merged commit 3250314 into Finschia:develop Nov 19, 2020
loloicci pushed a commit that referenced this pull request Jan 26, 2021
* feat: add approve, burn_from, transfer_from

* fix: config.yml

* fix: update schema

* fix: msg name

* fix: update schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add approve, burn_from, transfer_from for ext package
4 participants