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

test: update test for contract config #505

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions axelar-chains-config/info/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2506,9 +2506,7 @@
"finality": "1",
"tokenSymbol": "XLM",
"tokenAddress": "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA",
"contracts": {
"AxelarGateway": {}
},
"contracts": {},
"approxFinalityWaitTime": 1,
"explorer": {
"name": "Soroban Nownodes",
Expand Down
13 changes: 2 additions & 11 deletions axelar-chains-config/info/stagenet.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@
"tokenSymbol": "BNB",
"chainType": "evm",
"contracts": {
"AxelarGateway": {},
Copy link
Member

Choose a reason for hiding this comment

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

is this still in an invalid state? i thought we finished the deployment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found this update: https://interoplabs.slack.com/archives/C02QRPRH22X/p1721684972174219

@talalashraf we can try to recover it if you still have a log?

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 per our discussion will create tickets to deploy binance and centrifuge on stagenet.

"AxelarGasService": {
"collector": "0xc5C525B7Bb2a7Ce95C13Ee5aBdB7F8fd3cb77392"
},
Expand All @@ -358,10 +357,7 @@
"deploymentMethod": "create2",
"codehash": "0xf0ad66defbe082df243d4d274e626f557f97579c5c9e19f33d8093d6160808b7",
"predeployCodehash": "0x73fc31262c4bad113c79439fd231281201c7c7d45b50328bd86bccf37684bf92"
},
"Operators": {},
"InterchainGovernance": {},
"Multisig": {}
}
},
"explorer": {
"url": "https://testnet.bscscan.com",
Expand Down Expand Up @@ -711,11 +707,9 @@
"codehash": "0xf0ad66defbe082df243d4d274e626f557f97579c5c9e19f33d8093d6160808b7",
"predeployCodehash": "0x73fc31262c4bad113c79439fd231281201c7c7d45b50328bd86bccf37684bf92"
},
"AxelarGateway": {},
"InterchainTokenService": {
"skip": true
},
"InterchainGovernance": {},
"Multisig": {
"threshold": 2,
"signers": [
Expand All @@ -724,7 +718,6 @@
"0xBeF25f4733b9d451072416360609e5A4c115293E"
]
},
"Operators": {},
"AxelarGasService": {
"collector": "0xc5C525B7Bb2a7Ce95C13Ee5aBdB7F8fd3cb77392"
}
Expand Down Expand Up @@ -1893,9 +1886,7 @@
"approxFinalityWaitTime": 1,
"tokenSymbol": "XLM",
"tokenAddress": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
"contracts": {
"AxelarGateway": {}
},
"contracts": {},
"explorer": {
"name": "Stellar Expert",
"url": "https://stellar.expert/explorer/testnet"
Expand Down
6 changes: 3 additions & 3 deletions axelar-chains-config/tests/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export const contractValueSchema = {
properties: {
address: { type: 'string' },
},
required: ['address'],
Copy link
Member

Choose a reason for hiding this comment

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

for every contract, if it exists under contracts key, it's address should be included and checked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I will be reverting address check. But for InterchainTokenService on hedera [here], address check fails. Shouldn't we Ideally remove "skip": true ?

Copy link
Member

Choose a reason for hiding this comment

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

See the usage of "skip": true in the scripts. For now, you can add an empty "address" or so there. Feel free to implement a better solution and then we can remove it

minProperties: 1,
};

export const contractSchema = {
id: '/info.chains.contracts',
type: 'object',
patternProperties: {
// PascalName e.g. 'AxelarGasService', 'AxelarGateway' etc.
'\b[A-Z][a-z]*([A-Z][a-z]*)*\b': {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This regex was not working earlier, therefore the checks were passing until now.

'(^[a-z]|[A-Z])[a-z]*': {
$ref: contractValueSchema.id,
},
},
Expand All @@ -35,7 +35,7 @@ export const contractSchema = {
type: 'boolean',
},
},
required: ['AxelarGateway'],
required: [],
};

export const explorerSchema = {
Expand Down
Loading