From a2e227513845bc51463c0d13f8339e6a4abd74eb Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Wed, 27 Sep 2023 15:17:27 +0800 Subject: [PATCH 01/16] feat(core): add evmtx signer on convert --- babel.config.js | 3 + .../app/api/transaction/transfer_domain.ts | 59 ++ mobile-app/app/contracts/TransferDomain.json | 150 +++ mobile-app/app/hooks/useWalletAddress.ts | 2 +- package-lock.json | 890 +++++++++++------- package.json | 1 + 6 files changed, 744 insertions(+), 361 deletions(-) create mode 100644 mobile-app/app/contracts/TransferDomain.json diff --git a/babel.config.js b/babel.config.js index 318d3baf0a..e00f1a1c37 100644 --- a/babel.config.js +++ b/babel.config.js @@ -22,6 +22,9 @@ module.exports = function (api) { }, ], "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-transform-private-methods", + "@babel/plugin-transform-class-properties", + "@babel/plugin-transform-private-property-in-object", "react-native-reanimated/plugin", ]; diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 5c40380784..79566adf75 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -1,5 +1,7 @@ import { translate } from "@translations"; import BigNumber from "bignumber.js"; +import { ethers, utils, BigNumber as BN } from "ethers"; +// import { providers } from "ethers"; // TODO: Uncomment import { DfTxSigner } from "@waveshq/walletkit-ui/dist/store"; import { WhaleWalletAccount } from "@defichain/whale-api-wallet"; import { @@ -7,6 +9,7 @@ import { TransactionSegWit, } from "@defichain/jellyfish-transaction"; import { ConvertDirection } from "@screens/enum"; +import TransferDomain from "../../contracts/TransferDomain.json"; const TRANSFER_DOMAIN_TYPE = { DVM: 2, @@ -41,6 +44,54 @@ export async function transferDomainSigner( ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; + /** + * TODO: Start of EvmTx signer here + * */ + const TD_CONTRACT_ADDR = "0x0000000000000000000000000000000000000302"; + const tdIFace = new utils.Interface(TransferDomain.abi); + + const from = + convertDirection === ConvertDirection.evmToDvm + ? await account.getEvmAddress() + : await account.getAddress(); + const to = TD_CONTRACT_ADDR; + const evmAmount = BN.from(amount.toString()).toHexString(); // "0x29a2241af62c0000"; // 3_000_000_000_000_000_000 + const native = await account.getAddress(); + const data = tdIFace.encodeFunctionData("transfer", [ + from, + to, + evmAmount, + native, + ]); + // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment + const privateKey = await account.privateKey(); + const wallet = new ethers.Wallet(privateKey); + + /* TODO: Figure out CORS issue when using the ethRpc + const tx: any = { + to: TD_CONTRACT_ADDR, + nonce: await ethRpc.getTransactionCount(from), + value: 0, + chainId: (await ethRpc.getNetwork()).chainId, + data: data, + gasLimit: 100_000, + gasPrice: (await ethRpc.getFeeData()).gasPrice, // base fee + }; */ + + const tx: any = { + to: TD_CONTRACT_ADDR, + nonce: 0, + value: 0, + chainId: 1133, + data: data, + gasLimit: 100_000, + gasPrice: 1000, // base fee + }; + + const evmtxSigned = (await wallet.signTransaction(tx)).substring(2); // rm prefix `0x` + const evmTx = + new Uint8Array(Buffer.from(evmtxSigned, "hex")) || new Uint8Array([]); + const signed: TransactionSegWit = await builder.account.transferDomain( { items: [ @@ -52,6 +103,10 @@ export async function transferDomainSigner( amount, }, domain: srcDomain, + data: + convertDirection === ConvertDirection.evmToDvm + ? evmTx + : new Uint8Array([]), }, dst: { address: dstScript, @@ -60,6 +115,10 @@ export async function transferDomainSigner( amount, }, domain: dstDomain, + data: + convertDirection === ConvertDirection.dvmToEvm + ? evmTx + : new Uint8Array([]), }, }, ], diff --git a/mobile-app/app/contracts/TransferDomain.json b/mobile-app/app/contracts/TransferDomain.json new file mode 100644 index 0000000000..d576a7200e --- /dev/null +++ b/mobile-app/app/contracts/TransferDomain.json @@ -0,0 +1,150 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TransferDomain", + "sourceName": "contracts/TransferDomain.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "nativeAddress", + "type": "string" + } + ], + "name": "NativeAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address payable", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "nativeAddress", + "type": "string" + } + ], + "name": "bridgeDST20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address payable", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "nativeAddress", + "type": "string" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506109b8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c578063313ce5671461007a5780635a4623b61461009857806395d89b41146100b4578063d57b2826146100d2575b600080fd5b6100646100ee565b6040516100719190610454565b60405180910390f35b61008261012b565b60405161008f9190610492565b60405180910390f35b6100b260048036038101906100ad91906106c8565b610134565b005b6100bc610227565b6040516100c99190610454565b60405180910390f35b6100ec60048036038101906100e7919061075f565b610264565b005b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b60006012905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146101e9578473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b81526004016101a49392919061085f565b6020604051808303816000875af11580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906108ce565b505b7f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516102189190610454565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461032257814710156102da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d190610947565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161037f9190610967565b60405180910390a37f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516103b69190610454565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103fe5780820151818401526020810190506103e3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610426826103c4565b61043081856103cf565b93506104408185602086016103e0565b6104498161040a565b840191505092915050565b6000602082019050818103600083015261046e818461041b565b905092915050565b600060ff82169050919050565b61048c81610476565b82525050565b60006020820190506104a76000830184610483565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ec826104c1565b9050919050565b6104fc816104e1565b811461050757600080fd5b50565b600081359050610519816104f3565b92915050565b600061052a826104c1565b9050919050565b61053a8161051f565b811461054557600080fd5b50565b60008135905061055781610531565b92915050565b6000819050919050565b6105708161055d565b811461057b57600080fd5b50565b60008135905061058d81610567565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105d58261040a565b810181811067ffffffffffffffff821117156105f4576105f361059d565b5b80604052505050565b60006106076104ad565b905061061382826105cc565b919050565b600067ffffffffffffffff8211156106335761063261059d565b5b61063c8261040a565b9050602081019050919050565b82818337600083830152505050565b600061066b61066684610618565b6105fd565b90508281526020810184848401111561068757610686610598565b5b610692848285610649565b509392505050565b600082601f8301126106af576106ae610593565b5b81356106bf848260208601610658565b91505092915050565b600080600080600060a086880312156106e4576106e36104b7565b5b60006106f28882890161050a565b95505060206107038882890161050a565b945050604061071488828901610548565b93505060606107258882890161057e565b925050608086013567ffffffffffffffff811115610746576107456104bc565b5b6107528882890161069a565b9150509295509295909350565b60008060008060808587031215610779576107786104b7565b5b60006107878782880161050a565b945050602061079887828801610548565b93505060406107a98782880161057e565b925050606085013567ffffffffffffffff8111156107ca576107c96104bc565b5b6107d68782880161069a565b91505092959194509250565b6107eb816104e1565b82525050565b6000819050919050565b600061081661081161080c846104c1565b6107f1565b6104c1565b9050919050565b6000610828826107fb565b9050919050565b600061083a8261081d565b9050919050565b61084a8161082f565b82525050565b6108598161055d565b82525050565b600060608201905061087460008301866107e2565b6108816020830185610841565b61088e6040830184610850565b949350505050565b60008115159050919050565b6108ab81610896565b81146108b657600080fd5b50565b6000815190506108c8816108a2565b92915050565b6000602082840312156108e4576108e36104b7565b5b60006108f2848285016108b9565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610931601d836103cf565b915061093c826108fb565b602082019050919050565b6000602082019050818103600083015261096081610924565b9050919050565b600060208201905061097c6000830184610850565b9291505056fea26469706673582212200b351e22b19ac8482db5acafcaedfb8b91e766506933222072f36e5417e7bbf864736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c578063313ce5671461007a5780635a4623b61461009857806395d89b41146100b4578063d57b2826146100d2575b600080fd5b6100646100ee565b6040516100719190610454565b60405180910390f35b61008261012b565b60405161008f9190610492565b60405180910390f35b6100b260048036038101906100ad91906106c8565b610134565b005b6100bc610227565b6040516100c99190610454565b60405180910390f35b6100ec60048036038101906100e7919061075f565b610264565b005b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b60006012905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146101e9578473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b81526004016101a49392919061085f565b6020604051808303816000875af11580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906108ce565b505b7f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516102189190610454565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461032257814710156102da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d190610947565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161037f9190610967565b60405180910390a37f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516103b69190610454565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103fe5780820151818401526020810190506103e3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610426826103c4565b61043081856103cf565b93506104408185602086016103e0565b6104498161040a565b840191505092915050565b6000602082019050818103600083015261046e818461041b565b905092915050565b600060ff82169050919050565b61048c81610476565b82525050565b60006020820190506104a76000830184610483565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ec826104c1565b9050919050565b6104fc816104e1565b811461050757600080fd5b50565b600081359050610519816104f3565b92915050565b600061052a826104c1565b9050919050565b61053a8161051f565b811461054557600080fd5b50565b60008135905061055781610531565b92915050565b6000819050919050565b6105708161055d565b811461057b57600080fd5b50565b60008135905061058d81610567565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105d58261040a565b810181811067ffffffffffffffff821117156105f4576105f361059d565b5b80604052505050565b60006106076104ad565b905061061382826105cc565b919050565b600067ffffffffffffffff8211156106335761063261059d565b5b61063c8261040a565b9050602081019050919050565b82818337600083830152505050565b600061066b61066684610618565b6105fd565b90508281526020810184848401111561068757610686610598565b5b610692848285610649565b509392505050565b600082601f8301126106af576106ae610593565b5b81356106bf848260208601610658565b91505092915050565b600080600080600060a086880312156106e4576106e36104b7565b5b60006106f28882890161050a565b95505060206107038882890161050a565b945050604061071488828901610548565b93505060606107258882890161057e565b925050608086013567ffffffffffffffff811115610746576107456104bc565b5b6107528882890161069a565b9150509295509295909350565b60008060008060808587031215610779576107786104b7565b5b60006107878782880161050a565b945050602061079887828801610548565b93505060406107a98782880161057e565b925050606085013567ffffffffffffffff8111156107ca576107c96104bc565b5b6107d68782880161069a565b91505092959194509250565b6107eb816104e1565b82525050565b6000819050919050565b600061081661081161080c846104c1565b6107f1565b6104c1565b9050919050565b6000610828826107fb565b9050919050565b600061083a8261081d565b9050919050565b61084a8161082f565b82525050565b6108598161055d565b82525050565b600060608201905061087460008301866107e2565b6108816020830185610841565b61088e6040830184610850565b949350505050565b60008115159050919050565b6108ab81610896565b81146108b657600080fd5b50565b6000815190506108c8816108a2565b92915050565b6000602082840312156108e4576108e36104b7565b5b60006108f2848285016108b9565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610931601d836103cf565b915061093c826108fb565b602082019050919050565b6000602082019050818103600083015261096081610924565b9050919050565b600060208201905061097c6000830184610850565b9291505056fea26469706673582212200b351e22b19ac8482db5acafcaedfb8b91e766506933222072f36e5417e7bbf864736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} + } + \ No newline at end of file diff --git a/mobile-app/app/hooks/useWalletAddress.ts b/mobile-app/app/hooks/useWalletAddress.ts index 54df35db1d..94a613fbf3 100644 --- a/mobile-app/app/hooks/useWalletAddress.ts +++ b/mobile-app/app/hooks/useWalletAddress.ts @@ -19,7 +19,7 @@ export function useWalletAddress(): { const account = wallet.get(i); const dvm = await account.getAddress(); // TODO (Harsh) replace it with getEvmAddress - const evm = "evmaddress"; // await account.getEvmAddress(); + const evm = await account.getEvmAddress(); addresses.push({ dvm, evm }); } return addresses; diff --git a/package-lock.json b/package-lock.json index b3f72cddd3..8f2b6b32cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "buffer": "^6.0.3", "classnames": "^2.3.2", "dayjs": "^1.11.9", + "ethers": "^5.7.1", "expo": "^49.0.7", "expo-asset": "~8.10.1", "expo-barcode-scanner": "~12.5.3", @@ -2725,11 +2726,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" }, - "node_modules/@defichain/jellyfish-transaction-builder/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" - }, "node_modules/@defichain/jellyfish-transaction-builder/node_modules/ethers": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", @@ -3347,6 +3343,11 @@ "scrypt-js": "3.0.1" } }, + "node_modules/@ethersproject/json-wallets/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + }, "node_modules/@ethersproject/keccak256": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", @@ -10249,9 +10250,9 @@ } }, "node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" }, "node_modules/agent-base": { "version": "6.0.2", @@ -34555,6 +34556,11 @@ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" }, + "@adraffy/ens-normalize": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz", + "integrity": "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==" + }, "@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -36212,39 +36218,39 @@ } }, "@defichain/jellyfish-address": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-4.0.0-beta.10.tgz", - "integrity": "sha512-9UXUNs6Y6n9p6/19GxVls1MbVsf5F32BscfhR3Z6VE7rtNnAaq4WSSBDZ3dTObRImgcz3fsXIcCbM/smUuWCLw==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-4.0.0-rc.1.2.tgz", + "integrity": "sha512-ErcMIsfMQUkdabg2UIqfsRv04pPu3UNKG/0vx4WrYtroDG8VVOv1EWyrBCIuV4O/wM2qFJOn9Pwp3UWDVYqLXA==", "requires": { - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2", + "@defichain/jellyfish-network": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2", "bech32": "^2.0.0", "bs58": "^4.0.1" } }, "@defichain/jellyfish-api-core": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-4.0.0-beta.10.tgz", - "integrity": "sha512-YhG1934sBkldIwmmw2h5UAVacHueEethwUL9m1tf2r5AXCl7DY47DOEyQR1ZatKEKifgH1bQu8+llYUo2eSCIQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-4.0.0-rc.1.2.tgz", + "integrity": "sha512-GM7iPiWkt8bspPS+RZGokzGwyUJp6Lqq8VmNKPow6OzHqtpVheLmhQwg2oWWQTc0yFOTHbiEXn9NK/k/gQl1Jw==", "requires": { - "@defichain/jellyfish-json": "4.0.0-beta.10" + "@defichain/jellyfish-json": "4.0.0-rc.1.2" } }, "@defichain/jellyfish-api-jsonrpc": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-jsonrpc/-/jellyfish-api-jsonrpc-4.0.0-beta.10.tgz", - "integrity": "sha512-FyBN+crA0vz4R3q3QH3gyEAvsSwk7zzyPbEpkTgxHIyC55p1fzyhxlLMABnvneaWzAgjxvxYVvcbooZFDAoZvg==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-jsonrpc/-/jellyfish-api-jsonrpc-4.0.0-rc.1.2.tgz", + "integrity": "sha512-dZI2tapqoYJGg2VE90cOMkjHZmIAak/uyIZo58eIKX57Nu3Qqu7s/LOQYnFOhRnttdanEujExee2GedzvyKZ2g==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", + "@defichain/jellyfish-api-core": "4.0.0-rc.1.2", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5" } }, "@defichain/jellyfish-buffer": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-buffer/-/jellyfish-buffer-4.0.0-beta.10.tgz", - "integrity": "sha512-gnEbvZxuPKQpFXjaqdyNWEz3Cw4ngfA4LD66wVrPPu83F7BEITLQLHFXY9CjSeky26cOwSlWFic1RlT4UXXjBg==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-buffer/-/jellyfish-buffer-4.0.0-rc.1.2.tgz", + "integrity": "sha512-Z62pzcG3+/a1pQTYJ4HQlmpnLFJKQNOjZZ8YhbaKn210HxxktYZga1kfu4qsSQp4fOTyxhsl4UaUTRc1XcNtUA==", "requires": { "bignumber.js": "^9.0.2", "bn.js": "^5.2.1", @@ -36252,9 +36258,9 @@ } }, "@defichain/jellyfish-crypto": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-4.0.0-beta.10.tgz", - "integrity": "sha512-jouoUIlYwHy7Qcq+vTK4qxi7sZ3XPUmfHfgx2oBA9MA0BNI7yc+TgXtfsGivkrZNSfI2IWuF2CbT5AqWck+pwQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-4.0.0-rc.1.2.tgz", + "integrity": "sha512-AoahaWw/3RXTXA3TXzwfLnFgIYxDQjL13CDooZJC67vruMN0iQGK/hDDFE0bHm09WOmr77jShqsVz2Tlp05AJQ==", "requires": { "bech32": "^2.0.0", "bip66": "^1.1.5", @@ -36268,9 +36274,9 @@ } }, "@defichain/jellyfish-json": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-4.0.0-beta.10.tgz", - "integrity": "sha512-MePFrdoMB21D2V4Xp6Qa+RDxvemFvzIvXnwgA2/ICIvVPDrOZO98bcTMfcQZQlIYIf78HF0+xkvLZoZV+NGTJQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-4.0.0-rc.1.2.tgz", + "integrity": "sha512-tjpj7VSb5n2pwZbXGwuoTeYzrkw13Ejc1FLdMuCK+vw1vl/DsQJbAlqmgKEHCenlXnzzqYku2HpS5ncHrZUXnQ==", "requires": { "@types/lossless-json": "^1.0.1", "bignumber.js": "^9.0.2", @@ -36278,92 +36284,125 @@ } }, "@defichain/jellyfish-network": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-4.0.0-beta.10.tgz", - "integrity": "sha512-iGdarmM7WAENUNZlC+yzwsdoJZ/eIvsGhDi/SprbB2+4fL3inolvHq1HDaN6+JF2qAGIR8CqJL6XOeWPbHq6ZA==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-4.0.0-rc.1.2.tgz", + "integrity": "sha512-DXVfv8wNR9AyKAD6c1kTT1bYEYMU//lyoKVupux4I2WG5LUuMyY6aExPgT41XZ0Bh+Je4KvNAS+U5yjR29zvkQ==", "requires": { "bignumber.js": "^9.0.2" } }, "@defichain/jellyfish-testing": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-testing/-/jellyfish-testing-4.0.0-beta.10.tgz", - "integrity": "sha512-1ZJp6Jn4TXfuNq0ZDoHQMzr88wxEi2v+1S9X9fzx6lOMtNEnzZ8zRa/k+Dlf/tUdDioQCvUTM9CpFEPocZMfVA==", - "requires": { - "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/testcontainers": "4.0.0-beta.10", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-testing/-/jellyfish-testing-4.0.0-rc.1.2.tgz", + "integrity": "sha512-iWGpjZcVBRxcENvLWh7/hG3os4jxtIKuD5Ip3BBy7edPdpIXPb55IkiTnnGHXSCM3kRU//3NH0wsi/J7bMMj9w==", + "requires": { + "@defichain/jellyfish-api-jsonrpc": "4.0.0-rc.1.2", + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2", + "@defichain/jellyfish-network": "4.0.0-rc.1.2", + "@defichain/testcontainers": "4.0.0-rc.1.2", "cross-fetch": "^3.1.5" } }, "@defichain/jellyfish-transaction": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-4.0.0-beta.10.tgz", - "integrity": "sha512-g9bmNEIVolfL4VdDsNDkACej2XmYYW3Uod4ogi/Y9Yq8MYfhAVLAHIhuASXQ0q1x7g0sAOHWdPK4T3eX4mUVGQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-4.0.0-rc.1.2.tgz", + "integrity": "sha512-NA4wr1skMcfP3R0xcvM12RRrbPBtJpKaaI9sPM5kxYF6ZTBg1CEHbaVhgU+MXMaO+kdAuagFNIvjuP4GMgd0mQ==", "requires": { - "@defichain/jellyfish-buffer": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10" + "@defichain/jellyfish-buffer": "4.0.0-rc.1.2", + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2" } }, "@defichain/jellyfish-transaction-builder": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-4.0.0-beta.10.tgz", - "integrity": "sha512-x0QoVultE1nLW8hYH2oVGuGA0mfdmKgiSVaaQaHRsIeBa4uMRfkVkaANaJmHlgTYtZjoUbQoKTXA5W6PGjtkXA==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-4.0.0-rc.1.2.tgz", + "integrity": "sha512-7mIMsInAHQi7BWnjNJj6k8jHE0q+KzPNE+F5JQihS48pUnFd6kWiU8VMkzn/9dzW1xxPTlz1wTMmUyIFcZFilA==", "requires": { - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-signature": "4.0.0-beta.10" + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction-signature": "4.0.0-rc.1.2", + "ethers": "^6.7.1" + }, + "dependencies": { + "@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==" + }, + "@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "ethers": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", + "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", + "requires": { + "@adraffy/ens-normalize": "1.9.2", + "@noble/hashes": "1.1.2", + "@noble/secp256k1": "1.7.1", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" + } + }, + "ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "requires": {} + } } }, "@defichain/jellyfish-transaction-signature": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-4.0.0-beta.10.tgz", - "integrity": "sha512-qRUdOiN0W+LgIMG/+Y3hLaUQKutxUu1jWqA9thBubt0Tx9Ve5TtpkJhVw9bMw8lW3eSRfh3iSd7sB25mDMa7yA==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-4.0.0-rc.1.2.tgz", + "integrity": "sha512-Cqyz99UClM/nAlz0NkoKU1Fl12OBPYIABHW1Lb4p+TPm03lvtYvOd8VeHhejNY3gKLb7hfonexg8cWnnsXRYIw==", "requires": { - "@defichain/jellyfish-buffer": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10" + "@defichain/jellyfish-buffer": "4.0.0-rc.1.2", + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2" } }, "@defichain/jellyfish-wallet": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-4.0.0-beta.10.tgz", - "integrity": "sha512-UtPryqcMSgCjExyBVVU5dhpi6And91goV4+wEo5wCQqrqAmn0Zo02k3XJ8DNaVqEJfGYpEbPBSdsIJMiO9YTfw==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-4.0.0-rc.1.2.tgz", + "integrity": "sha512-FsKGt42spRTp/83mtnVp4RCY1tfLvvED7wZzssX3X0cypfBMKOySgoI2TDEqtn3iR/nVRAFnWaoOpSqhNrjObA==", "requires": { - "@defichain/jellyfish-address": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-signature": "4.0.0-beta.10" + "@defichain/jellyfish-address": "4.0.0-rc.1.2", + "@defichain/jellyfish-crypto": "4.0.0-rc.1.2", + "@defichain/jellyfish-network": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction-builder": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction-signature": "4.0.0-rc.1.2" } }, "@defichain/jellyfish-wallet-encrypted": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-encrypted/-/jellyfish-wallet-encrypted-4.0.0-beta.10.tgz", - "integrity": "sha512-BCSCOTGKgsiVUdsJs1kJVXZPkGOOx3bzi25zyPE5oZ3j+75Kqza9CrIhSi0b8zKnvUg+rABw9WvUZBksUlRqkw==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-encrypted/-/jellyfish-wallet-encrypted-4.0.0-rc.1.2.tgz", + "integrity": "sha512-/QCGAV1lPPmWLcXvIIBxxf8v3lWrt7DRJm5NJLbQp++y8kr6wJLcEnOSM6EIXm3sMC0u80vQcWMgKlI4JJaXXw==", "requires": { - "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.10", + "@defichain/jellyfish-wallet-mnemonic": "4.0.0-rc.1.2", "scrypt-js": "^3.0.1" } }, "@defichain/jellyfish-wallet-mnemonic": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-4.0.0-beta.10.tgz", - "integrity": "sha512-hsPh2431chj7sFBe3uYMWA3cTw0Q9RIe+J9LurkmbByn/1aXzDiFRIpOUt2a3mR7OCDIahXCwCzGzRILISFxpQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-4.0.0-rc.1.2.tgz", + "integrity": "sha512-D5QY8AKLw9yLN4BdlX+36yk8hAc8lrSIiJPyujJ1qLlbe80wac4PNuRqa3m7tl+8DHOHAeE1IMy5d2yiTYkz3g==", "requires": { - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2", + "@defichain/jellyfish-wallet": "4.0.0-rc.1.2", "bip32": "^2.0.6", "bip39": "^3.0.4", "create-hmac": "^1.1.7" } }, "@defichain/ocean-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/ocean-api-client/-/ocean-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-sV8FLmbD6R0vQsUTZ9ozxbC2CAvGEJmVY2gDjGZjOW3doS2LbtOOqrI3wFDmlomRrfMWiVh/ENqN/ncJw6V0Sg==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/ocean-api-client/-/ocean-api-client-4.0.0-rc.1.2.tgz", + "integrity": "sha512-kiZpzHiXTbbx5sW5abuJaNyEMpkkLq3bm6ORhvXLXM2kTFAe5NlE1GvFLVHPXMIA1tPl+tqqx4VVpxp2FKwMJw==", "requires": { "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5", @@ -36371,20 +36410,20 @@ } }, "@defichain/playground-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-e7YdLbAwxVI3kDH21yxIta08KwKKYqCMvQJSH1qwm5xZMyMNkB2aiUjXxgDjAMUZ/h+cbFfrloqtsGkDlpPTog==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-4.0.0-rc.1.2.tgz", + "integrity": "sha512-1ph/mRVa5oIT5EAxcXPsOejV/LoXKlB1u6o4X53RvF82FvzDwVhu4/swns2Cq+HCndql3L/UkonUdC8wt2M2xQ==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/ocean-api-client": "4.0.0-beta.10" + "@defichain/jellyfish-api-core": "4.0.0-rc.1.2", + "@defichain/ocean-api-client": "4.0.0-rc.1.2" } }, "@defichain/testcontainers": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/testcontainers/-/testcontainers-4.0.0-beta.10.tgz", - "integrity": "sha512-uymLLU5P+IY6WkGxQWr+ns8D6k+BGnuJT4Q76oJlpl2TpIl897MoQj/MR+QPqtTQPb9YVOUsTiXo9iULChSWHA==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/testcontainers/-/testcontainers-4.0.0-rc.1.2.tgz", + "integrity": "sha512-ywyb0BrY7kCvg2xdt2HyTDrLuYubd8jPq4VPsCsHcu5UXuszXolfn/dN2WShM0lxZ6uouBr48E8uTHUUoj9o7Q==", "requires": { - "@defichain/jellyfish-network": "4.0.0-beta.10", + "@defichain/jellyfish-network": "4.0.0-rc.1.2", "cross-fetch": "^3.1.5", "dockerode": "^3.3.5", "tar-fs": "^2.1.1", @@ -36393,25 +36432,25 @@ } }, "@defichain/whale-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-4r5DKCAlHNlqv/o0HcdhRhND3HJ7qiNF5n1lGC+P3SLc9Gw6tejKwbiVVN8sakXporJwb5UUM/GRDXRHlq/mTQ==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-4.0.0-rc.1.2.tgz", + "integrity": "sha512-ecdELKLdt+BAJt44P55YEJkymNdHMxQIyhmLM768FI8bKVVLgdWNZAywcLVwPQWs1smSAA42wk+5RKT0cv9k0Q==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.10", + "@defichain/jellyfish-api-core": "4.0.0-rc.1.2", + "@defichain/jellyfish-api-jsonrpc": "4.0.0-rc.1.2", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5", "url-search-params-polyfill": "8.1.1" } }, "@defichain/whale-api-wallet": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-4.0.0-beta.10.tgz", - "integrity": "sha512-SRthiQnd/oichvZ+eN9VgAJJrooEYv0ROZ7bHYfmGKM/wBfeoTP5JLoKYA28pUNCnMCaGtTNssUABFBuR9yICA==", + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-4.0.0-rc.1.2.tgz", + "integrity": "sha512-h2M2etOrZ2OdL2eCP68wieBA/rHEjKokX0Y1Ke4Z5gv5Y7o8KR/TO04y/clLx3uedlHM2DhnD1fQZsCXJBx7MQ==", "requires": { - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", - "@defichain/whale-api-client": "4.0.0-beta.10" + "@defichain/jellyfish-transaction-builder": "4.0.0-rc.1.2", + "@defichain/jellyfish-wallet": "4.0.0-rc.1.2", + "@defichain/whale-api-client": "4.0.0-rc.1.2" } }, "@egjs/hammerjs": { @@ -36512,9 +36551,9 @@ } }, "@eslint/js": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", - "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==" + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==" }, "@ethersproject/abi": { "version": "5.7.0", @@ -36683,6 +36722,13 @@ "@ethersproject/transactions": "^5.7.0", "aes-js": "3.0.0", "scrypt-js": "3.0.1" + }, + "dependencies": { + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + } } }, "@ethersproject/keccak256": { @@ -38005,9 +38051,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -39080,14 +39126,14 @@ } }, "@next/env": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.19.tgz", - "integrity": "sha512-FsAT5x0jF2kkhNkKkukhsyYOrRqtSxrEhfliniIq0bwWbuXLgyt3Gv0Ml+b91XwjwArmuP7NxCiGd++GGKdNMQ==" + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.3.tgz", + "integrity": "sha512-X4te86vsbjsB7iO4usY9jLPtZ827Mbx+WcwNBGUOIuswuTAKQtzsuoxc/6KLxCMvogKG795MhrR1LDhYgDvasg==" }, "@next/eslint-plugin-next": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.19.tgz", - "integrity": "sha512-N/O+zGb6wZQdwu6atMZHbR7T9Np5SUFUjZqCbj0sXm+MwQO35M8TazVB4otm87GkXYs2l6OPwARd3/PUWhZBVQ==", + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.3.tgz", + "integrity": "sha512-lbZOoEjzSuTtpk9UgV9rOmxYw+PsSfNR+00mZcInqooiDMZ1u+RqT1YQYLsEZPW1kumZoQe5+exkCBtZ2xn0uw==", "requires": { "glob": "7.1.7" }, @@ -39108,9 +39154,57 @@ } }, "@next/swc-darwin-arm64": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.19.tgz", - "integrity": "sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==", + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.3.tgz", + "integrity": "sha512-6hiYNJxJmyYvvKGrVThzo4nTcqvqUTA/JvKim7Auaj33NexDqSNwN5YrrQu+QhZJCIpv2tULSHt+lf+rUflLSw==", + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.3.tgz", + "integrity": "sha512-UpBKxu2ob9scbpJyEq/xPgpdrgBgN3aLYlxyGqlYX5/KnwpJpFuIHU2lx8upQQ7L+MEmz+fA1XSgesoK92ppwQ==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.3.tgz", + "integrity": "sha512-5AzM7Yx1Ky+oLY6pHs7tjONTF22JirDPd5Jw/3/NazJ73uGB05NqhGhB4SbeCchg7SlVYVBeRMrMSZwJwq/xoA==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.3.tgz", + "integrity": "sha512-A/C1shbyUhj7wRtokmn73eBksjTM7fFQoY2v/0rTM5wehpkjQRLOXI8WJsag2uLhnZ4ii5OzR1rFPwoD9cvOgA==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.3.tgz", + "integrity": "sha512-FubPuw/Boz8tKkk+5eOuDHOpk36F80rbgxlx4+xty/U71e3wZZxVYHfZXmf0IRToBn1Crb8WvLM9OYj/Ur815g==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.3.tgz", + "integrity": "sha512-DPw8nFuM1uEpbX47tM3wiXIR0Qa+atSzs9Q3peY1urkhofx44o7E1svnq+a5Q0r8lAcssLrwiM+OyJJgV/oj7g==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.3.tgz", + "integrity": "sha512-zBPSP8cHL51Gub/YV8UUePW7AVGukp2D8JU93IHbVDu2qmhFAn9LWXiOOLKplZQKxnIPUkJTQAJDCWBWU4UWUA==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.3.tgz", + "integrity": "sha512-ONcL/lYyGUj4W37D4I2I450SZtSenmFAvapkJQNIJhrPMhzDU/AdfLkW98NvH1D2+7FXwe7yclf3+B7v28uzBQ==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.3.tgz", + "integrity": "sha512-2Vz2tYWaLqJvLcWbbTlJ5k9AN6JD7a5CN2pAeIzpbecK8ZF/yobA39cXtv6e+Z8c5UJuVOmaTldEAIxvsIux/Q==", "optional": true }, "@noble/hashes": { @@ -39118,6 +39212,11 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" }, + "@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -39204,12 +39303,60 @@ } } }, + "@parcel/watcher-android-arm64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.3.0.tgz", + "integrity": "sha512-f4o9eA3dgk0XRT3XhB0UWpWpLnKgrh1IwNJKJ7UJek7eTYccQ8LR7XUWFKqw6aEq5KUNlCcGvSzKqSX/vtWVVA==", + "optional": true + }, "@parcel/watcher-darwin-arm64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.3.0.tgz", "integrity": "sha512-mKY+oijI4ahBMc/GygVGvEdOq0L4DxhYgwQqYAz/7yPzuGi79oXrZG52WdpGA1wLBPrYb0T8uBaGFo7I6rvSKw==", "optional": true }, + "@parcel/watcher-darwin-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.3.0.tgz", + "integrity": "sha512-20oBj8LcEOnLE3mgpy6zuOq8AplPu9NcSSSfyVKgfOhNAc4eF4ob3ldj0xWjGGbOF7Dcy1Tvm6ytvgdjlfUeow==", + "optional": true + }, + "@parcel/watcher-freebsd-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.3.0.tgz", + "integrity": "sha512-7LftKlaHunueAEiojhCn+Ef2CTXWsLgTl4hq0pkhkTBFI3ssj2bJXmH2L67mKpiAD5dz66JYk4zS66qzdnIOgw==", + "optional": true + }, + "@parcel/watcher-linux-arm-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.3.0.tgz", + "integrity": "sha512-1apPw5cD2xBv1XIHPUlq0cO6iAaEUQ3BcY0ysSyD9Kuyw4MoWm1DV+W9mneWI+1g6OeP6dhikiFE6BlU+AToTQ==", + "optional": true + }, + "@parcel/watcher-linux-arm64-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.3.0.tgz", + "integrity": "sha512-mQ0gBSQEiq1k/MMkgcSB0Ic47UORZBmWoAWlMrTW6nbAGoLZP+h7AtUM7H3oDu34TBFFvjy4JCGP43JlylkTQA==", + "optional": true + }, + "@parcel/watcher-linux-arm64-musl": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.3.0.tgz", + "integrity": "sha512-LXZAExpepJew0Gp8ZkJ+xDZaTQjLHv48h0p0Vw2VMFQ8A+RKrAvpFuPVCVwKJCr5SE+zvaG+Etg56qXvTDIedw==", + "optional": true + }, + "@parcel/watcher-linux-x64-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.3.0.tgz", + "integrity": "sha512-P7Wo91lKSeSgMTtG7CnBS6WrA5otr1K7shhSjKHNePVmfBHDoAOHYRXgUmhiNfbcGk0uMCHVcdbfxtuiZCHVow==", + "optional": true + }, + "@parcel/watcher-linux-x64-musl": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.3.0.tgz", + "integrity": "sha512-+kiRE1JIq8QdxzwoYY+wzBs9YbJ34guBweTK8nlzLKimn5EQ2b2FSC+tAOpq302BuIMjyuUGvBiUhEcLIGMQ5g==", + "optional": true + }, "@parcel/watcher-wasm": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.3.0.tgz", @@ -39226,6 +39373,24 @@ } } }, + "@parcel/watcher-win32-arm64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.3.0.tgz", + "integrity": "sha512-35gXCnaz1AqIXpG42evcoP2+sNL62gZTMZne3IackM+6QlfMcJLy3DrjuL6Iks7Czpd3j4xRBzez3ADCj1l7Aw==", + "optional": true + }, + "@parcel/watcher-win32-ia32": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.3.0.tgz", + "integrity": "sha512-FJS/IBQHhRpZ6PiCjFt1UAcPr0YmCLHRbTc00IBTrelEjlmmgIVLeOx4MSXzx2HFEy5Jo5YdhGpxCuqCyDJ5ow==", + "optional": true + }, + "@parcel/watcher-win32-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.3.0.tgz", + "integrity": "sha512-dLx+0XRdMnVI62kU3wbXvbIRhLck4aE28bIGKbRGS7BJNt54IIj9+c/Dkqb+7DJEbHUZAX1bwaoM8PqVlHJmCA==", + "optional": true + }, "@pkgr/utils": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", @@ -40443,9 +40608,9 @@ } }, "@reduxjs/toolkit": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.5.tgz", - "integrity": "sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ==", + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.6.tgz", + "integrity": "sha512-Gc4ikl90ORF4viIdAkY06JNUnODjKfGxZRwATM30EdHq8hLSVoSrwXne5dd739yenP5bJxAX7tLuOWK5RPGtrw==", "requires": { "immer": "^9.0.21", "redux": "^4.2.1", @@ -40462,9 +40627,9 @@ } }, "@rushstack/eslint-patch": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.3.3.tgz", - "integrity": "sha512-0xd7qez0AQ+MbHatZTlI1gu5vkG8r7MYRUJAHPAHJBmGLs16zpkrpAVLvjQKQOqaXPDUBwOiJzNc00znHSCVBw==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.4.0.tgz", + "integrity": "sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==" }, "@segment/loosely-validate-event": { "version": "2.0.0", @@ -40541,9 +40706,9 @@ } }, "@swc/helpers": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", - "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", + "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", "requires": { "tslib": "^2.4.0" } @@ -40557,16 +40722,16 @@ } }, "@tanstack/query-core": { - "version": "5.0.0-beta.20", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.0.0-beta.20.tgz", - "integrity": "sha512-KTI6b4DLXq39n/VNLvWqxM0K/bmCyL5SvOfPGZ1cZGOvVfZxpo/81ZF9cuRDyPjInmzz8d8jUZOHZVJDKSDcvQ==" + "version": "5.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.0.0-rc.1.tgz", + "integrity": "sha512-6jzPCwvEHS+Y3QCildpOlIrqJXXJ+v2EvbtCnbKUi6FpOrrfoSPacVB3nr0cjSBG/rCXnTB0aaevx9T8iT9CrQ==" }, "@tanstack/react-query": { - "version": "5.0.0-beta.20", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.0.0-beta.20.tgz", - "integrity": "sha512-L5YP1zwEMBwZJ/oCnFXLnb6S60srU7Oyj/oM5TVLcC/efdKpcdToMZTHA9Vjq3oFA9ysxFgrskkideIMa3fB4A==", + "version": "5.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.0.0-rc.1.tgz", + "integrity": "sha512-hFz2j/pp+faqwaBbp0KV8kgn01GfErfA1BtcwHVE/E+GJINU2ZOAiVJ43LR05JCWnIu4b9pAnOBMHv55GshMZQ==", "requires": { - "@tanstack/query-core": "5.0.0-beta.20", + "@tanstack/query-core": "5.0.0-rc.1", "client-only": "0.0.1" } }, @@ -40712,9 +40877,9 @@ "devOptional": true }, "@types/archiver": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-5.3.2.tgz", - "integrity": "sha512-IctHreBuWE5dvBDz/0WeKtyVKVRs4h75IblxOACL92wU66v+HGAfEYAOyXkOFphvRJMhuXdI9huDXpX0FC6lCw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-5.3.3.tgz", + "integrity": "sha512-0ABdVcXL6jOwNGY+hjWPqrxUvKelBEwNLcuv/SV2vZ4YCH8w9NttFCt+/QqI5zgMX+iX/XqVy89/r7EmLJmMpQ==", "requires": { "@types/readdir-glob": "*" } @@ -40774,18 +40939,18 @@ } }, "@types/docker-modem": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.3.tgz", - "integrity": "sha512-i1A2Etnav7uHizZ87vUf4EqwJehY3JOcTfBS0pGBlO+HQ0jg2lUMCaJRg9VQM8ldZkpYdIfsenxcTOCpwxPXEg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.4.tgz", + "integrity": "sha512-INK4TOrJ9hbgaSqHA1HaEOCcYVftJRH0v03gCg6R57JGKgltkDvdFYBtoN4lHrJ3h8aF1upvEPN2eWVLIvKStQ==", "requires": { "@types/node": "*", "@types/ssh2": "*" } }, "@types/dockerode": { - "version": "3.3.19", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.19.tgz", - "integrity": "sha512-7CC5yIpQi+bHXwDK43b/deYXteP3Lem9gdocVVHJPSRJJLMfbiOchQV3rDmAPkMw+n3GIVj7m1six3JW+VcwwA==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.20.tgz", + "integrity": "sha512-Q+1e3z6SPWXR/Sk+WIyJFVsSDg78S7MDaGcwAh1WKlveO1tVO8TF1rOzJir5GLnqzEdUbclFKlw/4rhwESxwPw==", "requires": { "@types/docker-modem": "*", "@types/node": "*" @@ -40947,9 +41112,9 @@ "dev": true }, "@types/lossless-json": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/lossless-json/-/lossless-json-1.0.1.tgz", - "integrity": "sha512-zPE8kmpeL5/6L5gtTQHSOkAW/OSYYNTDRt6/2oEgLO1Zd3Rj5WVDoMloTtLJxQJhZGLGbL4pktKSh3NbzdaWdw==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/lossless-json/-/lossless-json-1.0.2.tgz", + "integrity": "sha512-RdV8M8qlWUpmk7gnY3fBB4TNn3Ab8hMMqhJC/sG77t8Zk+hjVwvZGTFv+upEBUkxXbq0+UxGAPhOml83w1IkIQ==" }, "@types/minimist": { "version": "1.2.2", @@ -40967,9 +41132,9 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" }, "@types/nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@types/nprogress/-/nprogress-0.2.0.tgz", - "integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@types/nprogress/-/nprogress-0.2.1.tgz", + "integrity": "sha512-TYuyVnp+nOnimgdOydDIDYIxv2kSeuJZw4tF0p/KG7hpzcMF1WkHaREwM8O4blqfT1F7rq0nht6Ko2KVUfWzBA==" }, "@types/parse-json": { "version": "4.0.0", @@ -40993,9 +41158,9 @@ "dev": true }, "@types/react": { - "version": "18.2.21", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz", - "integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==", + "version": "18.2.22", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.22.tgz", + "integrity": "sha512-60fLTOLqzarLED2O3UQImc/lsNRgG0jE/a1mPW9KjMemY0LMITWEsbS4VvZ4p6rorEHd5YKxxmMKSDK505GHpA==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -41078,24 +41243,24 @@ "dev": true }, "@types/ssh2": { - "version": "1.11.13", - "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.13.tgz", - "integrity": "sha512-08WbG68HvQ2YVi74n2iSUnYHYpUdFc/s2IsI0BHBdJwaqYJpWlVv9elL0tYShTv60yr0ObdxJR5NrCRiGJ/0CQ==", + "version": "1.11.14", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.14.tgz", + "integrity": "sha512-O/U38mvV4jVVrdtZz8KpmitkmeD/PUDeDNNueQhm34166dmaqb1iZ3sfarSxBArM2/iX4PZVJY3EOta0Zks9hw==", "requires": { "@types/node": "^18.11.18" }, "dependencies": { "@types/node": { - "version": "18.17.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz", - "integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==" + "version": "18.18.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.0.tgz", + "integrity": "sha512-3xA4X31gHT1F1l38ATDIL9GpRLdwVhnEFC8Uikv5ZLlXATwrCYyPq7ZWHxzxc3J/30SUiwiYT+bQe0/XvKlWbw==" } } }, "@types/ssh2-streams": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.9.tgz", - "integrity": "sha512-I2J9jKqfmvXLR5GomDiCoHrEJ58hAOmFrekfFqmCFd+A6gaEStvWnPykoWUwld1PNg4G5ag1LwdA+Lz1doRJqg==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.10.tgz", + "integrity": "sha512-r3HYPL0kPxRwk7Nk1P4JxaWPyJ2Mfnfm5efuK0vYgYZu16RerZUTyun6Yqu5KEfc3AR7BvTL1x+nzf7+kbKftQ==", "requires": { "@types/node": "*" } @@ -41106,9 +41271,9 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" }, "@types/tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-qlsQyIY9sN7p221xHuXKNoMfUenOcvEBN4zI8dGsYbYCqHtTarXOEXSIgUnK+GcR0fZDse6pAIc5pIrCh9NefQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/tar-fs/-/tar-fs-2.0.2.tgz", + "integrity": "sha512-XuZRAvdo7FbDfgQCNkc8NOdSae5XtG+of2mTSgJ85G4OG0miN4E8BTGT+JBTLO87RQ7iCwsIDCqCsHnf2IaSXA==", "peer": true, "requires": { "@types/node": "*", @@ -41116,9 +41281,9 @@ } }, "@types/tar-stream": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@types/tar-stream/-/tar-stream-2.2.2.tgz", - "integrity": "sha512-1AX+Yt3icFuU6kxwmPakaiGrJUwG44MpuiqPg4dSolRFk6jmvs4b3IbUol9wKDLIgU76gevn3EwE8y/DkSJCZQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/tar-stream/-/tar-stream-3.1.0.tgz", + "integrity": "sha512-U05c7l6K5VdO1ZV+j3E0NJOX1hfJB497M1+QT2rXx2QqyMbEQJqBw3Utk9eUVnWPyLLqYKt5Ja1kPV1ejm6cZw==", "peer": true, "requires": { "@types/node": "*" @@ -41291,66 +41456,59 @@ } }, "@waveshq/standard-defichain-jellyfishsdk": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-defichain-jellyfishsdk/-/standard-defichain-jellyfishsdk-2.2.0.tgz", - "integrity": "sha512-Wx/kVFDMzI04HQpjylQgFrXOlFncIxD6Me0/AFR+CA6555Bi1nMP8fDoKQgcvgZ7VqMt5UikP3WF3g5sibCqaA==", - "requires": { - "@defichain/jellyfish-address": "4.0.0-beta.10", - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-testing": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", - "@defichain/jellyfish-wallet-encrypted": "4.0.0-beta.10", - "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.10", - "@defichain/playground-api-client": "4.0.0-beta.10", - "@defichain/testcontainers": "4.0.0-beta.10", - "@defichain/whale-api-client": "4.0.0-beta.10", - "@defichain/whale-api-wallet": "4.0.0-beta.10", - "defichain": "4.0.0-beta.10" + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/@waveshq/standard-defichain-jellyfishsdk/-/standard-defichain-jellyfishsdk-2.11.3.tgz", + "integrity": "sha512-miD1adVBTft4aFQnKcOXVpu5kZl+MksZh144UgCLRM9xaSAWWBj1iK/me+Dwro2lSobIqM6i8DFrRbwGzbxjlQ==", + "requires": { + "@defichain/jellyfish-address": "4.0.0-rc.1.2", + "@defichain/jellyfish-api-core": "4.0.0-rc.1.2", + "@defichain/jellyfish-network": "4.0.0-rc.1.2", + "@defichain/jellyfish-testing": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction": "4.0.0-rc.1.2", + "@defichain/jellyfish-transaction-builder": "4.0.0-rc.1.2", + "@defichain/jellyfish-wallet": "4.0.0-rc.1.2", + "@defichain/jellyfish-wallet-encrypted": "4.0.0-rc.1.2", + "@defichain/jellyfish-wallet-mnemonic": "4.0.0-rc.1.2", + "@defichain/playground-api-client": "4.0.0-rc.1.2", + "@defichain/testcontainers": "4.0.0-rc.1.2", + "@defichain/whale-api-client": "4.0.0-rc.1.2", + "@defichain/whale-api-wallet": "4.0.0-rc.1.2", + "defichain": "4.0.0-rc.1.2" } }, "@waveshq/standard-web": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-web/-/standard-web-2.2.0.tgz", - "integrity": "sha512-NGdLji/7kDIj4fy9Gr8YViJTyzri2qxl6WCHCufRF5oRkArmvAYQU4nYh13ocbptFgmVdwk69inZzO98gBCnfQ==", + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/@waveshq/standard-web/-/standard-web-2.11.3.tgz", + "integrity": "sha512-M3IzfeSeSeJCjrw8oZO/YOMoTp8YKgqwj3YZgHmRQ4L4zjhX9msyWTvsdJN5PRyQAu4moVcmlQbqCpkEzQUUxQ==", "requires": { "@netlify/ipx": "^1.4.4", - "@reduxjs/toolkit": "^1.9.5", - "@tanstack/react-query": "^5.0.0-beta.20", - "@types/react": "18.2.21", + "@reduxjs/toolkit": "^1.9.6", + "@tanstack/react-query": "^5.0.0-rc.1", + "@types/react": "18.2.22", "@types/react-dom": "18.2.7", - "follow-redirects": "^1.15.2", - "next": "13.4.19", - "next-sitemap": "^4.2.2", + "follow-redirects": "^1.15.3", + "next": "13.5.3", + "next-sitemap": "^4.2.3", "nextjs-progressbar": "^0.0.16", "react": "18.2.0", "react-dom": "18.2.0", - "react-icons": "^4.10.1", + "react-icons": "^4.11.0", "react-redux": "^8.1.2", "react-responsive": "^9.0.2", - "typescript": "4.9.5" - }, - "dependencies": { - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" - } + "typescript": "*" } }, "@waveshq/standard-web-linter": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-web-linter/-/standard-web-linter-2.2.0.tgz", - "integrity": "sha512-GkNAinp4p4+45hCbozCPN33AeouZRB8PzIRn8Cbqw3ghKKnCOLiTM0oif2A923EK+q7E8JHBt13XjXuGtygHzg==", + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/@waveshq/standard-web-linter/-/standard-web-linter-2.11.3.tgz", + "integrity": "sha512-+u+zQQpvQ8efX5ZkFsqBolKyjlFJpPat1c/w9aNXHLstgoeK7x4JiFKJw5c58d/X+B+sPJr33IjJKK3tn0la4A==", "requires": { - "eslint": "^8.48.0", + "eslint": "^8.50.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-config-next": "13.4.19", + "eslint-config-next": "13.5.3", "eslint-config-prettier": "^9.0.0", - "eslint-plugin-cypress": "^2.14.0", + "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-node": "^11.1.0", @@ -41360,37 +41518,30 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "husky": "^8.0.3", "lint-staged": "^14.0.1", - "next": "13.4.19", - "prettier": "^3.0.2", - "typescript": "4.9.5" - }, - "dependencies": { - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" - } + "next": "13.5.3", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, "@waveshq/walletkit-core": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@waveshq/walletkit-core/-/walletkit-core-1.3.2.tgz", - "integrity": "sha512-h0COj+RxfhXKmYyvo3MKdx94fJax5k/+kqs/zJ9LZhrcw7HhORmVVrfMXomPS7kdH3+gs+g6xVIGh0AzRlNTyw==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@waveshq/walletkit-core/-/walletkit-core-1.3.5.tgz", + "integrity": "sha512-n8CX/+FBOl8v/8Xqdi3phlx0teleRxjwo1kmXPnT7SmGC0ASRa2l46YQRMxBrqBS4mXRSTyQU9ufnpzY31UjfQ==", "requires": { "bignumber.js": "^9.1.1", "ethers": "^5.7.2" } }, "@waveshq/walletkit-ui": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@waveshq/walletkit-ui/-/walletkit-ui-1.3.2.tgz", - "integrity": "sha512-eqBaPOA/Ztg4jzLQALKKgeL6yp0B3SKfJnWbLuUKeOfeiCUIjO1Nooyvh44tEII+HDeLNg7M3CseZrQlPsJEdg==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@waveshq/walletkit-ui/-/walletkit-ui-1.3.5.tgz", + "integrity": "sha512-0EtBk44BTZA4MuGcmvr04o2TDskoYvxOhWv1rc701soD7jfbdfjbDup9vxEZF0OgXNdmW6A5ckTbg1qNS4geDg==", "requires": { "@stickyjs/jest": "^1.3.2", - "@waveshq/standard-defichain-jellyfishsdk": "^2.2.0", - "@waveshq/standard-web": "^2.2.0", - "@waveshq/standard-web-linter": "^2.2.0", - "@waveshq/walletkit-core": "1.3.2", + "@waveshq/standard-defichain-jellyfishsdk": "^2.11.2", + "@waveshq/standard-web": "^2.11.2", + "@waveshq/standard-web-linter": "^2.11.2", + "@waveshq/walletkit-core": "1.3.5", "bignumber.js": "^9.1.1", "dayjs": "^1.11.9", "immer": "^9.0.21", @@ -41676,9 +41827,9 @@ "dev": true }, "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" }, "agent-base": { "version": "6.0.2", @@ -43256,9 +43407,9 @@ } }, "citty": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.3.tgz", - "integrity": "sha512-tb6zTEb2BDSrzFedqFYFUKUuKNaxVJWCm7o02K4kADGkBDyyiz7D40rDMpguczdZyAN3aetd5fhpB01HkreNyg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.4.tgz", + "integrity": "sha512-Q3bK1huLxzQrvj7hImJ7Z1vKYJRPQCDnd0EjXfHMidcjecGOMuLrmuQmtWmFkuKLcMThlGh1yCKG8IEc6VeNXQ==", "requires": { "consola": "^3.2.3" } @@ -43536,9 +43687,9 @@ "integrity": "sha512-Kgy+2+Uwr75vAi6ChWXgHuLvd+QLD7ssgpaRq2zCvt80ptvAfMc/hijcJxXkBa2wMlEZcJvC2H8Ubo+A9ATHIg==" }, "compress-commons": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", - "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", "requires": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", @@ -43999,9 +44150,9 @@ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" }, "crc32-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", - "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", "requires": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" @@ -44733,9 +44884,9 @@ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" }, "defichain": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/defichain/-/defichain-4.0.0-beta.10.tgz", - "integrity": "sha512-6+OxGSFm1C0nDCOavmyGTFtSPWjpRt/bUk8gd2hCdfKPw2N7VAVoYdIGleYvrs00btRIdJ0XgmFnaq8v12NjlA==" + "version": "4.0.0-rc.1.2", + "resolved": "https://registry.npmjs.org/defichain/-/defichain-4.0.0-rc.1.2.tgz", + "integrity": "sha512-GKZ14ci0X+kJyYqU+GXS3Bwcc9GJq8yrDR5WXbwKIKKbUJbkntQIWAUGNOrDUqjOkhHIcbdx/9JKOqvash5r5g==" }, "define-lazy-prop": { "version": "2.0.0", @@ -44822,9 +44973,9 @@ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" }, "destr": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/destr/-/destr-1.2.2.tgz", - "integrity": "sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", + "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" }, "destroy": { "version": "1.2.0", @@ -45429,15 +45580,15 @@ } }, "eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", - "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.12.4", @@ -45890,18 +46041,18 @@ } }, "eslint-config-next": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.4.19.tgz", - "integrity": "sha512-WE8367sqMnjhWHvR5OivmfwENRQ1ixfNE9hZwQqNCsd+iM3KnuMc1V8Pt6ytgjxjf23D+xbesADv9x3xaKfT3g==", + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.5.3.tgz", + "integrity": "sha512-VN2qbCpq2DMWgs7SVF8KTmc8bVaWz3s4nmcFqRLs7PNBt5AXejOhJuZ4zg2sCEHOvz5RvqdwLeI++NSCV6qHVg==", "requires": { - "@next/eslint-plugin-next": "13.4.19", - "@rushstack/eslint-patch": "^1.1.3", + "@next/eslint-plugin-next": "13.5.3", + "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.31.7", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705" } }, @@ -46253,9 +46404,9 @@ } }, "eslint-import-resolver-typescript": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", - "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", "requires": { "debug": "^4.3.4", "enhanced-resolve": "^5.12.0", @@ -46294,9 +46445,9 @@ } }, "eslint-plugin-cypress": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.14.0.tgz", - "integrity": "sha512-eW6tv7iIg7xujleAJX4Ujm649Bf5jweqa4ObPEIuueYRyLZt7qXGWhCY/n4bfeFW/j6nQZwbIBHKZt6EKcL/cg==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", + "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", "requires": { "globals": "^13.20.0" }, @@ -47632,9 +47783,9 @@ "integrity": "sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w==" }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" }, "fontfaceobserver": { "version": "2.3.0", @@ -47956,9 +48107,9 @@ "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" }, "get-port-please": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.0.2.tgz", - "integrity": "sha512-c14cAITf0E+uqdxGALvyYHwOL7UsnWcv3oDtgDAZksiVSGN87xlWVUWGZcmWQU3cICdaOxT+6LdQzUfK2ei1SA==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.1.tgz", + "integrity": "sha512-3UBAyM3u4ZBVYDsxOQfJDxEa6XTbpBDrOjp4mf7ExFRt5BKs/QywQQiJsh2B+hxcZLSapWqCRvElUe8DnKcFHA==" }, "get-stream": { "version": "5.2.0", @@ -47978,9 +48129,9 @@ } }, "get-tsconfig": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", - "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", "requires": { "resolve-pkg-maps": "^1.0.0" } @@ -48292,13 +48443,6 @@ "ufo": "^1.3.0", "uncrypto": "^0.1.3", "unenv": "^1.7.4" - }, - "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - } } }, "handlebars": { @@ -48898,28 +49042,28 @@ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "ipx": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ipx/-/ipx-1.2.0.tgz", - "integrity": "sha512-FkEP56C08HdlqlWKm3pMhatywPtDBTlePTdzskksCR1+7xnB6fQs6pXOTXPTG5i+gGPgCOxbNMUSZEH/DQcWDA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ipx/-/ipx-1.3.0.tgz", + "integrity": "sha512-Jfu+zQ0NGZwSeZ11CGMOnqWFlIyVcT8dW48e5UxKnMjQXXDy8VLTl8FIP7vRIJ9hd3ZPaJ/RIXXLJfZmBqRXWQ==", "requires": { "@fastify/accept-negotiator": "^1.1.0", - "consola": "^3.1.0", + "consola": "^3.2.3", "defu": "^6.1.2", - "destr": "^1.2.2", + "destr": "^2.0.1", "etag": "^1.8.1", "image-meta": "^0.1.1", - "listhen": "^1.0.4", - "node-fetch-native": "^1.1.1", + "listhen": "^1.4.4", + "node-fetch-native": "^1.4.0", "pathe": "^1.1.1", - "sharp": "^0.32.1", - "ufo": "^1.1.2", + "sharp": "^0.32.5", + "ufo": "^1.3.0", "xss": "^1.0.14" } }, "iron-webcrypto": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-0.8.0.tgz", - "integrity": "sha512-gScdcWHjTGclCU15CIv2r069NoQrys1UeUFFfaO1hL++ytLHkVw7N5nXJmFf3J2LEDMz1PkrvC0m62JEeu1axQ==" + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-0.8.2.tgz", + "integrity": "sha512-jGiwmpgTuF19Vt4hn3+AzaVFGpVZt7A1ysd5ivFel2r4aNVFwqaYa6aU6qsF1PM7b+WFivZHz3nipwUOXaOnHg==" }, "is-arguments": { "version": "1.1.1", @@ -51020,9 +51164,9 @@ "integrity": "sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==" }, "jiti": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.19.3.tgz", - "integrity": "sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==" + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", + "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==" }, "joi": { "version": "17.9.2", @@ -51334,9 +51478,9 @@ } }, "keccak": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", - "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0", @@ -51699,23 +51843,24 @@ } }, "listhen": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.4.3.tgz", - "integrity": "sha512-qVWeM07q7q5R3jwB+Zm603khFQ3yq5OLmAwLIlE3Ftv1K9yfwx4R6/tbCkkr0/SrIyKnHK9xY1C6j03uGOSnIQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.5.5.tgz", + "integrity": "sha512-LXe8Xlyh3gnxdv4tSjTjscD1vpr/2PRpzq8YIaMJgyKzRG8wdISlWVWnGThJfHnlJ6hmLt2wq1yeeix0TEbuoA==", "requires": { "@parcel/watcher": "^2.3.0", "@parcel/watcher-wasm": "2.3.0", - "citty": "^0.1.3", + "citty": "^0.1.4", "clipboardy": "^3.0.0", "consola": "^3.2.3", "defu": "^6.1.2", - "get-port-please": "^3.0.2", + "get-port-please": "^3.1.1", "h3": "^1.8.1", "http-shutdown": "^1.2.2", - "jiti": "^1.19.3", - "mlly": "^1.4.1", + "jiti": "^1.20.0", + "mlly": "^1.4.2", "node-forge": "^1.3.1", "pathe": "^1.1.1", + "std-env": "^3.4.3", "ufo": "^1.3.0", "untun": "^0.1.2", "uqr": "^0.1.2" @@ -53162,9 +53307,9 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "mlly": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.1.tgz", - "integrity": "sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", "requires": { "acorn": "^8.10.0", "pathe": "^1.1.1", @@ -53259,9 +53404,9 @@ } }, "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" }, "nanoid": { "version": "3.3.6", @@ -53300,21 +53445,21 @@ "integrity": "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A==" }, "next": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/next/-/next-13.4.19.tgz", - "integrity": "sha512-HuPSzzAbJ1T4BD8e0bs6B9C1kWQ6gv8ykZoRWs5AQoiIuqbGHHdQO7Ljuvg05Q0Z24E2ABozHe6FxDvI6HfyAw==", - "requires": { - "@next/env": "13.4.19", - "@next/swc-darwin-arm64": "13.4.19", - "@next/swc-darwin-x64": "13.4.19", - "@next/swc-linux-arm64-gnu": "13.4.19", - "@next/swc-linux-arm64-musl": "13.4.19", - "@next/swc-linux-x64-gnu": "13.4.19", - "@next/swc-linux-x64-musl": "13.4.19", - "@next/swc-win32-arm64-msvc": "13.4.19", - "@next/swc-win32-ia32-msvc": "13.4.19", - "@next/swc-win32-x64-msvc": "13.4.19", - "@swc/helpers": "0.5.1", + "version": "13.5.3", + "resolved": "https://registry.npmjs.org/next/-/next-13.5.3.tgz", + "integrity": "sha512-4Nt4HRLYDW/yRpJ/QR2t1v63UOMS55A38dnWv3UDOWGezuY0ZyFO1ABNbD7mulVzs9qVhgy2+ppjdsANpKP1mg==", + "requires": { + "@next/env": "13.5.3", + "@next/swc-darwin-arm64": "13.5.3", + "@next/swc-darwin-x64": "13.5.3", + "@next/swc-linux-arm64-gnu": "13.5.3", + "@next/swc-linux-arm64-musl": "13.5.3", + "@next/swc-linux-x64-gnu": "13.5.3", + "@next/swc-linux-x64-musl": "13.5.3", + "@next/swc-win32-arm64-msvc": "13.5.3", + "@next/swc-win32-ia32-msvc": "13.5.3", + "@next/swc-win32-x64-msvc": "13.5.3", + "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -53336,9 +53481,9 @@ } }, "next-sitemap": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.2.tgz", - "integrity": "sha512-cz5PyFibUNSJSXOY5mllq5TW0OH6SGG+8GJ9fR9pl1Thu4rvkDye+0N0790h+9kQihDStuVw2xfwC3qihDkflA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.3.tgz", + "integrity": "sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==", "requires": { "@corex/deepmerge": "^4.0.43", "@next/env": "^13.4.3", @@ -53919,13 +54064,6 @@ "destr": "^2.0.1", "node-fetch-native": "^1.4.0", "ufo": "^1.3.0" - }, - "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - } } }, "omggif": { @@ -54632,9 +54770,9 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==" }, "prettier": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz", - "integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -55144,9 +55282,9 @@ "requires": {} }, "react-icons": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", - "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.11.0.tgz", + "integrity": "sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==", "requires": {} }, "react-is": { @@ -56460,9 +56598,9 @@ "integrity": "sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==" }, "sharp": { - "version": "0.32.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.5.tgz", - "integrity": "sha512-0dap3iysgDkNaPOaOL4X/0akdu0ma62GcdC2NBQ+93eqpePdDdr2/LM0sFdDSMmN7yS+odyZtPsb7tx/cYBKnQ==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "requires": { "color": "^4.2.3", "detect-libc": "^2.0.2", @@ -57359,6 +57497,11 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" }, + "std-env": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz", + "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==" + }, "stop-iteration-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", @@ -58718,9 +58861,9 @@ "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" }, "typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==" + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==" }, "ua-parser-js": { "version": "1.0.35", @@ -58877,11 +59020,6 @@ "ufo": "^1.2.0" }, "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - }, "lru-cache": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", @@ -59093,9 +59231,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, "v8-compile-cache": { "version": "2.4.0", @@ -59736,13 +59874,45 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, "zip-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", - "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", "requires": { - "archiver-utils": "^2.1.0", - "compress-commons": "^4.1.0", + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", "readable-stream": "^3.6.0" + }, + "dependencies": { + "archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "requires": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "zod": { diff --git a/package.json b/package.json index 1b100fe310..34b145be52 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "buffer": "^6.0.3", "classnames": "^2.3.2", "dayjs": "^1.11.9", + "ethers": "^5.7.1", "expo": "^49.0.7", "expo-asset": "~8.10.1", "expo-barcode-scanner": "~12.5.3", From 8183f5ddbe72ed1fbeb47706339d451def96c360 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Wed, 27 Sep 2023 15:33:30 +0800 Subject: [PATCH 02/16] feat(core): fix evmxt 'to' address for dvm to evm transferdomain --- mobile-app/app/api/transaction/transfer_domain.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 79566adf75..c9b39e0ed8 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -32,6 +32,7 @@ export async function transferDomainSigner( ): Promise { const dvmScript = await account.getScript(); const evmScript = await account.getEvmScript(); + const evmAddress = await account.getEvmAddress(); const builder = account.withTransactionBuilder(); const [sourceScript, dstScript] = @@ -50,11 +51,11 @@ export async function transferDomainSigner( const TD_CONTRACT_ADDR = "0x0000000000000000000000000000000000000302"; const tdIFace = new utils.Interface(TransferDomain.abi); - const from = + const from = evmAddress; + const to = convertDirection === ConvertDirection.evmToDvm - ? await account.getEvmAddress() - : await account.getAddress(); - const to = TD_CONTRACT_ADDR; + ? TD_CONTRACT_ADDR + : evmAddress; const evmAmount = BN.from(amount.toString()).toHexString(); // "0x29a2241af62c0000"; // 3_000_000_000_000_000_000 const native = await account.getAddress(); const data = tdIFace.encodeFunctionData("transfer", [ From 585771eb495a790c7967e829eb5d7a088730170a Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Thu, 28 Sep 2023 23:27:55 +0800 Subject: [PATCH 03/16] feat(core): update transferdomain implementation for dst20 tokens --- .../app/api/transaction/transfer_domain.ts | 60 +++++- .../app/contexts/FeatureFlagContext.tsx | 21 +- mobile-app/app/contracts/TransferDomain.json | 150 --------------- .../app/contracts/TransferDomainImplV1.json | 181 ++++++++++++++++++ 4 files changed, 242 insertions(+), 170 deletions(-) delete mode 100644 mobile-app/app/contracts/TransferDomain.json create mode 100644 mobile-app/app/contracts/TransferDomainImplV1.json diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index c9b39e0ed8..4022645e58 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -1,6 +1,6 @@ import { translate } from "@translations"; import BigNumber from "bignumber.js"; -import { ethers, utils, BigNumber as BN } from "ethers"; +import { ethers, utils } from "ethers"; // import { providers } from "ethers"; // TODO: Uncomment import { DfTxSigner } from "@waveshq/walletkit-ui/dist/store"; import { WhaleWalletAccount } from "@defichain/whale-api-wallet"; @@ -9,7 +9,8 @@ import { TransactionSegWit, } from "@defichain/jellyfish-transaction"; import { ConvertDirection } from "@screens/enum"; -import TransferDomain from "../../contracts/TransferDomain.json"; +import { parseUnits } from "ethers/lib/utils"; +import TransferDomain from "../../contracts/TransferDomainImplV1.json"; const TRANSFER_DOMAIN_TYPE = { DVM: 2, @@ -45,28 +46,65 @@ export async function transferDomainSigner( ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; + console.log("YOHOOOOO TD SIGNER2:: ", { sourceTokenId, targetTokenId }); + console.log("YOHOOOOO TD SIGNER2:: ", { + sourceTokenId, + targetTokenId, + toAddr: await account.getAddress(), + }); + /** * TODO: Start of EvmTx signer here * */ - const TD_CONTRACT_ADDR = "0x0000000000000000000000000000000000000302"; + const TD_CONTRACT_ADDR = "0xdf00000000000000000000000000000000000001"; const tdIFace = new utils.Interface(TransferDomain.abi); + let data; const from = evmAddress; const to = convertDirection === ConvertDirection.evmToDvm ? TD_CONTRACT_ADDR : evmAddress; - const evmAmount = BN.from(amount.toString()).toHexString(); // "0x29a2241af62c0000"; // 3_000_000_000_000_000_000 - const native = await account.getAddress(); - const data = tdIFace.encodeFunctionData("transfer", [ + const parsedAmount = parseUnits(amount.toString(), 18); + const vmAddress = await account.getAddress(); + console.log("YOHOOOOO TD SIGNER3:: ", { from, to, - evmAmount, - native, - ]); + parsedAmount, + vmAddress, + }); + + // const to = "0xb04Aa766ECe6F9e92c6E909DD99Bb1fA1c6C0412"; + if (sourceTokenId === "0" || targetTokenId === "0-EVM") { + console.log("YOHOOOOO NATIVE DFI TOKEN...."); + data = tdIFace.encodeFunctionData("transfer", [ + from, + to, + parsedAmount, + vmAddress, + ]); + } else { + // DST20 - BTC + console.log("YOHOOOOO NON-DFI TOKEN...."); + + /** + * TODO: Either construct the token address based on `ain` logic or add a config file to map the address for each token + */ + const DST_20_CONTRACT_ADDR_BTC = + "0xff00000000000000000000000000000000000001"; + data = tdIFace.encodeFunctionData("transferDST20", [ + DST_20_CONTRACT_ADDR_BTC, + from, + to, + parsedAmount, + vmAddress, + ]); + } + // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment const privateKey = await account.privateKey(); const wallet = new ethers.Wallet(privateKey); + console.log("YOHOOO-WALLETADDR: ", { address: wallet.address, privateKey }); /* TODO: Figure out CORS issue when using the ethRpc const tx: any = { @@ -78,7 +116,6 @@ export async function transferDomainSigner( gasLimit: 100_000, gasPrice: (await ethRpc.getFeeData()).gasPrice, // base fee }; */ - const tx: any = { to: TD_CONTRACT_ADDR, nonce: 0, @@ -92,6 +129,7 @@ export async function transferDomainSigner( const evmtxSigned = (await wallet.signTransaction(tx)).substring(2); // rm prefix `0x` const evmTx = new Uint8Array(Buffer.from(evmtxSigned, "hex")) || new Uint8Array([]); + console.log("YOHOOOOO EVMTX: ", { evmTx }); const signed: TransactionSegWit = await builder.account.transferDomain( { @@ -147,6 +185,8 @@ export function transferDomainCrafter( throw new Error("Unexpected transfer domain"); } + console.log("YOHOOOO TD CRAFTER"); + const [symbolA, symbolB] = convertDirection === ConvertDirection.dvmToEvm ? [sourceToken.displayTextSymbol, `${targetToken.displayTextSymbol}-EVM`] diff --git a/mobile-app/app/contexts/FeatureFlagContext.tsx b/mobile-app/app/contexts/FeatureFlagContext.tsx index 4f2ef2595e..31e33367a0 100644 --- a/mobile-app/app/contexts/FeatureFlagContext.tsx +++ b/mobile-app/app/contexts/FeatureFlagContext.tsx @@ -43,7 +43,7 @@ export function useFeatureFlagContext(): FeatureFlagContextI { } export function FeatureFlagProvider( - props: React.PropsWithChildren + props: React.PropsWithChildren, ): JSX.Element | null { const { network } = useNetworkContext(); const { url, isCustomUrl } = useServiceProviderContext(); @@ -80,7 +80,7 @@ export function FeatureFlagProvider( satisfies(appVersion, flag.version) && flag.networks?.includes(network) && flag.id === featureId && - flag.stage === "beta" + flag.stage === "beta", ); } @@ -118,7 +118,7 @@ export function FeatureFlagProvider( } const updateEnabledFeatures = async ( - flags: FeatureFlagID[] + flags: FeatureFlagID[], ): Promise => { setEnabledFeatures(flags); await FeatureFlagPersistence.set(flags); @@ -146,13 +146,14 @@ export function FeatureFlagProvider( updateEnabledFeatures, isFeatureAvailable, isBetaFeature, - hasBetaFeatures: featureFlags.some( - (flag) => - satisfies(appVersion, flag.version) && - flag.networks?.includes(network) && - flag.platforms?.includes(Platform.OS) && - flag.stage === "beta" - ), + hasBetaFeatures: true, + // hasBetaFeatures: featureFlags.some( + // (flag) => + // satisfies(appVersion, flag.version) && + // flag.networks?.includes(network) && + // flag.platforms?.includes(Platform.OS) && + // flag.stage === "beta" + // ), }; if (isError && !isLoading && retries < MAX_RETRY) { diff --git a/mobile-app/app/contracts/TransferDomain.json b/mobile-app/app/contracts/TransferDomain.json deleted file mode 100644 index d576a7200e..0000000000 --- a/mobile-app/app/contracts/TransferDomain.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TransferDomain", - "sourceName": "contracts/TransferDomain.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "nativeAddress", - "type": "string" - } - ], - "name": "NativeAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "nativeAddress", - "type": "string" - } - ], - "name": "bridgeDST20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "nativeAddress", - "type": "string" - } - ], - "name": "transfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506109b8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c578063313ce5671461007a5780635a4623b61461009857806395d89b41146100b4578063d57b2826146100d2575b600080fd5b6100646100ee565b6040516100719190610454565b60405180910390f35b61008261012b565b60405161008f9190610492565b60405180910390f35b6100b260048036038101906100ad91906106c8565b610134565b005b6100bc610227565b6040516100c99190610454565b60405180910390f35b6100ec60048036038101906100e7919061075f565b610264565b005b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b60006012905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146101e9578473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b81526004016101a49392919061085f565b6020604051808303816000875af11580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906108ce565b505b7f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516102189190610454565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461032257814710156102da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d190610947565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161037f9190610967565b60405180910390a37f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516103b69190610454565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103fe5780820151818401526020810190506103e3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610426826103c4565b61043081856103cf565b93506104408185602086016103e0565b6104498161040a565b840191505092915050565b6000602082019050818103600083015261046e818461041b565b905092915050565b600060ff82169050919050565b61048c81610476565b82525050565b60006020820190506104a76000830184610483565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ec826104c1565b9050919050565b6104fc816104e1565b811461050757600080fd5b50565b600081359050610519816104f3565b92915050565b600061052a826104c1565b9050919050565b61053a8161051f565b811461054557600080fd5b50565b60008135905061055781610531565b92915050565b6000819050919050565b6105708161055d565b811461057b57600080fd5b50565b60008135905061058d81610567565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105d58261040a565b810181811067ffffffffffffffff821117156105f4576105f361059d565b5b80604052505050565b60006106076104ad565b905061061382826105cc565b919050565b600067ffffffffffffffff8211156106335761063261059d565b5b61063c8261040a565b9050602081019050919050565b82818337600083830152505050565b600061066b61066684610618565b6105fd565b90508281526020810184848401111561068757610686610598565b5b610692848285610649565b509392505050565b600082601f8301126106af576106ae610593565b5b81356106bf848260208601610658565b91505092915050565b600080600080600060a086880312156106e4576106e36104b7565b5b60006106f28882890161050a565b95505060206107038882890161050a565b945050604061071488828901610548565b93505060606107258882890161057e565b925050608086013567ffffffffffffffff811115610746576107456104bc565b5b6107528882890161069a565b9150509295509295909350565b60008060008060808587031215610779576107786104b7565b5b60006107878782880161050a565b945050602061079887828801610548565b93505060406107a98782880161057e565b925050606085013567ffffffffffffffff8111156107ca576107c96104bc565b5b6107d68782880161069a565b91505092959194509250565b6107eb816104e1565b82525050565b6000819050919050565b600061081661081161080c846104c1565b6107f1565b6104c1565b9050919050565b6000610828826107fb565b9050919050565b600061083a8261081d565b9050919050565b61084a8161082f565b82525050565b6108598161055d565b82525050565b600060608201905061087460008301866107e2565b6108816020830185610841565b61088e6040830184610850565b949350505050565b60008115159050919050565b6108ab81610896565b81146108b657600080fd5b50565b6000815190506108c8816108a2565b92915050565b6000602082840312156108e4576108e36104b7565b5b60006108f2848285016108b9565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610931601d836103cf565b915061093c826108fb565b602082019050919050565b6000602082019050818103600083015261096081610924565b9050919050565b600060208201905061097c6000830184610850565b9291505056fea26469706673582212200b351e22b19ac8482db5acafcaedfb8b91e766506933222072f36e5417e7bbf864736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c578063313ce5671461007a5780635a4623b61461009857806395d89b41146100b4578063d57b2826146100d2575b600080fd5b6100646100ee565b6040516100719190610454565b60405180910390f35b61008261012b565b60405161008f9190610492565b60405180910390f35b6100b260048036038101906100ad91906106c8565b610134565b005b6100bc610227565b6040516100c99190610454565b60405180910390f35b6100ec60048036038101906100e7919061075f565b610264565b005b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b60006012905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146101e9578473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b81526004016101a49392919061085f565b6020604051808303816000875af11580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906108ce565b505b7f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516102189190610454565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461032257814710156102da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d190610947565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161037f9190610967565b60405180910390a37f12c780c9fb4c8747cd81626cec0e8958e858fb859cc93ddb04a45d42765596f2816040516103b69190610454565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103fe5780820151818401526020810190506103e3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610426826103c4565b61043081856103cf565b93506104408185602086016103e0565b6104498161040a565b840191505092915050565b6000602082019050818103600083015261046e818461041b565b905092915050565b600060ff82169050919050565b61048c81610476565b82525050565b60006020820190506104a76000830184610483565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ec826104c1565b9050919050565b6104fc816104e1565b811461050757600080fd5b50565b600081359050610519816104f3565b92915050565b600061052a826104c1565b9050919050565b61053a8161051f565b811461054557600080fd5b50565b60008135905061055781610531565b92915050565b6000819050919050565b6105708161055d565b811461057b57600080fd5b50565b60008135905061058d81610567565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105d58261040a565b810181811067ffffffffffffffff821117156105f4576105f361059d565b5b80604052505050565b60006106076104ad565b905061061382826105cc565b919050565b600067ffffffffffffffff8211156106335761063261059d565b5b61063c8261040a565b9050602081019050919050565b82818337600083830152505050565b600061066b61066684610618565b6105fd565b90508281526020810184848401111561068757610686610598565b5b610692848285610649565b509392505050565b600082601f8301126106af576106ae610593565b5b81356106bf848260208601610658565b91505092915050565b600080600080600060a086880312156106e4576106e36104b7565b5b60006106f28882890161050a565b95505060206107038882890161050a565b945050604061071488828901610548565b93505060606107258882890161057e565b925050608086013567ffffffffffffffff811115610746576107456104bc565b5b6107528882890161069a565b9150509295509295909350565b60008060008060808587031215610779576107786104b7565b5b60006107878782880161050a565b945050602061079887828801610548565b93505060406107a98782880161057e565b925050606085013567ffffffffffffffff8111156107ca576107c96104bc565b5b6107d68782880161069a565b91505092959194509250565b6107eb816104e1565b82525050565b6000819050919050565b600061081661081161080c846104c1565b6107f1565b6104c1565b9050919050565b6000610828826107fb565b9050919050565b600061083a8261081d565b9050919050565b61084a8161082f565b82525050565b6108598161055d565b82525050565b600060608201905061087460008301866107e2565b6108816020830185610841565b61088e6040830184610850565b949350505050565b60008115159050919050565b6108ab81610896565b81146108b657600080fd5b50565b6000815190506108c8816108a2565b92915050565b6000602082840312156108e4576108e36104b7565b5b60006108f2848285016108b9565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610931601d836103cf565b915061093c826108fb565b602082019050919050565b6000602082019050818103600083015261096081610924565b9050919050565b600060208201905061097c6000830184610850565b9291505056fea26469706673582212200b351e22b19ac8482db5acafcaedfb8b91e766506933222072f36e5417e7bbf864736f6c63430008130033", - "linkReferences": {}, - "deployedLinkReferences": {} - } - \ No newline at end of file diff --git a/mobile-app/app/contracts/TransferDomainImplV1.json b/mobile-app/app/contracts/TransferDomainImplV1.json new file mode 100644 index 0000000000..e746511294 --- /dev/null +++ b/mobile-app/app/contracts/TransferDomainImplV1.json @@ -0,0 +1,181 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TransferDomainImplV1", + "sourceName": "contracts/TransferDomainImplV1.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "vmAddress", + "type": "string" + } + ], + "name": "VMTransfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address payable", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "vmAddress", + "type": "string" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address payable", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "vmAddress", + "type": "string" + } + ], + "name": "transferDST20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610a77806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea2646970667358221220341907efb37ae32332d194c4c439d4ab7e1f8041fea280bb9556452c61d954c964736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea2646970667358221220341907efb37ae32332d194c4c439d4ab7e1f8041fea280bb9556452c61d954c964736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} From 57e775b26ab9b005e105bb6b893d0e5cc68fb86e Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Fri, 29 Sep 2023 13:19:17 +0800 Subject: [PATCH 04/16] feat(core): update handle transferdomain tokenId for EVM tokens --- mobile-app/app/api/transaction/transfer_domain.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 4022645e58..b066268ea6 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -70,6 +70,7 @@ export async function transferDomainSigner( console.log("YOHOOOOO TD SIGNER3:: ", { from, to, + amount, parsedAmount, vmAddress, }); @@ -138,7 +139,7 @@ export async function transferDomainSigner( src: { address: sourceScript, amount: { - token: Number(sourceTokenId), + token: Number(sourceTokenId.split("-EVM")[0]), amount, }, domain: srcDomain, @@ -150,7 +151,7 @@ export async function transferDomainSigner( dst: { address: dstScript, amount: { - token: Number(targetTokenId), + token: Number(targetTokenId.split("-EVM")[0]), amount, }, domain: dstDomain, From ce56140adf62c6106fc834b022a6b71aba5c53c0 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Mon, 2 Oct 2023 13:34:21 +0800 Subject: [PATCH 05/16] update docker --- docker-compose.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ed37f5d4f3..927d15ef7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,17 +12,21 @@ services: ports: - "19553:80" - "19552:8080" - - "19551:8082" + # - "19551:8082" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" defi-blockchain: - image: defi/defichain:master-91a01aea0 + image: defi/defichain:4.0.0-beta13 + ports: + - "19554:19554" + - "19551:19551" command: > defid -printtoconsole -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 + -ethrpcbind=0.0.0.0 -rpcuser=playground -rpcpassword=playground -rpcworkqueue=512 @@ -55,10 +59,9 @@ services: -grandcentralheight=16 -grandcentralepilogueheight=17 -nextnetworkupgradeheight=18 - -changiintermediateheight=19 defi-playground: - image: ghcr.io/birthdayresearch/playground-api:3.34.0 + image: ghcr.io/birthdayresearch/playground-api:4.0.0-rc.1.2 depends_on: - defi-blockchain ports: @@ -71,7 +74,7 @@ services: - "traefik.http.routers.playground.entrypoints=web" defi-whale: - image: ghcr.io/birthdayresearch/whale-api:3.34.0 + image: ghcr.io/birthdayresearch/whale-api:4.0.0-rc.1.2 depends_on: - defi-blockchain ports: From b544c7580abaab15318a9a81affbaf1d392f37a8 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Mon, 2 Oct 2023 21:03:22 +0800 Subject: [PATCH 06/16] update evmtx signature --- docker-compose.yml | 2 + .../app/api/transaction/transfer_domain.ts | 175 +++++++----------- ...omainImplV1.json => TransferDomainV1.json} | 8 +- 3 files changed, 78 insertions(+), 107 deletions(-) rename mobile-app/app/contracts/{TransferDomainImplV1.json => TransferDomainV1.json} (97%) diff --git a/docker-compose.yml b/docker-compose.yml index 927d15ef7c..3ca3f6fc3e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,6 +59,8 @@ services: -grandcentralheight=16 -grandcentralepilogueheight=17 -nextnetworkupgradeheight=18 + environment: + - RUST_LOG=debug defi-playground: image: ghcr.io/birthdayresearch/playground-api:4.0.0-rc.1.2 diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index b066268ea6..59016d7a99 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -1,16 +1,15 @@ import { translate } from "@translations"; import BigNumber from "bignumber.js"; -import { ethers, utils } from "ethers"; -// import { providers } from "ethers"; // TODO: Uncomment +import { ethers, providers, utils } from "ethers"; import { DfTxSigner } from "@waveshq/walletkit-ui/dist/store"; import { WhaleWalletAccount } from "@defichain/whale-api-wallet"; import { CTransactionSegWit, - TransactionSegWit, + TransferDomain, } from "@defichain/jellyfish-transaction"; import { ConvertDirection } from "@screens/enum"; import { parseUnits } from "ethers/lib/utils"; -import TransferDomain from "../../contracts/TransferDomainImplV1.json"; +import TransferDomainV1 from "../../contracts/TransferDomainV1.json"; const TRANSFER_DOMAIN_TYPE = { DVM: 2, @@ -32,137 +31,102 @@ export async function transferDomainSigner( convertDirection: ConvertDirection, ): Promise { const dvmScript = await account.getScript(); + const dvmAddress = await account.getAddress(); const evmScript = await account.getEvmScript(); const evmAddress = await account.getEvmAddress(); const builder = account.withTransactionBuilder(); - const [sourceScript, dstScript] = - convertDirection === ConvertDirection.evmToDvm - ? [evmScript, dvmScript] - : [dvmScript, evmScript]; + const isEvmToDvm = convertDirection === ConvertDirection.evmToDvm; - const [srcDomain, dstDomain] = - convertDirection === ConvertDirection.evmToDvm - ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] - : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; + const [sourceScript, dstScript] = isEvmToDvm + ? [evmScript, dvmScript] + : [dvmScript, evmScript]; - console.log("YOHOOOOO TD SIGNER2:: ", { sourceTokenId, targetTokenId }); - console.log("YOHOOOOO TD SIGNER2:: ", { - sourceTokenId, - targetTokenId, - toAddr: await account.getAddress(), - }); + const [srcDomain, dstDomain] = isEvmToDvm + ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] + : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; /** * TODO: Start of EvmTx signer here * */ const TD_CONTRACT_ADDR = "0xdf00000000000000000000000000000000000001"; - const tdIFace = new utils.Interface(TransferDomain.abi); + const DST_20_CONTRACT_ADDR_BTC = "0xff00000000000000000000000000000000000001"; + const tdFace = new utils.Interface(TransferDomainV1.abi); let data; - const from = evmAddress; - const to = - convertDirection === ConvertDirection.evmToDvm - ? TD_CONTRACT_ADDR - : evmAddress; - const parsedAmount = parseUnits(amount.toString(), 18); - const vmAddress = await account.getAddress(); - console.log("YOHOOOOO TD SIGNER3:: ", { - from, - to, - amount, - parsedAmount, - vmAddress, - }); - - // const to = "0xb04Aa766ECe6F9e92c6E909DD99Bb1fA1c6C0412"; + const from = isEvmToDvm ? evmAddress : TD_CONTRACT_ADDR; + const to = isEvmToDvm ? TD_CONTRACT_ADDR : evmAddress; + const parsedAmount = parseUnits(amount.toString(), 18); // TODO: Get decimals from token contract + const vmAddress = dvmAddress; + if (sourceTokenId === "0" || targetTokenId === "0-EVM") { - console.log("YOHOOOOO NATIVE DFI TOKEN...."); - data = tdIFace.encodeFunctionData("transfer", [ - from, - to, - parsedAmount, - vmAddress, - ]); + /** + * For DFI, use `transfer` function + */ + const transferDfi = [from, to, parsedAmount, vmAddress]; + data = tdFace.encodeFunctionData("transfer", transferDfi); } else { - // DST20 - BTC - console.log("YOHOOOOO NON-DFI TOKEN...."); - /** + * For DST20 - BTC, use `transferDST20` function * TODO: Either construct the token address based on `ain` logic or add a config file to map the address for each token */ - const DST_20_CONTRACT_ADDR_BTC = - "0xff00000000000000000000000000000000000001"; - data = tdIFace.encodeFunctionData("transferDST20", [ - DST_20_CONTRACT_ADDR_BTC, - from, - to, - parsedAmount, - vmAddress, - ]); + const contractAddress = DST_20_CONTRACT_ADDR_BTC; + const transferDST20 = [contractAddress, from, to, parsedAmount, vmAddress]; + data = tdFace.encodeFunctionData("transferDST20", transferDST20); } // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment const privateKey = await account.privateKey(); const wallet = new ethers.Wallet(privateKey); - console.log("YOHOOO-WALLETADDR: ", { address: wallet.address, privateKey }); - /* TODO: Figure out CORS issue when using the ethRpc - const tx: any = { + /* TODO: Figure out CORS issue when using the ethRpc */ + const tx: providers.TransactionRequest = { to: TD_CONTRACT_ADDR, - nonce: await ethRpc.getTransactionCount(from), - value: 0, - chainId: (await ethRpc.getNetwork()).chainId, + nonce: 0, // await ethRpc.getTransactionCount(from) // TODO: Remove hardcoded data + chainId: 1133, // (await rpc.getNetwork()).chainId, // TODO: Remove hardcoded data data: data, - gasLimit: 100_000, - gasPrice: (await ethRpc.getFeeData()).gasPrice, // base fee - }; */ - const tx: any = { - to: TD_CONTRACT_ADDR, - nonce: 0, value: 0, - chainId: 1133, - data: data, - gasLimit: 100_000, - gasPrice: 1000, // base fee + gasLimit: 0, + gasPrice: 0, + type: 0, }; const evmtxSigned = (await wallet.signTransaction(tx)).substring(2); // rm prefix `0x` - const evmTx = - new Uint8Array(Buffer.from(evmtxSigned, "hex")) || new Uint8Array([]); - console.log("YOHOOOOO EVMTX: ", { evmTx }); + const evmTx = new Uint8Array(Buffer.from(evmtxSigned, "hex") || []); - const signed: TransactionSegWit = await builder.account.transferDomain( - { - items: [ - { - src: { - address: sourceScript, - amount: { - token: Number(sourceTokenId.split("-EVM")[0]), - amount, - }, - domain: srcDomain, - data: - convertDirection === ConvertDirection.evmToDvm - ? evmTx - : new Uint8Array([]), + const transferDomain: TransferDomain = { + items: [ + { + src: { + address: sourceScript, + domain: srcDomain, + amount: { + token: stripEvmSuffixFromTokenId(sourceTokenId), + amount: amount, }, - dst: { - address: dstScript, - amount: { - token: Number(targetTokenId.split("-EVM")[0]), - amount, - }, - domain: dstDomain, - data: - convertDirection === ConvertDirection.dvmToEvm - ? evmTx - : new Uint8Array([]), + data: + convertDirection === ConvertDirection.evmToDvm + ? evmTx + : new Uint8Array([]), + }, + dst: { + address: dstScript, + domain: dstDomain, + amount: { + token: stripEvmSuffixFromTokenId(targetTokenId), + amount: amount, }, + data: + convertDirection === ConvertDirection.dvmToEvm + ? evmTx + : new Uint8Array([]), }, - ], - }, + }, + ], + }; + + const signed = await builder.account.transferDomain( + transferDomain, dvmScript, ); @@ -186,8 +150,6 @@ export function transferDomainCrafter( throw new Error("Unexpected transfer domain"); } - console.log("YOHOOOO TD CRAFTER"); - const [symbolA, symbolB] = convertDirection === ConvertDirection.dvmToEvm ? [sourceToken.displayTextSymbol, `${targetToken.displayTextSymbol}-EVM`] @@ -240,3 +202,10 @@ export function transferDomainCrafter( : undefined, }; } + +function stripEvmSuffixFromTokenId(tokenId: string) { + if (tokenId.includes("-EVM")) { + return Number(tokenId.replace("-EVM", "")); + } + return Number(tokenId); +} diff --git a/mobile-app/app/contracts/TransferDomainImplV1.json b/mobile-app/app/contracts/TransferDomainV1.json similarity index 97% rename from mobile-app/app/contracts/TransferDomainImplV1.json rename to mobile-app/app/contracts/TransferDomainV1.json index e746511294..756a77ba7e 100644 --- a/mobile-app/app/contracts/TransferDomainImplV1.json +++ b/mobile-app/app/contracts/TransferDomainV1.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "TransferDomainImplV1", - "sourceName": "contracts/TransferDomainImplV1.sol", + "contractName": "TransferDomainV1", + "sourceName": "contracts/TransferDomainV1.sol", "abi": [ { "anonymous": false, @@ -174,8 +174,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50610a77806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea2646970667358221220341907efb37ae32332d194c4c439d4ab7e1f8041fea280bb9556452c61d954c964736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea2646970667358221220341907efb37ae32332d194c4c439d4ab7e1f8041fea280bb9556452c61d954c964736f6c63430008130033", + "bytecode": "0x608060405234801561001057600080fd5b50610a77806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea26469706673582212205fe56b2a0619cb16b206a81a57cd7b92c45b2b0c7fb4d0763da20ae5e2e073c964736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806370a082311161005b57806370a08231146100dc578063917e9b691461010c57806395d89b4114610128578063d57b2826146101465761007d565b806306fdde031461008257806318160ddd146100a0578063313ce567146100be575b600080fd5b61008a610162565b60405161009791906104e6565b60405180910390f35b6100a861019f565b6040516100b59190610521565b60405180910390f35b6100c66101a9565b6040516100d39190610558565b60405180910390f35b6100f660048036038101906100f191906105e5565b6101b2565b6040516101039190610521565b60405180910390f35b610126600480360381019061012191906107b1565b6101fa565b005b6101306102b9565b60405161013d91906104e6565b60405180910390f35b610160600480360381019061015b9190610848565b6102f6565b005b60606040518060400160405280600e81526020017f5472616e73666572446f6d61696e000000000000000000000000000000000000815250905090565b6000600154905090565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161023793929190610939565b6020604051808303816000875af1158015610256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027a91906109a8565b507f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc5577816040516102aa91906104e6565b60405180910390a15050505050565b60606040518060400160405280600381526020017f4446490000000000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b4578147101561036c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036390610a21565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156103b2573d6000803e3d6000fd5b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104119190610521565b60405180910390a37f5b494f8e62c9b3ea113ad3af9830e30a412c97a58a1237f83b3a515c94bc55778160405161044891906104e6565b60405180910390a150505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610490578082015181840152602081019050610475565b60008484015250505050565b6000601f19601f8301169050919050565b60006104b882610456565b6104c28185610461565b93506104d2818560208601610472565b6104db8161049c565b840191505092915050565b6000602082019050818103600083015261050081846104ad565b905092915050565b6000819050919050565b61051b81610508565b82525050565b60006020820190506105366000830184610512565b92915050565b600060ff82169050919050565b6105528161053c565b82525050565b600060208201905061056d6000830184610549565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b282610587565b9050919050565b6105c2816105a7565b81146105cd57600080fd5b50565b6000813590506105df816105b9565b92915050565b6000602082840312156105fb576105fa61057d565b5b6000610609848285016105d0565b91505092915050565b600061061d82610587565b9050919050565b61062d81610612565b811461063857600080fd5b50565b60008135905061064a81610624565b92915050565b61065981610508565b811461066457600080fd5b50565b60008135905061067681610650565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106be8261049c565b810181811067ffffffffffffffff821117156106dd576106dc610686565b5b80604052505050565b60006106f0610573565b90506106fc82826106b5565b919050565b600067ffffffffffffffff82111561071c5761071b610686565b5b6107258261049c565b9050602081019050919050565b82818337600083830152505050565b600061075461074f84610701565b6106e6565b9050828152602081018484840111156107705761076f610681565b5b61077b848285610732565b509392505050565b600082601f8301126107985761079761067c565b5b81356107a8848260208601610741565b91505092915050565b600080600080600060a086880312156107cd576107cc61057d565b5b60006107db888289016105d0565b95505060206107ec888289016105d0565b94505060406107fd8882890161063b565b935050606061080e88828901610667565b925050608086013567ffffffffffffffff81111561082f5761082e610582565b5b61083b88828901610783565b9150509295509295909350565b600080600080608085870312156108625761086161057d565b5b6000610870878288016105d0565b94505060206108818782880161063b565b935050604061089287828801610667565b925050606085013567ffffffffffffffff8111156108b3576108b2610582565b5b6108bf87828801610783565b91505092959194509250565b6108d4816105a7565b82525050565b6000819050919050565b60006108ff6108fa6108f584610587565b6108da565b610587565b9050919050565b6000610911826108e4565b9050919050565b600061092382610906565b9050919050565b61093381610918565b82525050565b600060608201905061094e60008301866108cb565b61095b602083018561092a565b6109686040830184610512565b949350505050565b60008115159050919050565b61098581610970565b811461099057600080fd5b50565b6000815190506109a28161097c565b92915050565b6000602082840312156109be576109bd61057d565b5b60006109cc84828501610993565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e6365000000600082015250565b6000610a0b601d83610461565b9150610a16826109d5565b602082019050919050565b60006020820190508181036000830152610a3a816109fe565b905091905056fea26469706673582212205fe56b2a0619cb16b206a81a57cd7b92c45b2b0c7fb4d0763da20ae5e2e073c964736f6c63430008130033", "linkReferences": {}, "deployedLinkReferences": {} } From f600737ba890d8e0b6cdef97e12d909b73e5737c Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Tue, 3 Oct 2023 10:57:01 +0800 Subject: [PATCH 07/16] update check for dfi token --- mobile-app/app/api/transaction/transfer_domain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 59016d7a99..8a52ca5dda 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -59,7 +59,7 @@ export async function transferDomainSigner( const parsedAmount = parseUnits(amount.toString(), 18); // TODO: Get decimals from token contract const vmAddress = dvmAddress; - if (sourceTokenId === "0" || targetTokenId === "0-EVM") { + if (sourceTokenId === "0" || targetTokenId === "0") { /** * For DFI, use `transfer` function */ From a205bc068edc6d52b97c1ba1663ed7f0bbfc41cf Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Tue, 3 Oct 2023 11:46:50 +0800 Subject: [PATCH 08/16] add function to get dst20 token contract address --- .../app/api/transaction/transfer_domain.ts | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 8a52ca5dda..9abab9e01a 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -11,6 +11,8 @@ import { ConvertDirection } from "@screens/enum"; import { parseUnits } from "ethers/lib/utils"; import TransferDomainV1 from "../../contracts/TransferDomainV1.json"; +const TD_CONTRACT_ADDR = "0xdf00000000000000000000000000000000000001"; + const TRANSFER_DOMAIN_TYPE = { DVM: 2, EVM: 3, @@ -46,31 +48,24 @@ export async function transferDomainSigner( ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; - /** - * TODO: Start of EvmTx signer here - * */ - const TD_CONTRACT_ADDR = "0xdf00000000000000000000000000000000000001"; - const DST_20_CONTRACT_ADDR_BTC = "0xff00000000000000000000000000000000000001"; + /* Start of EvmTx signer here */ const tdFace = new utils.Interface(TransferDomainV1.abi); let data; const from = isEvmToDvm ? evmAddress : TD_CONTRACT_ADDR; const to = isEvmToDvm ? TD_CONTRACT_ADDR : evmAddress; + // TODO: round off parsedAmount to 8 decimals const parsedAmount = parseUnits(amount.toString(), 18); // TODO: Get decimals from token contract const vmAddress = dvmAddress; if (sourceTokenId === "0" || targetTokenId === "0") { - /** - * For DFI, use `transfer` function - */ + /* For DFI, use `transfer` function */ const transferDfi = [from, to, parsedAmount, vmAddress]; data = tdFace.encodeFunctionData("transfer", transferDfi); } else { - /** - * For DST20 - BTC, use `transferDST20` function - * TODO: Either construct the token address based on `ain` logic or add a config file to map the address for each token - */ - const contractAddress = DST_20_CONTRACT_ADDR_BTC; + /* For DST20, use `transferDST20` function */ + const dst20TokenId = stripEvmSuffixFromTokenId(sourceTokenId); + const contractAddress = getAddressFromDST20TokenId(dst20TokenId); const transferDST20 = [contractAddress, from, to, parsedAmount, vmAddress]; data = tdFace.encodeFunctionData("transferDST20", transferDST20); } @@ -209,3 +204,16 @@ function stripEvmSuffixFromTokenId(tokenId: string) { } return Number(tokenId); } + +/** + * Get DST20 contract address + * https://github.com/DeFiCh/ain/blob/f5a671362f9899080d0a0dddbbcdcecb7c19d9e3/lib/ain-contracts/src/lib.rs#L79 + */ +function getAddressFromDST20TokenId(tokenId: number): string { + const parsedTokenId = BigInt(tokenId); + const numberStr = parsedTokenId.toString(16); // Convert parsedTokenId to hexadecimal + const paddedNumberStr = numberStr.padStart(38, "0"); // Pad with zeroes to the left + const finalStr = `ff${paddedNumberStr}`; + const tokenContractAddess = utils.getAddress(finalStr); + return tokenContractAddess; +} From bbb11341b9167c12bf20a082f740527233151c12 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Tue, 3 Oct 2023 13:56:27 +0800 Subject: [PATCH 09/16] revert unnecessary changes on feautureflagcontext --- mobile-app/app/contexts/FeatureFlagContext.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mobile-app/app/contexts/FeatureFlagContext.tsx b/mobile-app/app/contexts/FeatureFlagContext.tsx index 31e33367a0..eb2b72f1a6 100644 --- a/mobile-app/app/contexts/FeatureFlagContext.tsx +++ b/mobile-app/app/contexts/FeatureFlagContext.tsx @@ -146,14 +146,13 @@ export function FeatureFlagProvider( updateEnabledFeatures, isFeatureAvailable, isBetaFeature, - hasBetaFeatures: true, - // hasBetaFeatures: featureFlags.some( - // (flag) => - // satisfies(appVersion, flag.version) && - // flag.networks?.includes(network) && - // flag.platforms?.includes(Platform.OS) && - // flag.stage === "beta" - // ), + hasBetaFeatures: featureFlags.some( + (flag) => + satisfies(appVersion, flag.version) && + flag.networks?.includes(network) && + flag.platforms?.includes(Platform.OS) && + flag.stage === "beta", + ), }; if (isError && !isLoading && retries < MAX_RETRY) { From 69a9e18ce22ccfbf9b5cc8905c27045224f56b85 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Thu, 5 Oct 2023 10:38:54 +0800 Subject: [PATCH 10/16] update blockchain node to beta14 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3ca3f6fc3e..113f590529 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" defi-blockchain: - image: defi/defichain:4.0.0-beta13 + image: defi/defichain:4.0.0-beta14 ports: - "19554:19554" - "19551:19551" From d556cf9799128e25bb269c5dc72635815ca2a901 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Thu, 5 Oct 2023 12:03:26 +0800 Subject: [PATCH 11/16] feat(core): implement transfer domain with signed evmtx on Send --- .../app/api/transaction/transfer_domain.ts | 51 ++++--- .../screens/ConvertConfirmationScreen.tsx | 7 + .../screens/SendConfirmationScreen.tsx | 125 ++++++++++++------ 3 files changed, 130 insertions(+), 53 deletions(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 7f9cbe82a2..9e911834bd 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -6,7 +6,10 @@ import { WhaleWalletAccount } from "@defichain/whale-api-wallet"; import { CTransactionSegWit, TransferDomain, + Script, } from "@defichain/jellyfish-transaction"; +import { fromAddress, Eth } from "@defichain/jellyfish-address"; +import { NetworkName } from "@defichain/jellyfish-network"; import { ConvertDirection } from "@screens/enum"; import { parseUnits } from "ethers/lib/utils"; import TransferDomainV1 from "../../contracts/TransferDomainV1.json"; @@ -25,17 +28,29 @@ export interface TransferDomainToken { balance: BigNumber; } -export async function transferDomainSigner( - account: WhaleWalletAccount, - sourceTokenId: string, - targetTokenId: string, - amount: BigNumber, - convertDirection: ConvertDirection, -): Promise { - const dvmScript = await account.getScript(); - const dvmAddress = await account.getAddress(); - const evmScript = await account.getEvmScript(); - const evmAddress = await account.getEvmAddress(); +interface TransferDomainSigner { + account: WhaleWalletAccount; + sourceTokenId: string; + targetTokenId: string; + amount: BigNumber; + convertDirection: ConvertDirection; + dvmAddress: string; + evmAddress: string; + networkName: NetworkName; +} + +export async function transferDomainSigner({ + account, + sourceTokenId, + targetTokenId, + amount, + convertDirection, + dvmAddress, + evmAddress, + networkName, +}: TransferDomainSigner): Promise { + const dvmScript = fromAddress(dvmAddress, networkName)?.script as Script; + const evmScript = Eth.fromAddress(evmAddress) as Script; const builder = account.withTransactionBuilder(); const isEvmToDvm = convertDirection === ConvertDirection.evmToDvm; @@ -77,7 +92,7 @@ export async function transferDomainSigner( /* TODO: Figure out CORS issue when using the ethRpc */ const tx: providers.TransactionRequest = { to: TD_CONTRACT_ADDR, - nonce: 0, // await ethRpc.getTransactionCount(from) // TODO: Remove hardcoded data + nonce: 0, // await ethRpc.getTransactionCount(from), // TODO: Remove hardcoded data chainId: 1133, // (await rpc.getNetwork()).chainId, // TODO: Remove hardcoded data data: data, value: 0, @@ -127,6 +142,7 @@ export function transferDomainCrafter( convertDirection: ConvertDirection, sourceToken: TransferDomainToken, targetToken: TransferDomainToken, + networkName: NetworkName, onBroadcast: () => any, onConfirmation: () => void, submitButtonLabel?: string, @@ -146,13 +162,16 @@ export function transferDomainCrafter( return { sign: async (account: WhaleWalletAccount) => - await transferDomainSigner( + await transferDomainSigner({ account, - sourceToken.tokenId, - targetToken.tokenId, amount, convertDirection, - ), + networkName, + sourceTokenId: sourceToken.tokenId, + targetTokenId: targetToken.tokenId, + dvmAddress: await account.getAddress(), + evmAddress: await account.getEvmAddress(), + }), title: translate( "screens/ConvertConfirmScreen", "Convert {{amount}} {{symbolA}} to {{symbolB}} tokens", diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx index b789622eb3..6b9d7ed544 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx @@ -31,6 +31,8 @@ import { TransferDomainToken, transferDomainCrafter, } from "@api/transaction/transfer_domain"; +import { useNetworkContext } from "@waveshq/walletkit-ui"; +import { NetworkName } from "@defichain/jellyfish-network"; import { PortfolioParamList } from "../PortfolioNavigator"; type Props = StackScreenProps; @@ -44,6 +46,7 @@ export function ConvertConfirmationScreen({ route }: Props): JSX.Element { targetToken, originScreen, } = route.params; + const { networkName } = useNetworkContext(); const { address } = useWalletContext(); const addressLabel = useAddressLabel(address); const hasPendingJob = useSelector((state: RootState) => @@ -123,6 +126,7 @@ export function ConvertConfirmationScreen({ route }: Props): JSX.Element { convertDirection, sourceToken, targetToken, + networkName, }, dispatch, () => { @@ -337,11 +341,13 @@ async function constructSignedTransferDomain( convertDirection, sourceToken, targetToken, + networkName, }: { convertDirection: ConvertDirection; sourceToken: TransferDomainToken; targetToken: TransferDomainToken; amount: BigNumber; + networkName: NetworkName; }, dispatch: Dispatch, onBroadcast: () => void, @@ -355,6 +361,7 @@ async function constructSignedTransferDomain( convertDirection, sourceToken, targetToken, + networkName, onBroadcast, () => {}, ), diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx index 26e2c3b0a9..baabfc67d3 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx @@ -32,7 +32,7 @@ import { import { useAppDispatch } from "@hooks/useAppDispatch"; import { useAddressLabel } from "@hooks/useAddressLabel"; import { View } from "@components"; -import { ScreenName } from "@screens/enum"; +import { ConvertDirection, ScreenName } from "@screens/enum"; import { ThemedActivityIndicatorV2, ThemedIcon, @@ -44,11 +44,18 @@ import { import { SummaryTitle } from "@components/SummaryTitle"; import { NumberRowV2 } from "@components/NumberRowV2"; import { SubmitButtonGroup } from "@components/SubmitButtonGroup"; +import { transferDomainSigner } from "@api/transaction/transfer_domain"; +import { + getAddressType, + AddressType as JellyfishAddressType, +} from "@waveshq/walletkit-core"; +import { DomainType, useDomainContext } from "@contexts/DomainContext"; import { PortfolioParamList } from "../PortfolioNavigator"; type Props = StackScreenProps; export function SendConfirmationScreen({ route }: Props): JSX.Element { + const { domain } = useDomainContext(); const { address } = useWalletContext(); const addressLabel = useAddressLabel(address); const network = useNetworkContext(); @@ -96,6 +103,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { address: destination, token, amount, + domain, networkName: network.networkName, }, dispatch, @@ -348,54 +356,59 @@ interface SendForm { amount: BigNumber; address: string; token: WalletToken; + domain: DomainType; networkName: NetworkName; } async function send( - { address, token, amount, networkName }: SendForm, + { address, token, amount, domain, networkName }: SendForm, dispatch: Dispatch, onBroadcast: () => void, logger: NativeLoggingProps, ): Promise { try { - const to = DeFiAddress.from(networkName, address).getScript(); - - const signer = async ( - account: WhaleWalletAccount, - ): Promise => { - const script = await account.getScript(); - const builder = account.withTransactionBuilder(); - - let signed: TransactionSegWit; - if (token.symbol === "DFI") { - /* if (amount.gte(token.amount)) signed = await builder.utxo.sendAll(to) - else */ - signed = await builder.utxo.send(amount, to, script); - } else { - signed = await builder.account.accountToAccount( - { - from: script, - to: [ - { - script: to, - balances: [ - { - token: +token.id, - amount, - }, - ], - }, - ], - }, - script, - ); - } - return new CTransactionSegWit(signed); - }; + const jellyfishAddressType = getAddressType(address, networkName); + const isDvmToDvmSend = + domain === DomainType.DVM && + jellyfishAddressType !== JellyfishAddressType.ETH; dispatch( transactionQueue.actions.push({ - sign: signer, + sign: async (account: WhaleWalletAccount) => { + if (isDvmToDvmSend) { + return await dvmToDvmSendSigner( + account, + token, + amount, + address, + networkName, + ); + } else { + const sendDirection = + domain === DomainType.DVM + ? ConvertDirection.dvmToEvm + : ConvertDirection.evmToDvm; + const isEvmToDvm = sendDirection === ConvertDirection.evmToDvm; + const tokenId = token.id === "0_unified" ? "0" : token.id; + const sourceTokenId = isEvmToDvm ? `${tokenId}-EVM` : tokenId; + const targetTokenId = isEvmToDvm ? tokenId : `${tokenId}-EVM`; + const dvmAddress = tokenId ? address : await account.getAddress(); + const evmAddress = isEvmToDvm + ? await account.getEvmAddress() + : address; + + return await transferDomainSigner({ + account, + sourceTokenId, + targetTokenId, + amount, + dvmAddress, + evmAddress, + networkName, + convertDirection: sendDirection, + }); + } + }, title: translate( "screens/SendConfirmationScreen", "Sending {{amount}} {{displaySymbol}} to {{toAddress}}", @@ -431,3 +444,41 @@ async function send( logger.error(e); } } + +async function dvmToDvmSendSigner( + account: WhaleWalletAccount, + token: WalletToken, + amount: BigNumber, + address: string, + networkName: NetworkName, +): Promise { + const to = DeFiAddress.from(networkName, address).getScript(); + const script = await account.getScript(); + const builder = account.withTransactionBuilder(); + + let signed: TransactionSegWit; + if (token.symbol === "DFI") { + /* if (amount.gte(token.amount)) signed = await builder.utxo.sendAll(to) + else */ + signed = await builder.utxo.send(amount, to, script); + } else { + signed = await builder.account.accountToAccount( + { + from: script, + to: [ + { + script: to, + balances: [ + { + token: +token.id, + amount, + }, + ], + }, + ], + }, + script, + ); + } + return new CTransactionSegWit(signed); +} From 086f7e5c6def6bf65ef71a6c0d4feb8f29b29b94 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Thu, 5 Oct 2023 12:19:14 +0800 Subject: [PATCH 12/16] add README.md for the contractA abi --- mobile-app/app/contracts/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mobile-app/app/contracts/README.md diff --git a/mobile-app/app/contracts/README.md b/mobile-app/app/contracts/README.md new file mode 100644 index 0000000000..8420d3a638 --- /dev/null +++ b/mobile-app/app/contracts/README.md @@ -0,0 +1,19 @@ +# ABI Source Explanation + +**`/contracts`** directory contains the ABI (Application Binary Interface) for the "TransferDomainV1" smart contract. The ABI was generated based on the corresponding Solidity (.sol) file. + +## Contract Information + +- **Contract Name**: TransferDomainV1 +- **Solidity File**: [TransferDomainV1.sol](https://github.com/DeFiCh/ain/blob/master/lib/ain-contracts/transfer_domain_v1/TransferDomainV1.sol) + +## ABI Generation + +The ABI provided in this repository was generated from the linked Solidity file. This ABI is essential for interacting with the TransferDomainV1 smart contract on the Ethereum blockchain or other compatible blockchains. + +## Disclaimer + +Please note that the ABI provided here is based on the linked Solidity file at the time of generation. Ensure that the Solidity code and the ABI are up-to-date and compatible with the version of the smart contract deployed on the blockchain you intend to interact with. + +For any updates or changes to the contract, refer to the original source repository: +[TransferDomainV1.sol](https://github.com/DeFiCh/ain/blob/master/lib/ain-contracts/transfer_domain_v1/TransferDomainV1.sol) From 02067cd3725a5d391773d3a0beb437f7f67246b7 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Thu, 5 Oct 2023 12:36:33 +0800 Subject: [PATCH 13/16] extraxt evmtx signer into a separate function --- .../app/api/transaction/transfer_domain.ts | 111 +++++++++++------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 9e911834bd..e071b92be9 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -63,46 +63,15 @@ export async function transferDomainSigner({ ? [TRANSFER_DOMAIN_TYPE.EVM, TRANSFER_DOMAIN_TYPE.DVM] : [TRANSFER_DOMAIN_TYPE.DVM, TRANSFER_DOMAIN_TYPE.EVM]; - /* Start of EvmTx signer here */ - const tdFace = new utils.Interface(TransferDomainV1.abi); - - let data; - const from = isEvmToDvm ? evmAddress : TD_CONTRACT_ADDR; - const to = isEvmToDvm ? TD_CONTRACT_ADDR : evmAddress; - // TODO: round off parsedAmount to 8 decimals - const parsedAmount = parseUnits(amount.toString(), 18); // TODO: Get decimals from token contract - const vmAddress = dvmAddress; - - if (sourceTokenId === "0" || targetTokenId === "0") { - /* For DFI, use `transfer` function */ - const transferDfi = [from, to, parsedAmount, vmAddress]; - data = tdFace.encodeFunctionData("transfer", transferDfi); - } else { - /* For DST20, use `transferDST20` function */ - const dst20TokenId = stripEvmSuffixFromTokenId(sourceTokenId); - const contractAddress = getAddressFromDST20TokenId(dst20TokenId); - const transferDST20 = [contractAddress, from, to, parsedAmount, vmAddress]; - data = tdFace.encodeFunctionData("transferDST20", transferDST20); - } - - // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment - const privateKey = await account.privateKey(); - const wallet = new ethers.Wallet(privateKey); - - /* TODO: Figure out CORS issue when using the ethRpc */ - const tx: providers.TransactionRequest = { - to: TD_CONTRACT_ADDR, - nonce: 0, // await ethRpc.getTransactionCount(from), // TODO: Remove hardcoded data - chainId: 1133, // (await rpc.getNetwork()).chainId, // TODO: Remove hardcoded data - data: data, - value: 0, - gasLimit: 0, - gasPrice: 0, - type: 0, - }; - - const evmtxSigned = (await wallet.signTransaction(tx)).substring(2); // rm prefix `0x` - const evmTx = new Uint8Array(Buffer.from(evmtxSigned, "hex") || []); + const signedEvmTxData = await createSignedEvmTx({ + isEvmToDvm, + sourceTokenId, + targetTokenId, + amount, + dvmAddress, + evmAddress, + privateKey: await account.privateKey(), + }); const transferDomain: TransferDomain = { items: [ @@ -114,7 +83,7 @@ export async function transferDomainSigner({ token: stripEvmSuffixFromTokenId(sourceTokenId), amount: amount, }, - data: isEvmToDvm ? evmTx : new Uint8Array([]), + data: isEvmToDvm ? signedEvmTxData : new Uint8Array([]), }, dst: { address: dstScript, @@ -123,7 +92,7 @@ export async function transferDomainSigner({ token: stripEvmSuffixFromTokenId(targetTokenId), amount: amount, }, - data: isEvmToDvm ? new Uint8Array([]) : evmTx, + data: isEvmToDvm ? new Uint8Array([]) : signedEvmTxData, }, }, ], @@ -211,6 +180,64 @@ export function transferDomainCrafter( }; } +interface EvmTxSigner { + isEvmToDvm: boolean; + sourceTokenId: string; + targetTokenId: string; + amount: BigNumber; + dvmAddress: string; + evmAddress: string; + privateKey: Buffer; +} + +async function createSignedEvmTx({ + isEvmToDvm, + sourceTokenId, + targetTokenId, + amount, + dvmAddress, + evmAddress, + privateKey, +}: EvmTxSigner): Promise { + let data; + const tdFace = new utils.Interface(TransferDomainV1.abi); + const from = isEvmToDvm ? evmAddress : TD_CONTRACT_ADDR; + const to = isEvmToDvm ? TD_CONTRACT_ADDR : evmAddress; + // TODO: round off parsedAmount to 8 decimals + const parsedAmount = parseUnits(amount.toString(), 18); // TODO: Get decimals from token contract + const vmAddress = dvmAddress; + + if (sourceTokenId === "0" || targetTokenId === "0") { + /* For DFI, use `transfer` function */ + const transferDfi = [from, to, parsedAmount, vmAddress]; + data = tdFace.encodeFunctionData("transfer", transferDfi); + } else { + /* For DST20, use `transferDST20` function */ + const dst20TokenId = stripEvmSuffixFromTokenId(sourceTokenId); + const contractAddress = getAddressFromDST20TokenId(dst20TokenId); + const transferDST20 = [contractAddress, from, to, parsedAmount, vmAddress]; + data = tdFace.encodeFunctionData("transferDST20", transferDST20); + } + + // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment + // const privateKey = await account.privateKey(); + const wallet = new ethers.Wallet(privateKey); + + /* TODO: Figure out CORS issue when using the ethRpc */ + const tx: providers.TransactionRequest = { + to: TD_CONTRACT_ADDR, + nonce: 3, // await ethRpc.getTransactionCount(from), // TODO: Remove hardcoded data + chainId: 1133, // (await rpc.getNetwork()).chainId, // TODO: Remove hardcoded data + data: data, + value: 0, + gasLimit: 0, + gasPrice: 0, + type: 0, + }; + const evmtxSigned = (await wallet.signTransaction(tx)).substring(2); // rm prefix `0x` + return new Uint8Array(Buffer.from(evmtxSigned, "hex") || []); +} + function stripEvmSuffixFromTokenId(tokenId: string) { if (tokenId.includes("-EVM")) { return Number(tokenId.replace("-EVM", "")); From 50b476c5bbd36f52cc5fe48462983b03c8981dfa Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Fri, 6 Oct 2023 09:58:52 +0800 Subject: [PATCH 14/16] add todo --- mobile-app/app/api/transaction/transfer_domain.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index e071b92be9..51405d6f39 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -219,6 +219,7 @@ async function createSignedEvmTx({ data = tdFace.encodeFunctionData("transferDST20", transferDST20); } + // TODO: Make ETH RPC URL dynamic based on network // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment // const privateKey = await account.privateKey(); const wallet = new ethers.Wallet(privateKey); From ae7d91edba34bea928dd4ff621f7bec9c67f93d6 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Fri, 6 Oct 2023 13:41:55 +0800 Subject: [PATCH 15/16] remove commented line --- mobile-app/app/api/transaction/transfer_domain.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 51405d6f39..9bf6703550 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -221,7 +221,6 @@ async function createSignedEvmTx({ // TODO: Make ETH RPC URL dynamic based on network // const ethRpc = new providers.JsonRpcProvider("http://localhost:19551"); // TODO: Uncomment - // const privateKey = await account.privateKey(); const wallet = new ethers.Wallet(privateKey); /* TODO: Figure out CORS issue when using the ethRpc */ From 1ed2b7c6fba8286d58f72a1f497402228c8cc095 Mon Sep 17 00:00:00 2001 From: Lyka Labrada Date: Fri, 6 Oct 2023 13:42:52 +0800 Subject: [PATCH 16/16] set nonce to 0 --- mobile-app/app/api/transaction/transfer_domain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 9bf6703550..3467f15b59 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -226,7 +226,7 @@ async function createSignedEvmTx({ /* TODO: Figure out CORS issue when using the ethRpc */ const tx: providers.TransactionRequest = { to: TD_CONTRACT_ADDR, - nonce: 3, // await ethRpc.getTransactionCount(from), // TODO: Remove hardcoded data + nonce: 0, // await ethRpc.getTransactionCount(from), // TODO: Remove hardcoded data chainId: 1133, // (await rpc.getNetwork()).chainId, // TODO: Remove hardcoded data data: data, value: 0,