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(ibc-test): use ICS20TransferERC20, remove MockTransfer #351

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

jjyr
Copy link
Collaborator

@jjyr jjyr commented Oct 20, 2023

Uses ICS20TransferERC20 to replace the MockTransfer in IBC tests.

We also deployed a SimpleToken(both name and symbol are 'AT') ERC-20 contract used as the default token in IBC tests.

See also synapseweb3/ibc-solidity-contract#29

@jjyr jjyr force-pushed the remove-axon-mock-transfer-contract branch from 4f0fd60 to b465f2f Compare October 21, 2023 12:55
let key_name = key_name.unwrap_or(&self.config.key_name);
let denom: &str =
denom.ok_or_else(|| Error::other_error("do not support default denom".into()))?;
let erc20_address = {
Copy link
Contributor

Choose a reason for hiding this comment

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

use denom as erc20 address is compatible with the previous use in CI?

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, by my understanding, the CI is using erc20 address as the env DENOM.

// let denom = denom.unwrap_or(DEFAULT_DENOM);
// let contract = self.ics20_contract()?;
// let wallet = self.get_wallet(key_name);
fn query_balance(&self, key_name: Option<&str>, denom: Option<&str>) -> Result<Balance, Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This only works for source denoms, for sink denoms we would need to lookup the denomTokenContract mapping. (Not saying that it should be implemented now. Just a reminder.)

@jjyr jjyr added this pull request to the merge queue Oct 23, 2023
Merged via the queue into main with commit abcfe1b Oct 23, 2023
31 checks passed
@jjyr jjyr deleted the remove-axon-mock-transfer-contract branch October 23, 2023 02:40
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.

3 participants