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: remove remaining instances of id #164

Merged
merged 4 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 4 additions & 2 deletions axelar-chains-config/tests/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ const axelarSchema = {
type: 'object',
properties: {
id: { type: 'string' },
axelarId: { type: 'string' },
rpc: { type: 'string' },
lcd: { type: 'string' },
grpc: { type: 'string' },
tokenSymbol: { type: 'string' },
},
required: ['id', 'rpc', 'lcd', 'grpc', 'tokenSymbol'],
required: ['id', 'axelarId', 'rpc', 'lcd', 'grpc', 'tokenSymbol'],
};

export const contractValueSchema = {
Expand Down Expand Up @@ -65,6 +66,7 @@ export const chainValueSchema = {
properties: {
name: { type: 'string' },
id: { type: 'string' },
axelarId: { type: 'string' },
chainId: { type: 'number' },
rpc: { type: 'string' },
tokenSymbol: { type: 'string' },
Expand All @@ -73,7 +75,7 @@ export const chainValueSchema = {
gasOptions: { $ref: gasOptionSchema.id },
confirmations: { type: 'number' },
},
required: ['name', 'id', 'chainId', 'rpc', 'tokenSymbol', 'contracts', 'explorer'],
required: ['name', 'id', 'axelarId', 'chainId', 'rpc', 'tokenSymbol', 'contracts', 'explorer'],
};

export const chainsSchema = {
Expand Down
8 changes: 4 additions & 4 deletions cosmwasm/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ const upload = (client, wallet, chainName, config, options) => {
}

if (chainConfig) {
contractConfig[chainConfig.id] = {
...contractConfig[chainConfig.id],
contractConfig[chainConfig.axelarId] = {
...contractConfig[chainConfig.axelarId],
address,
};
} else {
Expand Down Expand Up @@ -360,8 +360,8 @@ const instantiate = (client, wallet, chainName, config, options) => {
const initMsg = makeInstantiateMsg(contractName, chainName, config);
return instantiateContract(client, wallet, initMsg, config, options).then((contractAddress) => {
if (chainConfig) {
contractConfig[chainConfig.id] = {
...contractConfig[chainConfig.id],
contractConfig[chainConfig.axelarId] = {
deanamiel marked this conversation as resolved.
Show resolved Hide resolved
...contractConfig[chainConfig.axelarId],
address: contractAddress,
};
} else {
Expand Down
4 changes: 2 additions & 2 deletions evm/its.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async function processCommand(config, chain, options) {
trustedChains = itsChains.map((chain) => chain.axelarId);
trustedAddresses = itsChains.map((_) => chain.contracts?.InterchainTokenService?.address);
} else {
const trustedChain = config.chains[options.trustedChain.toLowerCase()]?.id;
const trustedChain = config.chains[options.trustedChain.toLowerCase()]?.axelarId;

if (trustedChain === undefined) {
throw new Error(`Invalid chain: ${options.trustedChain}`);
Expand Down Expand Up @@ -490,7 +490,7 @@ async function processCommand(config, chain, options) {
if (options.trustedChain === 'all') {
[trustedChains] = await getTrustedChainsAndAddresses(config, interchainTokenService);
} else {
const trustedChain = config.chains[options.trustedChain.toLowerCase()]?.id;
const trustedChain = config.chains[options.trustedChain.toLowerCase()]?.axelarId;

if (trustedChain === undefined) {
throw new Error(`Invalid chain: ${options.trustedChain}`);
Expand Down
2 changes: 1 addition & 1 deletion evm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ function validateGasOptions(gasOptions) {
function isValidChain(config, chainName) {
const chains = config.chains;

const validChain = Object.values(chains).some((chainObject) => chainObject.id === chainName);
const validChain = Object.values(chains).some((chainObject) => chainObject.axelarId === chainName);

if (!validChain) {
throw new Error(`Invalid destination chain: ${chainName}`);
Expand Down
Loading