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

Supported pairs query #170

Merged
merged 18 commits into from
May 17, 2024
Merged

Supported pairs query #170

merged 18 commits into from
May 17, 2024

Conversation

fbielejec
Copy link
Collaborator

@fbielejec fbielejec commented Apr 18, 2024

Adding a missing query on the azero contract ( supported pairs )

Base automatically changed from feature/better-logs to master April 22, 2024 09:30
@JanKuczma
Copy link
Contributor

It's not a part of this PR but maybe it could be fixed here as it touches bridge_weth.ts file:

function getTokenAddresses(addresses, tokenName): [string, string] {
for (let [_, ethAddress, azeroAddress] of addresses.tokens) {
if (tokenName == tokenName) {
return [ethAddress, azeroAddress];
}
}
}

function getTokenAddresses(addresses, tokenName): [string, string] {
  for (let [_tokenName, ethAddress, azeroAddress] of addresses.tokens) {
    if (tokenName == _tokenName) {
      return [ethAddress, azeroAddress];
    }
  }
}

const weth_azero = getTokenAddresses(addresses, "weth")[1];

  const weth_azero = getTokenAddresses(addresses, "wETH")[1];

@fbielejec
Copy link
Collaborator Author

It's not a part of this PR but maybe it could be fixed here as it touches bridge_weth.ts file:

function getTokenAddresses(addresses, tokenName): [string, string] {
for (let [_, ethAddress, azeroAddress] of addresses.tokens) {
if (tokenName == tokenName) {
return [ethAddress, azeroAddress];
}
}
}

function getTokenAddresses(addresses, tokenName): [string, string] {
  for (let [_tokenName, ethAddress, azeroAddress] of addresses.tokens) {
    if (tokenName == _tokenName) {
      return [ethAddress, azeroAddress];
    }
  }
}

const weth_azero = getTokenAddresses(addresses, "weth")[1];

  const weth_azero = getTokenAddresses(addresses, "wETH")[1];

Pushed in 1302d73

@fbielejec
Copy link
Collaborator Author

Can we merge this @krzysztofziobro @obrok ? Best before mainnet release I suppose?

Copy link
Collaborator

@krzysztofziobro krzysztofziobro left a comment

Choose a reason for hiding this comment

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

I would merge it, but I think it would be nice to add here also getters for fee constants + I would remove the upgrade script (upgrades need to be manual performed by the contract owner anyway).

@fbielejec
Copy link
Collaborator Author

I would merge it, but I think it would be nice to add here also getters for fee constants + I would remove the upgrade script (upgrades need to be manual performed by the contract owner anyway).

Done, please double check me if we're not missing sth

@fbielejec fbielejec merged commit 84e1280 into master May 17, 2024
6 checks passed
@fbielejec fbielejec deleted the supported-pairs-query branch May 17, 2024 10:20
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.

None yet

3 participants