diff --git a/.github/workflows/suins-build-tx.yaml b/.github/workflows/suins-build-tx.yaml index 43ffc738..b66864d1 100644 --- a/.github/workflows/suins-build-tx.yaml +++ b/.github/workflows/suins-build-tx.yaml @@ -11,6 +11,7 @@ on: - Multi Purpose Operation - Profits to Treasury - Transfer Reserved Names + - Create Deepbook Pools sui_tools_image: description: 'image reference of sui_tools' default: 'mysten/sui-tools:mainnet' @@ -102,6 +103,16 @@ jobs: run: | cd scripts && pnpm ts-node transactions/discount-and-auction-profits.ts + - name: Create Deepbook Pools + if: ${{ inputs.transaction_type == 'Create Deepbook Pools' }} + env: + NODE_ENV: production + GAS_OBJECT: ${{ inputs.gas_object_id }} + NETWORK: mainnet + ORIGIN: gh_action + run: | + cd scripts && pnpm create-deepbook-pools + - name: Show Transaction Data (To sign) run: | cat scripts/tx/tx-data.txt diff --git a/scripts/transactions/deepbook/create_pools.ts b/scripts/transactions/deepbook/create_pools.ts index d2a6fcfd..2b06fd31 100644 --- a/scripts/transactions/deepbook/create_pools.ts +++ b/scripts/transactions/deepbook/create_pools.ts @@ -9,17 +9,10 @@ import { prepareMultisigTx, signAndExecute } from '../../utils/utils'; dotenv.config(); -const SUI = '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'; -const USDY = '0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY'; -const USDC = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN'; -// const WUSDCETH = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN'; -// const WBTC = '0xbc3a676894871284b3ccfb2eec66f428612000e2a6e6d23f592ce8833c27c973::coin::COIN'; -// const WETH = '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN'; -// const USDT = '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN'; -// const TESTNET_COIN = -// '0x0c5f16ebb22a354ccb8f4dc163df0e729d0d37b565b4178046ea342ea0a93391::gold::GOLD'; -// const TESTNET_SUI = '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'; -// const TESTNET_DAI = '0x700de8dea1aac1de7531e9d20fc2568b12d74369f91b7fad3abc1c4f40396e52::dai::DAI'; +// const SUI = '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'; +// const USDY = '0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY'; +const WUSDC = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN'; +const USDC = '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC'; export const CREATION_FEE = 100 * 1e9; export const PACKAGE_ID = '0xdee9'; @@ -40,7 +33,7 @@ const setup = async (network: Network) => { // Create USDY / USDC txb.moveCall({ - typeArguments: [USDY, USDC], + typeArguments: [WUSDC, USDC], target: `${PACKAGE_ID}::${MODULE_CLOB}::create_customized_pool`, arguments: [ txb.pure(100000), // tick @@ -51,21 +44,6 @@ const setup = async (network: Network) => { ], }); - const [coin2] = txb.splitCoins(txb.gas, [txb.pure(CREATION_FEE)]); - - // Create SUI / USDY - txb.moveCall({ - typeArguments: [SUI, USDY], - target: `${PACKAGE_ID}::${MODULE_CLOB}::create_customized_pool`, - arguments: [ - txb.pure(100), // tick - txb.pure(100000000), // lot - txb.pure(DEFAULT_TAKER_FEE), // taker fee - txb.pure(DEFAULT_MAKER_FEE), // maker rebate - coin2, // creation fee - ], - }); - // for mainnet, we prepare the multi-sig tx. if (network === 'mainnet') return prepareMultisigTx(txb, 'mainnet');