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

fix: duplicate addresses #145

Merged
merged 7 commits into from
Jun 17, 2024
Merged

fix: duplicate addresses #145

merged 7 commits into from
Jun 17, 2024

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Apr 30, 2024

  • removed duplicate addresses
  • removed Mumbai

andresaiello
andresaiello previously approved these changes May 3, 2024
@fadeev
Copy link
Member Author

fadeev commented May 3, 2024

@brewmaster012 @lumtis please, review. Need a second review.

skosito
skosito previously approved these changes Jun 7, 2024
Copy link
Contributor

@skosito skosito left a comment

Choose a reason for hiding this comment

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

just 2 small comments

package.json Outdated
@@ -64,15 +64,16 @@
"license": "MIT",
"main": "./dist/lib/index.js",
"name": "@zetachain/protocol-contracts",
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72",
Copy link
Contributor

Choose a reason for hiding this comment

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

just to double check if this change is needed since its not mentioned in description?

Copy link
Member Author

Choose a reason for hiding this comment

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

When I try to remove it,

yarn

! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72.

For some reason even on older node versions Corepack decides to set the package manager explicitly. I've changed this to yarn@1.22.21: 4454170

@@ -1,11 +1,4 @@
[
{
"address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesnt look like a duplicate in this file, just to double check, or is it handled by this:

addresses.push({
          address: factoryAddress,
          category: "messaging",
          chain_id: router.chain_id,
          chain_name: router.chain_name,
          type: "uniswapV2Factory",
        });

Copy link
Member Author

Choose a reason for hiding this comment

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

In main we have two identical entries:

{
"address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "uniswapV2Factory"
},
{
"address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "uniswapV2Factory"
},

This PR leaves just one:

{
"address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "uniswapV2Factory"
},

This is handled by the script, so I've removed the entry from tasks/addresses.ts to avoid having duplicate entries.

skosito
skosito previously approved these changes Jun 9, 2024
andresaiello
andresaiello previously approved these changes Jun 11, 2024
lumtis
lumtis previously approved these changes Jun 17, 2024
@lumtis lumtis dismissed stale reviews from andresaiello, skosito, and themself via 04afbfc June 17, 2024 13:43
lumtis
lumtis previously approved these changes Jun 17, 2024
@lumtis
Copy link
Member

lumtis commented Jun 17, 2024

@fadeev I solved the conflict in package.json here since it was just about removing a comma but it seems generate files is failing now, do you know the reason?

@skosito
Copy link
Contributor

skosito commented Jun 17, 2024

@fadeev I solved the conflict in package.json here since it was just about removing a comma but it seems generate files is failing now, do you know the reason?

it seems that one of those 2 is not iterable and spread operator is used on them, i can also check:

 const networks = [...mainnet, ...testnet];

also maybe related to yarn version change there is duplicate entry in package.json, will remove it

EDIT: this did the trick, approving PR again

skosito
skosito previously approved these changes Jun 17, 2024
@lumtis lumtis merged commit eb8d729 into main Jun 17, 2024
7 checks passed
@lumtis lumtis deleted the fix-duplicates branch June 17, 2024 14:35
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.

4 participants