From a72fe380b05dbddfb9fa506d5b124119b67ab8d5 Mon Sep 17 00:00:00 2001 From: Dawn <13477199767@163.com> Date: Thu, 28 Nov 2024 09:21:32 +0800 Subject: [PATCH 1/2] test: Testing on Testnet3 using 'https://rgbpp.testnet3.awesomeckb.xyz' --- .github/workflows/integration-test.yaml | 12 ++++++------ .github/workflows/test.yaml | 4 ++-- tests/rgbpp/env.ts | 2 +- tests/rgbpp/shared/prepare-utxo.ts | 2 +- tests/rgbpp/spore/4-transfer-spore.ts | 2 +- tests/rgbpp/spore/5-leap-spore-to-ckb.ts | 2 +- tests/rgbpp/spore/launch/2-create-cluster.ts | 2 +- tests/rgbpp/spore/launch/3-create-spores.ts | 2 +- tests/rgbpp/xudt/2-btc-transfer.ts | 2 +- tests/rgbpp/xudt/3-btc-leap-ckb.ts | 2 +- .../xudt/btc-transfer-all/1-btc-transfer-all.ts | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index efc0156b..1f0a74c3 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -49,9 +49,9 @@ jobs: if: ${{ matrix.env_set == 'xudt' }} run: pnpm run integration:xudt env: - VITE_SERVICE_URL: https://api.signet.rgbpp.io - VITE_SERVICE_TOKEN: ${{ secrets.SIGNET_SERVICE_TOKEN }} - VITE_SERVICE_ORIGIN: https://api.signet.rgbpp.io + VITE_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} + VITE_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz INTEGRATION_CKB_PRIVATE_KEY: ${{ secrets.INTEGRATION_CKB_PRIVATE_KEY }} INTEGRATION_BTC_PRIVATE_KEY: ${{ secrets.INTEGRATION_BTC_PRIVATE_KEY }} @@ -60,8 +60,8 @@ jobs: if: ${{ matrix.env_set == 'spore' }} run: pnpm run integration:spore env: - VITE_SERVICE_URL: https://api.signet.rgbpp.io - VITE_SERVICE_TOKEN: ${{ secrets.SIGNET_SERVICE_TOKEN }} - VITE_SERVICE_ORIGIN: https://api.signet.rgbpp.io + VITE_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} + VITE_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz INTEGRATION_CKB_PRIVATE_KEY: ${{ secrets.INTEGRATION_CKB_SPORE_PRIVATE_KEY }} INTEGRATION_BTC_PRIVATE_KEY: ${{ secrets.INTEGRATION_BTC_SPORE_PRIVATE_KEY }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d4663105..c4bcc40e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -54,9 +54,9 @@ jobs: env: VITE_CKB_NODE_URL: https://testnet.ckb.dev/rpc VITE_CKB_INDEXER_URL: https://testnet.ckb.dev/indexer - VITE_BTC_SERVICE_URL: https://btc-assets-api.testnet.mibao.pro + VITE_BTC_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz VITE_BTC_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} - VITE_BTC_SERVICE_ORIGIN: https://btc-assets-api.testnet.mibao.pro + VITE_BTC_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz - name: Run unit tests for the rgbpp-sdk-service run: pnpm run test:service diff --git a/tests/rgbpp/env.ts b/tests/rgbpp/env.ts index 6a4ba5f7..030a9aa1 100644 --- a/tests/rgbpp/env.ts +++ b/tests/rgbpp/env.ts @@ -15,7 +15,7 @@ dotenv.config({ path: __dirname + '/.env' }); export const isMainnet = false; -export const BTC_TESTNET_TYPE = 'Signet'; +export const BTC_TESTNET_TYPE = 'Testnet3'; export const collector = new Collector({ ckbNodeUrl: 'https://testnet.ckb.dev/rpc', diff --git a/tests/rgbpp/shared/prepare-utxo.ts b/tests/rgbpp/shared/prepare-utxo.ts index fd41ed02..6f68e39f 100644 --- a/tests/rgbpp/shared/prepare-utxo.ts +++ b/tests/rgbpp/shared/prepare-utxo.ts @@ -30,7 +30,7 @@ const prepareUtxo = async (index: string | number) => { console.log(tx.toHex()); const { txid: btcTxId } = await btcService.sendBtcTransaction(tx.toHex()); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); writeStepLog(String(index), { txid: btcTxId, diff --git a/tests/rgbpp/spore/4-transfer-spore.ts b/tests/rgbpp/spore/4-transfer-spore.ts index c6949a63..2e979c5e 100644 --- a/tests/rgbpp/spore/4-transfer-spore.ts +++ b/tests/rgbpp/spore/4-transfer-spore.ts @@ -53,7 +53,7 @@ const transferSpore = async ({ sporeRgbppLockArgs, toBtcAddress, sporeTypeArgs } const { txId: btcTxId } = await signAndSendPsbt(psbt, btcAccount, btcService); console.log('BTC TxId: ', btcTxId); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); await btcService.sendRgbppCkbTransaction({ btc_txid: btcTxId, ckb_virtual_result: ckbVirtualTxResult }); diff --git a/tests/rgbpp/spore/5-leap-spore-to-ckb.ts b/tests/rgbpp/spore/5-leap-spore-to-ckb.ts index 83b72f7b..23679d0b 100644 --- a/tests/rgbpp/spore/5-leap-spore-to-ckb.ts +++ b/tests/rgbpp/spore/5-leap-spore-to-ckb.ts @@ -54,7 +54,7 @@ const leapSporeFromBtcToCkb = async ({ sporeRgbppLockArgs, toCkbAddress, sporeTy const { txId: btcTxId } = await signAndSendPsbt(psbt, btcAccount, btcService); console.log('BTC TxId: ', btcTxId); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); await btcService.sendRgbppCkbTransaction({ btc_txid: btcTxId, ckb_virtual_result: ckbVirtualTxResult }); diff --git a/tests/rgbpp/spore/launch/2-create-cluster.ts b/tests/rgbpp/spore/launch/2-create-cluster.ts index 38719a58..20094f22 100644 --- a/tests/rgbpp/spore/launch/2-create-cluster.ts +++ b/tests/rgbpp/spore/launch/2-create-cluster.ts @@ -60,7 +60,7 @@ const createCluster = async ({ ownerRgbppLockArgs }: { ownerRgbppLockArgs: strin index: 1, }); console.log('BTC TxId: ', btcTxId); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); const interval = setInterval(async () => { try { diff --git a/tests/rgbpp/spore/launch/3-create-spores.ts b/tests/rgbpp/spore/launch/3-create-spores.ts index ab705a8f..e38ef233 100644 --- a/tests/rgbpp/spore/launch/3-create-spores.ts +++ b/tests/rgbpp/spore/launch/3-create-spores.ts @@ -67,7 +67,7 @@ const createSpores = async ({ clusterRgbppLockArgs, receivers }: SporeCreatePara txid: btcTxId, }); console.log('BTC TxId: ', btcTxId); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); const interval = setInterval(async () => { try { diff --git a/tests/rgbpp/xudt/2-btc-transfer.ts b/tests/rgbpp/xudt/2-btc-transfer.ts index a91dcd9d..09058437 100644 --- a/tests/rgbpp/xudt/2-btc-transfer.ts +++ b/tests/rgbpp/xudt/2-btc-transfer.ts @@ -45,7 +45,7 @@ const transfer = async ({ rgbppLockArgsList, toBtcAddress, xudtTypeArgs, transfe const psbt = bitcoin.Psbt.fromHex(btcPsbtHex); const { txId: btcTxId } = await signAndSendPsbt(psbt, btcAccount, btcService); console.log(`BTC ${BTC_TESTNET_TYPE} TxId: ${btcTxId}`); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); writeStepLog('transfer-id', { txid: btcTxId, diff --git a/tests/rgbpp/xudt/3-btc-leap-ckb.ts b/tests/rgbpp/xudt/3-btc-leap-ckb.ts index efe38d90..08b35543 100644 --- a/tests/rgbpp/xudt/3-btc-leap-ckb.ts +++ b/tests/rgbpp/xudt/3-btc-leap-ckb.ts @@ -55,7 +55,7 @@ const leapFromBtcToCKB = async ({ rgbppLockArgsList, toCkbAddress, xudtTypeArgs, const { txId: btcTxId } = await signAndSendPsbt(psbt, btcAccount, btcService); console.log(`BTC ${BTC_TESTNET_TYPE} TxId: ${btcTxId}`); - console.log(`explorer: https://mempool.space/signet/tx/${btcTxId}`); + console.log(`explorer: https://mempool.space/testnet/tx/${btcTxId}`); await btcService.sendRgbppCkbTransaction({ btc_txid: btcTxId, ckb_virtual_result: ckbVirtualTxResult }); diff --git a/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts b/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts index f9e1d166..9e0f0777 100644 --- a/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts +++ b/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts @@ -66,7 +66,7 @@ const rgbppTransferAllTxs = async ({ xudtTypeArgs, fromAddress, toAddress }: Tes const successfulTxIds = sentGroups .filter((group) => group.btcTxId) - .map((group) => `https://mempool.space/signet/tx/${group.btcTxId}`); + .map((group) => `https://mempool.space/testnet/tx/${group.btcTxId}`); console.log('Successful Transactions:', successfulTxIds.join('\n')); From 31321f7b2be975c10dfd501f86cf5a9e06207319 Mon Sep 17 00:00:00 2001 From: Dawn <13477199767@163.com> Date: Wed, 4 Dec 2024 22:23:34 +0800 Subject: [PATCH 2/2] test: Use https://api.testnet.rgbpp.io for testing --- .github/workflows/integration-test.yaml | 8 ++++---- .github/workflows/test.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 1f0a74c3..ff7aa626 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -49,9 +49,9 @@ jobs: if: ${{ matrix.env_set == 'xudt' }} run: pnpm run integration:xudt env: - VITE_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_URL: https://api.testnet.rgbpp.io VITE_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} - VITE_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_ORIGIN: https://api.testnet.rgbpp.io INTEGRATION_CKB_PRIVATE_KEY: ${{ secrets.INTEGRATION_CKB_PRIVATE_KEY }} INTEGRATION_BTC_PRIVATE_KEY: ${{ secrets.INTEGRATION_BTC_PRIVATE_KEY }} @@ -60,8 +60,8 @@ jobs: if: ${{ matrix.env_set == 'spore' }} run: pnpm run integration:spore env: - VITE_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_URL: https://api.testnet.rgbpp.io VITE_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} - VITE_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz + VITE_SERVICE_ORIGIN: https://api.testnet.rgbpp.io INTEGRATION_CKB_PRIVATE_KEY: ${{ secrets.INTEGRATION_CKB_SPORE_PRIVATE_KEY }} INTEGRATION_BTC_PRIVATE_KEY: ${{ secrets.INTEGRATION_BTC_SPORE_PRIVATE_KEY }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c4bcc40e..60838707 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -54,9 +54,9 @@ jobs: env: VITE_CKB_NODE_URL: https://testnet.ckb.dev/rpc VITE_CKB_INDEXER_URL: https://testnet.ckb.dev/indexer - VITE_BTC_SERVICE_URL: https://rgbpp.testnet3.awesomeckb.xyz + VITE_BTC_SERVICE_URL: https://api.testnet.rgbpp.io VITE_BTC_SERVICE_TOKEN: ${{ secrets.TESTNET_SERVICE_TOKEN }} - VITE_BTC_SERVICE_ORIGIN: https://rgbpp.testnet3.awesomeckb.xyz + VITE_BTC_SERVICE_ORIGIN: https://api.testnet.rgbpp.io - name: Run unit tests for the rgbpp-sdk-service run: pnpm run test:service