Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Aug 1, 2024
1 parent 9a22dbb commit 93e0b1e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sui/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ const PACKAGE_DIRS = ['gas_service', 'test', 'axelar_gateway', 'operators'];
/**
* Package Mapping Object for Command Options and Post-Deployment Functions
*/
const PACKAGE_MAPPING = {
CMD_OPTIONS: {
const PACKAGE_CONFIGS = {
cmdOptions: {
AxelarGateway: () => [...DEPLOY_CMD_OPTIONS, ...GATEWAY_CMD_OPTIONS],
GasService: () => DEPLOY_CMD_OPTIONS,
Test: () => DEPLOY_CMD_OPTIONS,
Operators: () => DEPLOY_CMD_OPTIONS,
},
POST_DEPLOY_FUNCTIONS: {
postDeployFunctions: {
AxelarGateway: postDeployAxelarGateway,
GasService: postDeployGasService,
Test: postDeployTest,
Expand Down Expand Up @@ -205,7 +205,7 @@ async function deploy(keypair, client, supportedContract, config, chain, options
};

// Execute post-deployment function
const executePostDeploymentFn = PACKAGE_MAPPING.POST_DEPLOY_FUNCTIONS[packageName];
const executePostDeploymentFn = PACKAGE_CONFIGS.postDeployFunctions[packageName];
await executePostDeploymentFn(published, keypair, client, config, chain, options);

printInfo(`${packageName} Configuration Updated`, JSON.stringify(chain.contracts[packageName], null, 2));
Expand Down Expand Up @@ -284,7 +284,7 @@ const addDeployOptions = (program) => {
const packageName = program.name();

// Find the corresponding options for the package
const options = PACKAGE_MAPPING.CMD_OPTIONS[packageName]();
const options = PACKAGE_CONFIGS.cmdOptions[packageName]();

// Add the options to the program
options.forEach((option) => program.addOption(option));
Expand Down

0 comments on commit 93e0b1e

Please sign in to comment.