From 2d1c834a513f439b198d105011bdb8385d39eb3b Mon Sep 17 00:00:00 2001 From: Shook <44739165+ShookLyngs@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:45:44 +0800 Subject: [PATCH] refactor: calculate XUDT amount separately in AssetSummarizer with detailed XUDT related fields (#275) --- .changeset/hot-needles-chew.md | 5 + .../src/rgbpp/summary/asset-summarizer.ts | 81 ++++--- .../rgbpp/src/rgbpp/xudt/btc-transfer-all.ts | 6 +- packages/rgbpp/tests/RgbppXudt.test.ts | 16 +- .../__snapshots__/RgbppXudt.test.ts.snap | 207 ++++++++++++++--- .../tests/mocked/50-included-41-excluded.ts | 219 +++++++++++++++--- 6 files changed, 433 insertions(+), 101 deletions(-) create mode 100644 .changeset/hot-needles-chew.md diff --git a/.changeset/hot-needles-chew.md b/.changeset/hot-needles-chew.md new file mode 100644 index 00000000..41078800 --- /dev/null +++ b/.changeset/hot-needles-chew.md @@ -0,0 +1,5 @@ +--- +'rgbpp': patch +--- + +Calculate XUDT amount separately in AssetSummarizer diff --git a/packages/rgbpp/src/rgbpp/summary/asset-summarizer.ts b/packages/rgbpp/src/rgbpp/summary/asset-summarizer.ts index e508e903..83a0ed72 100644 --- a/packages/rgbpp/src/rgbpp/summary/asset-summarizer.ts +++ b/packages/rgbpp/src/rgbpp/summary/asset-summarizer.ts @@ -1,8 +1,13 @@ import { Cell } from '@ckb-lumos/base'; import { Utxo, encodeUtxoId } from '@rgbpp-sdk/btc'; -import { leToU128, encodeCellId } from '@rgbpp-sdk/ckb'; +import { leToU128, encodeCellId, isUDTTypeSupported } from '@rgbpp-sdk/ckb'; -export interface AssetSummary { +export interface AssetGroup { + utxo: Utxo; + cells: Cell[]; +} + +export interface XudtAssetSummary { amount: bigint; utxoCount: number; cellCount: number; @@ -11,55 +16,68 @@ export interface AssetSummary { export interface AssetGroupSummary { utxoId: string; cellIds: string[]; - // The key of the assets record is the `xudtTypeArgs` (the unique identifier for the asset type) - assets: Record; // Record + xudtCellIds: string[]; + xudtAssets: Record; // Record } export interface TransactionGroupSummary { utxoCount: number; cellCount: number; + xudtCellCount: number; utxoIds: string[]; cellIds: string[]; - assets: Record; + xudtCellIds: string[]; + xudtAssets: Record; // Record } export class AssetSummarizer { groups: AssetGroupSummary[] = []; - constructor() {} + constructor(public isMainnet: boolean) {} addGroup(utxo: Utxo, cells: Cell[]): AssetGroupSummary { const utxoId = encodeUtxoId(utxo.txid, utxo.vout); - const assets: Record = {}; - const cellIds: string[] = []; + const cellIds: string[] = []; + const xudtCellIds: string[] = []; + const xudtAssets: Record = {}; for (const cell of cells) { - cellIds.push(encodeCellId(cell.outPoint!.txHash, cell.outPoint!.index)); - const xudtTypeArgs = cell.cellOutput.type?.args ?? 'empty'; - const amount = leToU128(cell.data.substring(0, 34)); - if (assets[xudtTypeArgs] === undefined) { - assets[xudtTypeArgs] = { - utxoCount: 1, - cellCount: 0, - amount: 0n, - }; - } + const cellId = encodeCellId(cell.outPoint!.txHash, cell.outPoint!.index); + cellIds.push(cellId); + + const isXudt = !!cell.cellOutput.type && isUDTTypeSupported(cell.cellOutput.type, this.isMainnet); + if (isXudt) { + // If the cell type is a supported xUDT type, record its asset information + const xudtTypeArgs = cell.cellOutput.type?.args ?? 'empty'; + const amount = leToU128(cell.data.substring(0, 34)); + if (xudtAssets[xudtTypeArgs] === undefined) { + xudtAssets[xudtTypeArgs] = { + utxoCount: 1, + cellCount: 0, + amount: 0n, + }; + } - assets[xudtTypeArgs]!.cellCount += 1; - assets[xudtTypeArgs]!.amount += amount; + xudtCellIds.push(cellId); + xudtAssets[xudtTypeArgs]!.cellCount += 1; + xudtAssets[xudtTypeArgs]!.amount += amount; + } else { + // TODO: if the cell type is empty or is not xUDT, how to handle/record its info? + } } const result: AssetGroupSummary = { utxoId, cellIds, - assets, + xudtCellIds, + xudtAssets, }; this.groups.push(result); return result; } - addGroups(groups: { utxo: Utxo; cells: Cell[] }[]): TransactionGroupSummary { + addGroups(groups: AssetGroup[]): TransactionGroupSummary { const groupResults = groups.map((group) => this.addGroup(group.utxo, group.cells)); return this.summarizeGroups(groupResults); } @@ -76,10 +94,11 @@ export class AssetSummarizer { const targetGroups = groups ?? this.groups; const utxoIds = targetGroups.map((summary) => summary.utxoId); const cellIds = targetGroups.flatMap((summary) => summary.cellIds); - const assets = targetGroups.reduce( + const xudtCellIds = targetGroups.flatMap((summary) => summary.xudtCellIds); + const xudtAssets = targetGroups.reduce( (result, summary) => { - for (const xudtTypeArgs in summary.assets) { - if (result[xudtTypeArgs] === undefined) { + for (const xudtTypeArgs in summary.xudtAssets) { + if (!result[xudtTypeArgs]) { result[xudtTypeArgs] = { utxoCount: 0, cellCount: 0, @@ -87,21 +106,23 @@ export class AssetSummarizer { }; } - result[xudtTypeArgs]!.utxoCount += summary.assets[xudtTypeArgs]!.utxoCount; - result[xudtTypeArgs]!.cellCount += summary.assets[xudtTypeArgs]!.cellCount; - result[xudtTypeArgs]!.amount += summary.assets[xudtTypeArgs]!.amount; + result[xudtTypeArgs]!.utxoCount += summary.xudtAssets[xudtTypeArgs]!.utxoCount; + result[xudtTypeArgs]!.cellCount += summary.xudtAssets[xudtTypeArgs]!.cellCount; + result[xudtTypeArgs]!.amount += summary.xudtAssets[xudtTypeArgs]!.amount; } return result; }, - {} as Record, + {} as Record, ); return { utxoCount: utxoIds.length, cellCount: cellIds.length, + xudtCellCount: xudtCellIds.length, utxoIds, cellIds, - assets, + xudtCellIds, + xudtAssets, }; } } diff --git a/packages/rgbpp/src/rgbpp/xudt/btc-transfer-all.ts b/packages/rgbpp/src/rgbpp/xudt/btc-transfer-all.ts index 72c96840..6eae4900 100644 --- a/packages/rgbpp/src/rgbpp/xudt/btc-transfer-all.ts +++ b/packages/rgbpp/src/rgbpp/xudt/btc-transfer-all.ts @@ -125,7 +125,7 @@ export async function buildRgbppTransferAllTxs(params: RgbppTransferAllTxsParams const groupedAssetGroups = mapGroupsByIndices(groupedByInputs.indices, (index) => rgbppGroups[index]!); // Construct transaction groups - const summarizer = new AssetSummarizer(); + const summarizer = new AssetSummarizer(isMainnet); const usedBtcUtxos: BaseOutput[] = []; const transactionGroups: RgbppTransferAllTxGroup[] = []; for (const assetGroups of groupedAssetGroups) { @@ -138,7 +138,7 @@ export async function buildRgbppTransferAllTxs(params: RgbppTransferAllTxsParams ); // Props for constructing CKB_VTX - const xudtAmount = groupSummary.assets[params.ckb.xudtTypeArgs]!.amount; + const xudtAmount = groupSummary.xudtAssets[params.ckb.xudtTypeArgs]!.amount; const lockArgsList = groupSummary.utxoIds.map((utxoId) => { const output = decodeUtxoId(utxoId)!; return buildRgbppLockArgs(output.vout, output.txid); @@ -221,7 +221,7 @@ export async function buildRgbppTransferAllTxs(params: RgbppTransferAllTxsParams } // Generate result - const excludedSummarizer = new AssetSummarizer(); + const excludedSummarizer = new AssetSummarizer(isMainnet); excludedSummarizer.addGroups( [...invalidUtxoIds].map((utxoId) => ({ utxo: utxoMap.get(utxoId)!, diff --git a/packages/rgbpp/tests/RgbppXudt.test.ts b/packages/rgbpp/tests/RgbppXudt.test.ts index 8af18892..ac333179 100644 --- a/packages/rgbpp/tests/RgbppXudt.test.ts +++ b/packages/rgbpp/tests/RgbppXudt.test.ts @@ -98,16 +98,16 @@ describe('RgbppXudt', () => { }); console.log('result.transactions.length', result.transactions.length); - console.log('result.summary.included.assets', result.summary.included.assets); - console.log('result.summary.excluded.assets', result.summary.excluded.assets); + console.log('result.summary.included.assets', result.summary.included.xudtAssets); + console.log('result.summary.excluded.assets', result.summary.excluded.xudtAssets); - expect(result.summary.included.assets).toHaveProperty(xudtTypeArgs); - expect(result.summary.included.assets[xudtTypeArgs].cellCount).toEqual(50); - expect(result.summary.included.assets[xudtTypeArgs].utxoCount).toEqual(50); + expect(result.summary.included.xudtAssets).toHaveProperty(xudtTypeArgs); + expect(result.summary.included.xudtAssets[xudtTypeArgs].cellCount).toEqual(50); + expect(result.summary.included.xudtAssets[xudtTypeArgs].utxoCount).toEqual(50); - expect(result.summary.excluded.assets).toHaveProperty(xudtTypeArgs); - expect(result.summary.excluded.assets[xudtTypeArgs].cellCount).toEqual(41); - expect(result.summary.excluded.assets[xudtTypeArgs].utxoCount).toEqual(1); + expect(result.summary.excluded.xudtAssets).toHaveProperty(xudtTypeArgs); + expect(result.summary.excluded.xudtAssets[xudtTypeArgs].cellCount).toEqual(41); + expect(result.summary.excluded.xudtAssets[xudtTypeArgs].utxoCount).toEqual(1); expect(result.transactions).toHaveLength(2); expect(result).toMatchSnapshot(); diff --git a/packages/rgbpp/tests/__snapshots__/RgbppXudt.test.ts.snap b/packages/rgbpp/tests/__snapshots__/RgbppXudt.test.ts.snap index bbc32119..dca3c156 100644 --- a/packages/rgbpp/tests/__snapshots__/RgbppXudt.test.ts.snap +++ b/packages/rgbpp/tests/__snapshots__/RgbppXudt.test.ts.snap @@ -4,13 +4,6 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded { "summary": { "excluded": { - "assets": { - "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { - "amount": 4100000000n, - "cellCount": 41, - "utxoCount": 1, - }, - }, "cellCount": 41, "cellIds": [ "0x00f43b843640fab7c9951a7931632e6ade6ef3337f89489b1c2b400793ece665:0x0", @@ -59,15 +52,59 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded "utxoIds": [ "69eea91d69b850abd92338fa4f0c9a11d0ed68f74bf5201cb7424dc49506af38:0", ], - }, - "included": { - "assets": { + "xudtAssets": { "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { - "amount": 50000000000n, - "cellCount": 50, - "utxoCount": 50, + "amount": 4100000000n, + "cellCount": 41, + "utxoCount": 1, }, }, + "xudtCellCount": 41, + "xudtCellIds": [ + "0x00f43b843640fab7c9951a7931632e6ade6ef3337f89489b1c2b400793ece665:0x0", + "0xa398426747fb052d0832a3296ad89b72253428b6caa19e8be14d4fcb0befeb2d:0x0", + "0xc657c0531c349e0602397f6369a462bbd3ec84efcd8876e1ccdc0e6f0201a8b0:0x0", + "0xde2c71de17ebd73b1925805754b1fd2c2cd40b27d5de3edf23812b270439b162:0x0", + "0xd2466255b2b05a229d3bb9c5f9f1b3def078283cdfd9cef1645ef1046c9047d5:0x0", + "0xd64f32b7a5daf5c5fd7f0cf0ba76d9263383265fbc706b9043f344afd5fe00e8:0x0", + "0x16bb55a5c1fd0d6a7d7e7b60892da24c2a33c27041fbf8ada93aab691a311f9b:0x0", + "0xede3544e671ac287ff67ddea7ce99e7d0afafac5f2889f4f8b1c6c1cd09dcbcc:0x0", + "0x67cad749783b7d8595b7e5818c08eb380575c64badbd792443f36ae5888ceaff:0x0", + "0xcaacf9b9b495e1c811598e86d904768162914b1aca7c3537cdd1af2cbe640303:0x0", + "0x85a5fa2ba570c35fd22e132b3f6a0ad03b8c151d0fd82abdbc8e4c3845615660:0x0", + "0x62cb0ad5fdcfdfe819135f970604b0c7e7ba6761544d2db2f6e093e8dd50734f:0x0", + "0x965155d63fa8c9fb00cebb360753911efec9718b0db13f64d7dddd45edc53ab0:0x0", + "0xea07337354751ba2068e9fb1f56c0b7cd5b4f8b96392387cf4d8c32b39092067:0x0", + "0xcf8ca99732c62de85820c8670e4257a035dd1c96af440caaa3c60e1fb30a064d:0x0", + "0x9b661830567bc2b2917d9295bccac8409472c181623091bb80cd15d242256d5a:0x0", + "0x3c86f4acd287c73551e1ecba3787c139158d9756e5127a1540b979167beb37e3:0x0", + "0x700ac6b78787cfc2e446ecaef1e7885f05d8138c1b3211d1eed3df6b745e0047:0x0", + "0x2ed6aca14bdf96fa4174b345ae1840a1c31ac41be4fd4fafa4550b0b9bb94a04:0x0", + "0x7dfaffb686d86face0c9ae1b7cbd938627ed7f34a7e020465f7bd2d0ca0aefa5:0x0", + "0xd25420447d02822f43dc7a15ffd9dd00ee3bfe72ef10227256c9878e327ea4c0:0x0", + "0x5f20ab1a846b0018e91b17d364d31684d1f69c0226e0b71c1b8dc87684411f8a:0x0", + "0xbccd8a4febd86e65f2508d87b787c791144312c62524d7425b2736f383f20d15:0x0", + "0xa8aa116e9420c20d4513fad4f9c43e1b8578f77822345b67ad8553d7a4700b00:0x0", + "0x8a2c1dbea8b03b80d27486b912a4466077e9774321580b96999a5c2b47e8a9c4:0x0", + "0x1426d8ddd17d048900ab6649c8831ea0597020f8a3f391db33012faf3f426fad:0x0", + "0x35b073cfad16bba683b74c0306c00f0a0620fd8e27db7151673dcdbd0857a750:0x0", + "0xc33e4d35bb9d899f71cbbd2d0f9f8f19538fbd16afcef5b6843d4b5eddd743db:0x0", + "0x4976ed59d93bbedcfc1a2822c0d65774060fa8cb4c0b0d41bed13054c3ccf7fb:0x0", + "0xdaa57218ca7f632353ce3736ca0d46bbf80553d4b67843d73ac6037e8ddb7ff0:0x0", + "0x103f9e99efddbb86171c87cabcd1a53b5e09df7863c1b3d63bc6ce71361eaa5a:0x0", + "0x73068eb36a97ac7f35fd996761d4822a88afd3cf77252ab3b51966eadeb78491:0x0", + "0xec6d8bc79cd7e0d7353726a438aa9c4cffa4683363331549af30d2542704a556:0x0", + "0x05398d634a13a662dcbd1504fff11bcc12e287a779b1f35051997ad33ec2aa9f:0x0", + "0x2bc0dcb5bc6b2cc5ccd4022db998004de578242d6ceeff5303d81a16828ffed5:0x0", + "0x1976c37d6709fc5d128c1a1b547a598fdce892b4bcb54591d9dccf5f3f2fbb08:0x0", + "0xc3ea8f82ea187c4fcb0d69aee9f12cfd2cebd52e9fa4aae7c51f4dcbf4e22107:0x0", + "0xdb3f80f8e2e5f599e7a335f8da68791a87e94bb1042a20bbfef33f655aad0a21:0x0", + "0x3bac25553adcd0ce92577f8fdeda52212388cbe307a3e6564cf1d5ae6dba4121:0x0", + "0x3e7a84ff71358d30b6e4213cd5f5cf56bae03053a665bed68277a6fb5c852818:0x0", + "0xb0ffef5e6998ddc86019de4d90a035c3aceb17fbfcaabb6a225dd27533e8673b:0x0", + ], + }, + "included": { "cellCount": 50, "cellIds": [ "0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0", @@ -174,6 +211,66 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded "f1ee2c32debdbca6e0bdd654f3356501951e9fda7f288df62144583b38c5d6b6:0", "f6ce37f9d89597172566ae0b3e18edcb1c92011add8190e0b53b5caf9566aea1:0", ], + "xudtAssets": { + "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { + "amount": 50000000000n, + "cellCount": 50, + "utxoCount": 50, + }, + }, + "xudtCellCount": 50, + "xudtCellIds": [ + "0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0", + "0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0", + "0x2e2ef6a59efa324e51cdf48f769ed044701719a47de696197ab2d52b10b46f02:0x0", + "0x3ee4107480a679cfdc296dc05c8d71b27a68215a9d3991494e0c13d60ae13792:0x0", + "0xd1cfd6764c4aae04eebd0f9e5b69dccd2708194b1331b92adb88c3de5a96a9da:0x0", + "0x296b94918d48bf6a6a0c3ba8eb301472879060b6339d8ebb93fd59fcaa0fda62:0x0", + "0xa368465ce2b6b717312755fea8d95eb475fdd66f019cd67050c0c383409c0667:0x0", + "0xd8fcef10d92024e220bc314a216b9f1decca2f05138d6592a280ad3bb5c0d922:0x0", + "0xe7797d33ca22ebe3052b273307ccc4472ac57747dcb70d5249efea4957f04f73:0x0", + "0x2e4d2051d9d5182aa2d9d8360d55a9629e964a8a1562485f928963f39932563d:0x0", + "0x79f810935bf3ac47bc97c50c78527d71cacc9594ec148eeb294159f6ced0483b:0x0", + "0x27bf1271e34d3b89b8908302b1b52122cd4aabc9b05559c1f347ff1fdc943a12:0x0", + "0x5d573c5fb16adaa17c42c7936fcfd7105818e4ef4bc613d4b6062698182500a6:0x0", + "0x6204bf05f0b76e0f57eeda3e34773d0b75b9c8fbc4dec329b5a5e09b6fa418ee:0x0", + "0xad5be28bad16f4792cc0dc9375b96b74721aafa0383a978ec24ad2ced05cfd16:0x0", + "0x715a0ad3a91a8e88ae31998aa667e02c973da57f1a287e21dbe4dfcf9f133b65:0x0", + "0x83c92b4592a287cfa76b15c1d0dec0abd7f487b201a1720f3004d1d742a5e581:0x0", + "0xe763055974a3c1c58a9a8c6f14cd5d0251f26fbfc4f1dd86319411e8794f8889:0x0", + "0xe0732a33f99598399e0d1bdeaa6ee96b9f0fca39651626a30b0bafa883a12419:0x0", + "0xf8168a6392c0691293ec803cd599b3fbc631cf18ad9102dd35c6225f110ba29f:0x0", + "0xefff789561ce58884324454924e62c1567e70e835c657b54df9a636f95029722:0x0", + "0x21c7b033b9eb7eb4f4b28783a77447acc8a284b83dc99a353794175ee5c50de8:0x0", + "0x1414ed5987b243661f6f911fab762b08d84146be46e2950d3f7e20f13df1f6f6:0x0", + "0x418de4600629116373b24becdcab626f19d113a6093a75a5cef54a695714a20a:0x0", + "0xd223e96ee030c303c31d79710ea19c7347a04f4b44ca4551c3342ce119e86132:0x0", + "0xec2df4da6b567c7be7f698e1895be815626c6b5e504930d1c5b1431792465784:0x0", + "0xcac45b975c8c52ca6199f39de541c0c069556fd54640f4b2838946344f42ce6d:0x0", + "0x2f8b991d647b91c931eb32b224c5693991266ed10c89326795f5b71e22a57bea:0x0", + "0x1ba483627e1dc86c2054a9a7c3ff34df116b2446f1c3c8c0fc70e2f9daf63a1f:0x0", + "0xb65cf4b3f9705253dacc74a83589024e9f751ac3b2cef41d9dfe075b957c5477:0x0", + "0x9ffa6b826ed3ab1f5fa8f32ee743b4820682897b671dd96f4fea414e04ec3ecc:0x0", + "0xbd629504d74fda29a8b9187dc55a4a675c791d25a501862446c4c1d8a1ede2de:0x0", + "0xc26347679c6f9c321af89838cac070c3a87d4280ed0054fbdd46d94a20683a8e:0x0", + "0xedd3f3dde6f4253f32b4a24f3c95d9824f546732f51e67447580d3a590b1468e:0x0", + "0x30b3d64d1df36113707f0918d406c3d79482ecc8e22439121cebc458c8960fbe:0x0", + "0x6cac3ce5884577e922afe944e9bf05887e7ab3c847310eb79e6f39cd716cc307:0x0", + "0xbc2a834cbb5b40f5cb47bd3f328297ca851a0c0628be06b2d6a43423750ed0aa:0x0", + "0x75143c1c6e64b01d45122bfa5db70cc5dbb90e945e1c7c781c73363b5e3fb4e0:0x0", + "0x6fb324d629f69d1d011015325559bd1a3f58cd2bd0e2dce23b006ea85eade376:0x0", + "0xb5c70400545feef1c591c072b386e663805d984ecc90c9ebd282f39990a7cf17:0x0", + "0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0", + "0xd30143cc94d6fdbb656db10a7635e936929febebc9e1424d163ab36a9041e9ba:0x0", + "0x3b0d7d2072c86a2b6f72a1290a70c48f451c1f290adc207e063f8ca3f3edd2b0:0x0", + "0xd7d8aa87e70834cbf1d4cf95767381471bdfd16b2d9a916d0927b7b81c3d134f:0x0", + "0xa4c06a0f9be53d5416f8fe34d7be1a5229a8a2515e3814b6b1ebf18ee11fd032:0x0", + "0x2ac48fd1b5db05851b756b6536f63f080598a8962ca365e20991b86ae547d456:0x0", + "0xa01db6b79bd41ab7adf4b6f4e10b9a70e14489c109b218d3c6f24770eb5d3000:0x0", + "0x4fcac5d05e7cbfc7352ade62e44f78cca09450c419fb39b3af05f94f02a48210:0x0", + "0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0", + "0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0", + ], }, }, "transactions": [ @@ -560,13 +657,6 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded }, }, "summary": { - "assets": { - "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { - "amount": 40000000000n, - "cellCount": 40, - "utxoCount": 40, - }, - }, "cellCount": 40, "cellIds": [ "0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0", @@ -653,6 +743,56 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded "8a81a8dc324d22499562e416a884e7bf9a55f5de7b28ee454ad3e76fa6597283:0", "ce808ec46872008364568e931b4fe484e0e8ea3c154770adb10f5c6b2b3ec286:0", ], + "xudtAssets": { + "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { + "amount": 40000000000n, + "cellCount": 40, + "utxoCount": 40, + }, + }, + "xudtCellCount": 40, + "xudtCellIds": [ + "0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0", + "0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0", + "0x2e2ef6a59efa324e51cdf48f769ed044701719a47de696197ab2d52b10b46f02:0x0", + "0x3ee4107480a679cfdc296dc05c8d71b27a68215a9d3991494e0c13d60ae13792:0x0", + "0xd1cfd6764c4aae04eebd0f9e5b69dccd2708194b1331b92adb88c3de5a96a9da:0x0", + "0x296b94918d48bf6a6a0c3ba8eb301472879060b6339d8ebb93fd59fcaa0fda62:0x0", + "0xa368465ce2b6b717312755fea8d95eb475fdd66f019cd67050c0c383409c0667:0x0", + "0xd8fcef10d92024e220bc314a216b9f1decca2f05138d6592a280ad3bb5c0d922:0x0", + "0xe7797d33ca22ebe3052b273307ccc4472ac57747dcb70d5249efea4957f04f73:0x0", + "0x2e4d2051d9d5182aa2d9d8360d55a9629e964a8a1562485f928963f39932563d:0x0", + "0x79f810935bf3ac47bc97c50c78527d71cacc9594ec148eeb294159f6ced0483b:0x0", + "0x27bf1271e34d3b89b8908302b1b52122cd4aabc9b05559c1f347ff1fdc943a12:0x0", + "0x5d573c5fb16adaa17c42c7936fcfd7105818e4ef4bc613d4b6062698182500a6:0x0", + "0x6204bf05f0b76e0f57eeda3e34773d0b75b9c8fbc4dec329b5a5e09b6fa418ee:0x0", + "0xad5be28bad16f4792cc0dc9375b96b74721aafa0383a978ec24ad2ced05cfd16:0x0", + "0x715a0ad3a91a8e88ae31998aa667e02c973da57f1a287e21dbe4dfcf9f133b65:0x0", + "0x83c92b4592a287cfa76b15c1d0dec0abd7f487b201a1720f3004d1d742a5e581:0x0", + "0xe763055974a3c1c58a9a8c6f14cd5d0251f26fbfc4f1dd86319411e8794f8889:0x0", + "0xe0732a33f99598399e0d1bdeaa6ee96b9f0fca39651626a30b0bafa883a12419:0x0", + "0xf8168a6392c0691293ec803cd599b3fbc631cf18ad9102dd35c6225f110ba29f:0x0", + "0xefff789561ce58884324454924e62c1567e70e835c657b54df9a636f95029722:0x0", + "0x21c7b033b9eb7eb4f4b28783a77447acc8a284b83dc99a353794175ee5c50de8:0x0", + "0x1414ed5987b243661f6f911fab762b08d84146be46e2950d3f7e20f13df1f6f6:0x0", + "0x418de4600629116373b24becdcab626f19d113a6093a75a5cef54a695714a20a:0x0", + "0xd223e96ee030c303c31d79710ea19c7347a04f4b44ca4551c3342ce119e86132:0x0", + "0xec2df4da6b567c7be7f698e1895be815626c6b5e504930d1c5b1431792465784:0x0", + "0xcac45b975c8c52ca6199f39de541c0c069556fd54640f4b2838946344f42ce6d:0x0", + "0x2f8b991d647b91c931eb32b224c5693991266ed10c89326795f5b71e22a57bea:0x0", + "0x1ba483627e1dc86c2054a9a7c3ff34df116b2446f1c3c8c0fc70e2f9daf63a1f:0x0", + "0xb65cf4b3f9705253dacc74a83589024e9f751ac3b2cef41d9dfe075b957c5477:0x0", + "0x9ffa6b826ed3ab1f5fa8f32ee743b4820682897b671dd96f4fea414e04ec3ecc:0x0", + "0xbd629504d74fda29a8b9187dc55a4a675c791d25a501862446c4c1d8a1ede2de:0x0", + "0xc26347679c6f9c321af89838cac070c3a87d4280ed0054fbdd46d94a20683a8e:0x0", + "0xedd3f3dde6f4253f32b4a24f3c95d9824f546732f51e67447580d3a590b1468e:0x0", + "0x30b3d64d1df36113707f0918d406c3d79482ecc8e22439121cebc458c8960fbe:0x0", + "0x6cac3ce5884577e922afe944e9bf05887e7ab3c847310eb79e6f39cd716cc307:0x0", + "0xbc2a834cbb5b40f5cb47bd3f328297ca851a0c0628be06b2d6a43423750ed0aa:0x0", + "0x75143c1c6e64b01d45122bfa5db70cc5dbb90e945e1c7c781c73363b5e3fb4e0:0x0", + "0x6fb324d629f69d1d011015325559bd1a3f58cd2bd0e2dce23b006ea85eade376:0x0", + "0xb5c70400545feef1c591c072b386e663805d984ecc90c9ebd282f39990a7cf17:0x0", + ], }, }, { @@ -798,13 +938,6 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded }, }, "summary": { - "assets": { - "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { - "amount": 10000000000n, - "cellCount": 10, - "utxoCount": 10, - }, - }, "cellCount": 10, "cellIds": [ "0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0", @@ -831,6 +964,26 @@ exports[`RgbppXudt > buildRgbppTransferAllTxs() > 50 included cells, 41 excluded "f1ee2c32debdbca6e0bdd654f3356501951e9fda7f288df62144583b38c5d6b6:0", "f6ce37f9d89597172566ae0b3e18edcb1c92011add8190e0b53b5caf9566aea1:0", ], + "xudtAssets": { + "0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e": { + "amount": 10000000000n, + "cellCount": 10, + "utxoCount": 10, + }, + }, + "xudtCellCount": 10, + "xudtCellIds": [ + "0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0", + "0xd30143cc94d6fdbb656db10a7635e936929febebc9e1424d163ab36a9041e9ba:0x0", + "0x3b0d7d2072c86a2b6f72a1290a70c48f451c1f290adc207e063f8ca3f3edd2b0:0x0", + "0xd7d8aa87e70834cbf1d4cf95767381471bdfd16b2d9a916d0927b7b81c3d134f:0x0", + "0xa4c06a0f9be53d5416f8fe34d7be1a5229a8a2515e3814b6b1ebf18ee11fd032:0x0", + "0x2ac48fd1b5db05851b756b6536f63f080598a8962ca365e20991b86ae547d456:0x0", + "0xa01db6b79bd41ab7adf4b6f4e10b9a70e14489c109b218d3c6f24770eb5d3000:0x0", + "0x4fcac5d05e7cbfc7352ade62e44f78cca09450c419fb39b3af05f94f02a48210:0x0", + "0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0", + "0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0", + ], }, }, ], diff --git a/packages/rgbpp/tests/mocked/50-included-41-excluded.ts b/packages/rgbpp/tests/mocked/50-included-41-excluded.ts index 072ac4bc..c6d905bf 100644 --- a/packages/rgbpp/tests/mocked/50-included-41-excluded.ts +++ b/packages/rgbpp/tests/mocked/50-included-41-excluded.ts @@ -9149,14 +9149,61 @@ const receiverBtcUtxos: BtcApiUtxo[] = [ const buildResult: RgbppTransferAllTxsResult = { summary: { excluded: { - assets: { + cellCount: 41, + cellIds: [ + '0x00f43b843640fab7c9951a7931632e6ade6ef3337f89489b1c2b400793ece665:0x0', + '0xa398426747fb052d0832a3296ad89b72253428b6caa19e8be14d4fcb0befeb2d:0x0', + '0xc657c0531c349e0602397f6369a462bbd3ec84efcd8876e1ccdc0e6f0201a8b0:0x0', + '0xde2c71de17ebd73b1925805754b1fd2c2cd40b27d5de3edf23812b270439b162:0x0', + '0xd2466255b2b05a229d3bb9c5f9f1b3def078283cdfd9cef1645ef1046c9047d5:0x0', + '0xd64f32b7a5daf5c5fd7f0cf0ba76d9263383265fbc706b9043f344afd5fe00e8:0x0', + '0x16bb55a5c1fd0d6a7d7e7b60892da24c2a33c27041fbf8ada93aab691a311f9b:0x0', + '0xede3544e671ac287ff67ddea7ce99e7d0afafac5f2889f4f8b1c6c1cd09dcbcc:0x0', + '0x67cad749783b7d8595b7e5818c08eb380575c64badbd792443f36ae5888ceaff:0x0', + '0xcaacf9b9b495e1c811598e86d904768162914b1aca7c3537cdd1af2cbe640303:0x0', + '0x85a5fa2ba570c35fd22e132b3f6a0ad03b8c151d0fd82abdbc8e4c3845615660:0x0', + '0x62cb0ad5fdcfdfe819135f970604b0c7e7ba6761544d2db2f6e093e8dd50734f:0x0', + '0x965155d63fa8c9fb00cebb360753911efec9718b0db13f64d7dddd45edc53ab0:0x0', + '0xea07337354751ba2068e9fb1f56c0b7cd5b4f8b96392387cf4d8c32b39092067:0x0', + '0xcf8ca99732c62de85820c8670e4257a035dd1c96af440caaa3c60e1fb30a064d:0x0', + '0x9b661830567bc2b2917d9295bccac8409472c181623091bb80cd15d242256d5a:0x0', + '0x3c86f4acd287c73551e1ecba3787c139158d9756e5127a1540b979167beb37e3:0x0', + '0x700ac6b78787cfc2e446ecaef1e7885f05d8138c1b3211d1eed3df6b745e0047:0x0', + '0x2ed6aca14bdf96fa4174b345ae1840a1c31ac41be4fd4fafa4550b0b9bb94a04:0x0', + '0x7dfaffb686d86face0c9ae1b7cbd938627ed7f34a7e020465f7bd2d0ca0aefa5:0x0', + '0xd25420447d02822f43dc7a15ffd9dd00ee3bfe72ef10227256c9878e327ea4c0:0x0', + '0x5f20ab1a846b0018e91b17d364d31684d1f69c0226e0b71c1b8dc87684411f8a:0x0', + '0xbccd8a4febd86e65f2508d87b787c791144312c62524d7425b2736f383f20d15:0x0', + '0xa8aa116e9420c20d4513fad4f9c43e1b8578f77822345b67ad8553d7a4700b00:0x0', + '0x8a2c1dbea8b03b80d27486b912a4466077e9774321580b96999a5c2b47e8a9c4:0x0', + '0x1426d8ddd17d048900ab6649c8831ea0597020f8a3f391db33012faf3f426fad:0x0', + '0x35b073cfad16bba683b74c0306c00f0a0620fd8e27db7151673dcdbd0857a750:0x0', + '0xc33e4d35bb9d899f71cbbd2d0f9f8f19538fbd16afcef5b6843d4b5eddd743db:0x0', + '0x4976ed59d93bbedcfc1a2822c0d65774060fa8cb4c0b0d41bed13054c3ccf7fb:0x0', + '0xdaa57218ca7f632353ce3736ca0d46bbf80553d4b67843d73ac6037e8ddb7ff0:0x0', + '0x103f9e99efddbb86171c87cabcd1a53b5e09df7863c1b3d63bc6ce71361eaa5a:0x0', + '0x73068eb36a97ac7f35fd996761d4822a88afd3cf77252ab3b51966eadeb78491:0x0', + '0xec6d8bc79cd7e0d7353726a438aa9c4cffa4683363331549af30d2542704a556:0x0', + '0x05398d634a13a662dcbd1504fff11bcc12e287a779b1f35051997ad33ec2aa9f:0x0', + '0x2bc0dcb5bc6b2cc5ccd4022db998004de578242d6ceeff5303d81a16828ffed5:0x0', + '0x1976c37d6709fc5d128c1a1b547a598fdce892b4bcb54591d9dccf5f3f2fbb08:0x0', + '0xc3ea8f82ea187c4fcb0d69aee9f12cfd2cebd52e9fa4aae7c51f4dcbf4e22107:0x0', + '0xdb3f80f8e2e5f599e7a335f8da68791a87e94bb1042a20bbfef33f655aad0a21:0x0', + '0x3bac25553adcd0ce92577f8fdeda52212388cbe307a3e6564cf1d5ae6dba4121:0x0', + '0x3e7a84ff71358d30b6e4213cd5f5cf56bae03053a665bed68277a6fb5c852818:0x0', + '0xb0ffef5e6998ddc86019de4d90a035c3aceb17fbfcaabb6a225dd27533e8673b:0x0', + ], + utxoCount: 1, + utxoIds: ['69eea91d69b850abd92338fa4f0c9a11d0ed68f74bf5201cb7424dc49506af38:0'], + xudtAssets: { '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { - amount: BigInt('4100000000'), + amount: BigInt(4100000000), cellCount: 41, utxoCount: 1, }, }, - cellIds: [ + xudtCellCount: 41, + xudtCellIds: [ '0x00f43b843640fab7c9951a7931632e6ade6ef3337f89489b1c2b400793ece665:0x0', '0xa398426747fb052d0832a3296ad89b72253428b6caa19e8be14d4fcb0befeb2d:0x0', '0xc657c0531c349e0602397f6369a462bbd3ec84efcd8876e1ccdc0e6f0201a8b0:0x0', @@ -9199,18 +9246,9 @@ const buildResult: RgbppTransferAllTxsResult = { '0x3e7a84ff71358d30b6e4213cd5f5cf56bae03053a665bed68277a6fb5c852818:0x0', '0xb0ffef5e6998ddc86019de4d90a035c3aceb17fbfcaabb6a225dd27533e8673b:0x0', ], - cellCount: 41, - utxoIds: ['69eea91d69b850abd92338fa4f0c9a11d0ed68f74bf5201cb7424dc49506af38:0'], - utxoCount: 1, }, included: { - assets: { - '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { - amount: BigInt('50000000000'), - cellCount: 50, - utxoCount: 50, - }, - }, + cellCount: 50, cellIds: [ '0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0', '0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0', @@ -9263,7 +9301,7 @@ const buildResult: RgbppTransferAllTxsResult = { '0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0', '0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0', ], - cellCount: 50, + utxoCount: 50, utxoIds: [ 'fd16aafb86ef05a373e59d2b812fcb117c65b647aa899085136913961127efca:0', '1007a173f8ace6567758d309fb7a281c1f19c5961ff69fa32789c9a83ddfac10:0', @@ -9316,7 +9354,66 @@ const buildResult: RgbppTransferAllTxsResult = { 'f1ee2c32debdbca6e0bdd654f3356501951e9fda7f288df62144583b38c5d6b6:0', 'f6ce37f9d89597172566ae0b3e18edcb1c92011add8190e0b53b5caf9566aea1:0', ], - utxoCount: 50, + xudtAssets: { + '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { + amount: BigInt(50000000000), + cellCount: 50, + utxoCount: 50, + }, + }, + xudtCellCount: 50, + xudtCellIds: [ + '0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0', + '0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0', + '0x2e2ef6a59efa324e51cdf48f769ed044701719a47de696197ab2d52b10b46f02:0x0', + '0x3ee4107480a679cfdc296dc05c8d71b27a68215a9d3991494e0c13d60ae13792:0x0', + '0xd1cfd6764c4aae04eebd0f9e5b69dccd2708194b1331b92adb88c3de5a96a9da:0x0', + '0x296b94918d48bf6a6a0c3ba8eb301472879060b6339d8ebb93fd59fcaa0fda62:0x0', + '0xa368465ce2b6b717312755fea8d95eb475fdd66f019cd67050c0c383409c0667:0x0', + '0xd8fcef10d92024e220bc314a216b9f1decca2f05138d6592a280ad3bb5c0d922:0x0', + '0xe7797d33ca22ebe3052b273307ccc4472ac57747dcb70d5249efea4957f04f73:0x0', + '0x2e4d2051d9d5182aa2d9d8360d55a9629e964a8a1562485f928963f39932563d:0x0', + '0x79f810935bf3ac47bc97c50c78527d71cacc9594ec148eeb294159f6ced0483b:0x0', + '0x27bf1271e34d3b89b8908302b1b52122cd4aabc9b05559c1f347ff1fdc943a12:0x0', + '0x5d573c5fb16adaa17c42c7936fcfd7105818e4ef4bc613d4b6062698182500a6:0x0', + '0x6204bf05f0b76e0f57eeda3e34773d0b75b9c8fbc4dec329b5a5e09b6fa418ee:0x0', + '0xad5be28bad16f4792cc0dc9375b96b74721aafa0383a978ec24ad2ced05cfd16:0x0', + '0x715a0ad3a91a8e88ae31998aa667e02c973da57f1a287e21dbe4dfcf9f133b65:0x0', + '0x83c92b4592a287cfa76b15c1d0dec0abd7f487b201a1720f3004d1d742a5e581:0x0', + '0xe763055974a3c1c58a9a8c6f14cd5d0251f26fbfc4f1dd86319411e8794f8889:0x0', + '0xe0732a33f99598399e0d1bdeaa6ee96b9f0fca39651626a30b0bafa883a12419:0x0', + '0xf8168a6392c0691293ec803cd599b3fbc631cf18ad9102dd35c6225f110ba29f:0x0', + '0xefff789561ce58884324454924e62c1567e70e835c657b54df9a636f95029722:0x0', + '0x21c7b033b9eb7eb4f4b28783a77447acc8a284b83dc99a353794175ee5c50de8:0x0', + '0x1414ed5987b243661f6f911fab762b08d84146be46e2950d3f7e20f13df1f6f6:0x0', + '0x418de4600629116373b24becdcab626f19d113a6093a75a5cef54a695714a20a:0x0', + '0xd223e96ee030c303c31d79710ea19c7347a04f4b44ca4551c3342ce119e86132:0x0', + '0xec2df4da6b567c7be7f698e1895be815626c6b5e504930d1c5b1431792465784:0x0', + '0xcac45b975c8c52ca6199f39de541c0c069556fd54640f4b2838946344f42ce6d:0x0', + '0x2f8b991d647b91c931eb32b224c5693991266ed10c89326795f5b71e22a57bea:0x0', + '0x1ba483627e1dc86c2054a9a7c3ff34df116b2446f1c3c8c0fc70e2f9daf63a1f:0x0', + '0xb65cf4b3f9705253dacc74a83589024e9f751ac3b2cef41d9dfe075b957c5477:0x0', + '0x9ffa6b826ed3ab1f5fa8f32ee743b4820682897b671dd96f4fea414e04ec3ecc:0x0', + '0xbd629504d74fda29a8b9187dc55a4a675c791d25a501862446c4c1d8a1ede2de:0x0', + '0xc26347679c6f9c321af89838cac070c3a87d4280ed0054fbdd46d94a20683a8e:0x0', + '0xedd3f3dde6f4253f32b4a24f3c95d9824f546732f51e67447580d3a590b1468e:0x0', + '0x30b3d64d1df36113707f0918d406c3d79482ecc8e22439121cebc458c8960fbe:0x0', + '0x6cac3ce5884577e922afe944e9bf05887e7ab3c847310eb79e6f39cd716cc307:0x0', + '0xbc2a834cbb5b40f5cb47bd3f328297ca851a0c0628be06b2d6a43423750ed0aa:0x0', + '0x75143c1c6e64b01d45122bfa5db70cc5dbb90e945e1c7c781c73363b5e3fb4e0:0x0', + '0x6fb324d629f69d1d011015325559bd1a3f58cd2bd0e2dce23b006ea85eade376:0x0', + '0xb5c70400545feef1c591c072b386e663805d984ecc90c9ebd282f39990a7cf17:0x0', + '0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0', + '0xd30143cc94d6fdbb656db10a7635e936929febebc9e1424d163ab36a9041e9ba:0x0', + '0x3b0d7d2072c86a2b6f72a1290a70c48f451c1f290adc207e063f8ca3f3edd2b0:0x0', + '0xd7d8aa87e70834cbf1d4cf95767381471bdfd16b2d9a916d0927b7b81c3d134f:0x0', + '0xa4c06a0f9be53d5416f8fe34d7be1a5229a8a2515e3814b6b1ebf18ee11fd032:0x0', + '0x2ac48fd1b5db05851b756b6536f63f080598a8962ca365e20991b86ae547d456:0x0', + '0xa01db6b79bd41ab7adf4b6f4e10b9a70e14489c109b218d3c6f24770eb5d3000:0x0', + '0x4fcac5d05e7cbfc7352ade62e44f78cca09450c419fb39b3af05f94f02a48210:0x0', + '0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0', + '0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0', + ], }, }, transactions: [ @@ -9702,13 +9799,7 @@ const buildResult: RgbppTransferAllTxsResult = { }, }, summary: { - assets: { - '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { - amount: BigInt('40000000000'), - cellCount: 40, - utxoCount: 40, - }, - }, + cellCount: 40, cellIds: [ '0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0', '0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0', @@ -9751,7 +9842,7 @@ const buildResult: RgbppTransferAllTxsResult = { '0x6fb324d629f69d1d011015325559bd1a3f58cd2bd0e2dce23b006ea85eade376:0x0', '0xb5c70400545feef1c591c072b386e663805d984ecc90c9ebd282f39990a7cf17:0x0', ], - cellCount: 40, + utxoCount: 40, utxoIds: [ 'fd16aafb86ef05a373e59d2b812fcb117c65b647aa899085136913961127efca:0', '1007a173f8ace6567758d309fb7a281c1f19c5961ff69fa32789c9a83ddfac10:0', @@ -9794,7 +9885,56 @@ const buildResult: RgbppTransferAllTxsResult = { '8a81a8dc324d22499562e416a884e7bf9a55f5de7b28ee454ad3e76fa6597283:0', 'ce808ec46872008364568e931b4fe484e0e8ea3c154770adb10f5c6b2b3ec286:0', ], - utxoCount: 40, + xudtAssets: { + '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { + amount: BigInt(40000000000), + cellCount: 40, + utxoCount: 40, + }, + }, + xudtCellCount: 40, + xudtCellIds: [ + '0x6adafca165f29c713d15da4e9415d610c02c1b8ce585cc4f5430aa5de3e0e239:0x0', + '0x122d92afd897e5cce4f17896468453bef911e8ee5a2141e8da4e91fa37863b7d:0x0', + '0x2e2ef6a59efa324e51cdf48f769ed044701719a47de696197ab2d52b10b46f02:0x0', + '0x3ee4107480a679cfdc296dc05c8d71b27a68215a9d3991494e0c13d60ae13792:0x0', + '0xd1cfd6764c4aae04eebd0f9e5b69dccd2708194b1331b92adb88c3de5a96a9da:0x0', + '0x296b94918d48bf6a6a0c3ba8eb301472879060b6339d8ebb93fd59fcaa0fda62:0x0', + '0xa368465ce2b6b717312755fea8d95eb475fdd66f019cd67050c0c383409c0667:0x0', + '0xd8fcef10d92024e220bc314a216b9f1decca2f05138d6592a280ad3bb5c0d922:0x0', + '0xe7797d33ca22ebe3052b273307ccc4472ac57747dcb70d5249efea4957f04f73:0x0', + '0x2e4d2051d9d5182aa2d9d8360d55a9629e964a8a1562485f928963f39932563d:0x0', + '0x79f810935bf3ac47bc97c50c78527d71cacc9594ec148eeb294159f6ced0483b:0x0', + '0x27bf1271e34d3b89b8908302b1b52122cd4aabc9b05559c1f347ff1fdc943a12:0x0', + '0x5d573c5fb16adaa17c42c7936fcfd7105818e4ef4bc613d4b6062698182500a6:0x0', + '0x6204bf05f0b76e0f57eeda3e34773d0b75b9c8fbc4dec329b5a5e09b6fa418ee:0x0', + '0xad5be28bad16f4792cc0dc9375b96b74721aafa0383a978ec24ad2ced05cfd16:0x0', + '0x715a0ad3a91a8e88ae31998aa667e02c973da57f1a287e21dbe4dfcf9f133b65:0x0', + '0x83c92b4592a287cfa76b15c1d0dec0abd7f487b201a1720f3004d1d742a5e581:0x0', + '0xe763055974a3c1c58a9a8c6f14cd5d0251f26fbfc4f1dd86319411e8794f8889:0x0', + '0xe0732a33f99598399e0d1bdeaa6ee96b9f0fca39651626a30b0bafa883a12419:0x0', + '0xf8168a6392c0691293ec803cd599b3fbc631cf18ad9102dd35c6225f110ba29f:0x0', + '0xefff789561ce58884324454924e62c1567e70e835c657b54df9a636f95029722:0x0', + '0x21c7b033b9eb7eb4f4b28783a77447acc8a284b83dc99a353794175ee5c50de8:0x0', + '0x1414ed5987b243661f6f911fab762b08d84146be46e2950d3f7e20f13df1f6f6:0x0', + '0x418de4600629116373b24becdcab626f19d113a6093a75a5cef54a695714a20a:0x0', + '0xd223e96ee030c303c31d79710ea19c7347a04f4b44ca4551c3342ce119e86132:0x0', + '0xec2df4da6b567c7be7f698e1895be815626c6b5e504930d1c5b1431792465784:0x0', + '0xcac45b975c8c52ca6199f39de541c0c069556fd54640f4b2838946344f42ce6d:0x0', + '0x2f8b991d647b91c931eb32b224c5693991266ed10c89326795f5b71e22a57bea:0x0', + '0x1ba483627e1dc86c2054a9a7c3ff34df116b2446f1c3c8c0fc70e2f9daf63a1f:0x0', + '0xb65cf4b3f9705253dacc74a83589024e9f751ac3b2cef41d9dfe075b957c5477:0x0', + '0x9ffa6b826ed3ab1f5fa8f32ee743b4820682897b671dd96f4fea414e04ec3ecc:0x0', + '0xbd629504d74fda29a8b9187dc55a4a675c791d25a501862446c4c1d8a1ede2de:0x0', + '0xc26347679c6f9c321af89838cac070c3a87d4280ed0054fbdd46d94a20683a8e:0x0', + '0xedd3f3dde6f4253f32b4a24f3c95d9824f546732f51e67447580d3a590b1468e:0x0', + '0x30b3d64d1df36113707f0918d406c3d79482ecc8e22439121cebc458c8960fbe:0x0', + '0x6cac3ce5884577e922afe944e9bf05887e7ab3c847310eb79e6f39cd716cc307:0x0', + '0xbc2a834cbb5b40f5cb47bd3f328297ca851a0c0628be06b2d6a43423750ed0aa:0x0', + '0x75143c1c6e64b01d45122bfa5db70cc5dbb90e945e1c7c781c73363b5e3fb4e0:0x0', + '0x6fb324d629f69d1d011015325559bd1a3f58cd2bd0e2dce23b006ea85eade376:0x0', + '0xb5c70400545feef1c591c072b386e663805d984ecc90c9ebd282f39990a7cf17:0x0', + ], }, }, { @@ -9928,13 +10068,7 @@ const buildResult: RgbppTransferAllTxsResult = { }, }, summary: { - assets: { - '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { - amount: BigInt('10000000000'), - cellCount: 10, - utxoCount: 10, - }, - }, + cellCount: 10, cellIds: [ '0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0', '0xd30143cc94d6fdbb656db10a7635e936929febebc9e1424d163ab36a9041e9ba:0x0', @@ -9947,7 +10081,7 @@ const buildResult: RgbppTransferAllTxsResult = { '0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0', '0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0', ], - cellCount: 10, + utxoCount: 10, utxoIds: [ '2c5d749dc3451230f2497384c02dc0e07efc5743bce02faf47db4a191095c5d8:0', '4418969debbb39c1ff3e82ba90375106ba471ffc66f87dd004ce216e3bd3d8a4:0', @@ -9960,7 +10094,26 @@ const buildResult: RgbppTransferAllTxsResult = { 'f1ee2c32debdbca6e0bdd654f3356501951e9fda7f288df62144583b38c5d6b6:0', 'f6ce37f9d89597172566ae0b3e18edcb1c92011add8190e0b53b5caf9566aea1:0', ], - utxoCount: 10, + xudtAssets: { + '0xc3fcf12ef840771b1eac4709d61d93be7b13424c16fefd0b2071c204bdeb9f4e': { + amount: BigInt(10000000000), + cellCount: 10, + utxoCount: 10, + }, + }, + xudtCellCount: 10, + xudtCellIds: [ + '0xdc0c3056e70b4fe64eda00cdc1fd6b2ae435871608b9fbb75efd13a3e78b496e:0x0', + '0xd30143cc94d6fdbb656db10a7635e936929febebc9e1424d163ab36a9041e9ba:0x0', + '0x3b0d7d2072c86a2b6f72a1290a70c48f451c1f290adc207e063f8ca3f3edd2b0:0x0', + '0xd7d8aa87e70834cbf1d4cf95767381471bdfd16b2d9a916d0927b7b81c3d134f:0x0', + '0xa4c06a0f9be53d5416f8fe34d7be1a5229a8a2515e3814b6b1ebf18ee11fd032:0x0', + '0x2ac48fd1b5db05851b756b6536f63f080598a8962ca365e20991b86ae547d456:0x0', + '0xa01db6b79bd41ab7adf4b6f4e10b9a70e14489c109b218d3c6f24770eb5d3000:0x0', + '0x4fcac5d05e7cbfc7352ade62e44f78cca09450c419fb39b3af05f94f02a48210:0x0', + '0xa75bca0eaa472a83b9a155d4c75dbc3c0e846b7a841fd143ac051c2c07e4aa38:0x0', + '0x5860c0a6a834e0bb2dfbc8d5f4c1885cbbe3367285f5dfb7d464fa042031d17c:0x0', + ], }, }, ],