diff --git a/abi-USDT-polygon-amoy.js b/abi-USDT-polygon-amoy.js new file mode 100644 index 0000000..cb02a91 --- /dev/null +++ b/abi-USDT-polygon-amoy.js @@ -0,0 +1,397 @@ +module.exports = [ + { + constant: true, + inputs: [], + name: 'name', + outputs: [ + { + name: '', + type: 'string', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_spender', + type: 'address', + }, + { + name: '_value', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'totalSupply', + outputs: [ + { + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_from', + type: 'address', + }, + { + name: '_to', + type: 'address', + }, + { + name: '_value', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'decimals', + outputs: [ + { + name: '', + type: 'uint8', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_value', + type: 'uint256', + }, + ], + name: 'burn', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_value', + type: 'uint256', + }, + ], + name: 'unfreeze', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: 'amount', + type: 'uint256', + }, + ], + name: 'withdrawByOwner', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + name: '', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: 'tokenSymbolNew', + type: 'string', + }, + ], + name: 'resetTokenSymbol', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'owner', + outputs: [ + { + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'symbol', + outputs: [ + { + name: '', + type: 'string', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_to', + type: 'address', + }, + { + name: '_value', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + name: '', + type: 'address', + }, + ], + name: 'freezeOf', + outputs: [ + { + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: 'tokenNameNew', + type: 'string', + }, + ], + name: 'resetTokenName', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + name: '_value', + type: 'uint256', + }, + ], + name: 'freeze', + outputs: [ + { + name: 'success', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + name: '', + type: 'address', + }, + { + name: '', + type: 'address', + }, + ], + name: 'allowance', + outputs: [ + { + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + name: 'tokenSymbol', + type: 'string', + }, + { + name: 'tokenName', + type: 'string', + }, + { + name: 'tokenSupply', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: 'from', + type: 'address', + }, + { + indexed: true, + name: 'to', + type: 'address', + }, + { + indexed: false, + name: 'value', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: 'from', + type: 'address', + }, + { + indexed: false, + name: 'value', + type: 'uint256', + }, + ], + name: 'Burn', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: 'from', + type: 'address', + }, + { + indexed: false, + name: 'value', + type: 'uint256', + }, + ], + name: 'Freeze', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: 'from', + type: 'address', + }, + { + indexed: false, + name: 'value', + type: 'uint256', + }, + ], + name: 'Unfreeze', + type: 'event', + }, +] diff --git a/chaindata.js b/chaindata.js index 7e2db3a..ae7d8dd 100644 --- a/chaindata.js +++ b/chaindata.js @@ -1,5 +1,6 @@ module.exports = { ETH_MAINNET: { + chainId: 1, USDT: { scanner: 'https://etherscan.io/token/0xdAC17F958D2ee523a2206206994597C13D831ec7', contractAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7', // https://tether.to/en/supported-protocols @@ -22,6 +23,7 @@ module.exports = { }, }, MATIC_MAINNET: { + chainId: 137, USDT: { scanner: 'https://polygonscan.com/token/0xc2132d05d31c914a87c6611c10748aeb04b58e8f', contractAddress: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', @@ -34,14 +36,24 @@ module.exports = { }, }, ETH_SEPOLIA: { + chainId: 11155111, USDT: { about: 'deployed by someone else. I learned this from a youtube video', + scanner: 'https://sepolia.etherscan.io/token/0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0', contractAddress: '0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0', contractAbi: require('./abi-USDT-sepolia.js'), }, }, - MATIC_AMOY: {}, + MATIC_AMOY: { + chainId: 80002, + USDT: { + about: '20241005 我从hardhat用VIC合约部署成 USDT', + contractAddress: '0xceC7b5e60d0C6875CBbCA9619cb11389d21d8051', + contractAbi: require('./abi-USDT-polygon-amoy.js'), + }, + }, TUC_TEST: { + chainId: 6882, ERC20: { VIC: { about: 'installed on 2024-10-03 to test wagmi send ERC20 transaction',