Skip to content

Commit

Permalink
feat: update the sui operator script to match the new simplified patt…
Browse files Browse the repository at this point in the history
…ern (#359)

Co-authored-by: npty <[email protected]>
  • Loading branch information
Foivos and npty authored Sep 4, 2024
1 parent 328e33e commit e91aa78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/axelarnetwork/axelar-contract-deployments#readme",
"dependencies": {
"@axelar-network/axelar-cgp-solidity": "6.3.1",
"@axelar-network/axelar-cgp-sui": "^0.5.0",
"@axelar-network/axelar-cgp-sui": "^0.6.0",
"@axelar-network/axelar-gmp-sdk-solidity": "5.10.0",
"@axelar-network/interchain-token-service": "1.2.4",
"@cosmjs/cosmwasm-stargate": "^0.32.1",
Expand Down
4 changes: 2 additions & 2 deletions sui/operators.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function operatorMoveCall(contractConfig, gasServiceConfig, operatorCapId, tx, m
const operatorId = contractConfig.objects.Operators;
const gasCollectorCapId = gasServiceConfig.objects.GasCollectorCap;

const [cap, loanedCap] = tx.moveCall({
const [cap, borrowObj] = tx.moveCall({
target: `${contractConfig.address}::operators::loan_cap`,
arguments: [tx.object(operatorId), tx.object(operatorCapId), tx.object(gasCollectorCapId)],
typeArguments: [`${gasServiceConfig.address}::gas_service::GasCollectorCap`],
Expand All @@ -25,7 +25,7 @@ function operatorMoveCall(contractConfig, gasServiceConfig, operatorCapId, tx, m

tx.moveCall({
target: `${contractConfig.address}::operators::restore_cap`,
arguments: [tx.object(operatorId), tx.object(operatorCapId), tx.object(gasCollectorCapId), cap, loanedCap],
arguments: [tx.object(operatorId), tx.object(operatorCapId), cap, borrowObj],
typeArguments: [`${gasServiceConfig.address}::gas_service::GasCollectorCap`],
});

Expand Down

0 comments on commit e91aa78

Please sign in to comment.