From 5530f5a7f9ce67e0e1e0181225ee3492a6fa0a11 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 5 Dec 2024 22:50:47 +0000 Subject: [PATCH 1/7] SOV-4378: Acceptance Criteria added - to be removed before merge [skip ci] --- hardhat/tasks/AC-TO-BE-DELETED.md | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 hardhat/tasks/AC-TO-BE-DELETED.md diff --git a/hardhat/tasks/AC-TO-BE-DELETED.md b/hardhat/tasks/AC-TO-BE-DELETED.md new file mode 100644 index 000000000..814d81342 --- /dev/null +++ b/hardhat/tasks/AC-TO-BE-DELETED.md @@ -0,0 +1,39 @@ +## ACCEPTANCE CRITERIA + +* Source [here](https://sovryn.atlassian.net/browse/SOV-4378) + +### Description + +1. Create a PR for review. +2. Rename `sendDirect` to `utils:send-direct`. +3. Description of necessary changes to the `utils:send-direct`: + + a. Rename function properly - you shouldn’t just put the function named `parseFile` in the `utils.js` because it is specific to the direct distribution only. Suggestion: `parseFileForSendDirect` and `parseFileForSendNATIVE`. + b. Task `utils:send-direct`: + + i. Currencies should be added to the external deployment folder as deployment .json files. + ii. `dryRun` is a flag, decimals should be variable; see how it is implemented in the `governance:createVestings`. + iii. NATIVE currency should be replaced with the `--native` flag. + iv. there is no such a thing as `supported currencies list` - you should just get it and throw if no currency deployment found suggesting to add it to the external deployments. + v. What if the token is USDT with 6 decimals? see [here](https://github.com/DistributedCollective/Sovryn-smart-contracts/blob/bobDevelopment/hardhat/tasks/utils.js#L367) and [here](https://github.com/DistributedCollective/Sovryn-smart-contracts/blob/bobDevelopment/hardhat/tasks/utils.js#L371). + vi. `multiplier param` should not have a default value - it must be specified explicitly. + vii. Create tests for the script - this is critical because it is irreversible. + + +4. Add a task `utils:cancel-tx` which is a shortcut of the `utils:replace-tx` case to cancel tx. + + a. One optional param `--hash`, if not provided then the last tx is being cancelled which is the most common case of cancelling. + b. Follow DRY principle - don’t repeat the code - extract it from send-direct to a function. + c. how it should work: + get the last tx sent and set + + newGasPrice = pendingTx.gasPrice * 1.5; + newMaxFee = pendingTx.maxFeePerGas * 1.5 + + d. Create tests. + +5. When reviewed and approved - cherry-pick the tasks into the development branch. + +### Notes + +This task must fork the branch "bobDevelopment" in our core repo. \ No newline at end of file From 25d15ae87c34e3968ce7bfb09eb803113c7973e2 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Dec 2024 02:10:44 +0000 Subject: [PATCH 2/7] SOV-4378: adding data and fixing send direct hh task [skip ci] --- external/deployments/bnbMainnet/BUSD.json | 291 +++++++++++++ external/deployments/bnbMainnet/DAI.json | 291 +++++++++++++ external/deployments/bnbMainnet/ETHW.json | 291 +++++++++++++ external/deployments/bnbMainnet/ETHb.json | 291 +++++++++++++ external/deployments/bnbMainnet/USDC.json | 291 +++++++++++++ external/deployments/bnbMainnet/USDT.json | 291 +++++++++++++ external/deployments/bobMainnet/DAI.json | 291 +++++++++++++ external/deployments/bobMainnet/DLLR.json | 291 +++++++++++++ external/deployments/bobMainnet/DOG.json | 291 +++++++++++++ external/deployments/bobMainnet/POWA.json | 291 +++++++++++++ external/deployments/bobMainnet/PUPS.json | 291 +++++++++++++ external/deployments/bobMainnet/SAT.json | 291 +++++++++++++ external/deployments/bobMainnet/SOV.json | 291 +++++++++++++ external/deployments/bobMainnet/SolvBTC.json | 291 +++++++++++++ .../deployments/bobMainnet/SolvBTC_BBN.json | 291 +++++++++++++ external/deployments/bobMainnet/USDC.json | 291 +++++++++++++ external/deployments/bobMainnet/USDT.json | 291 +++++++++++++ external/deployments/bobMainnet/UniBTC.json | 291 +++++++++++++ external/deployments/bobMainnet/WBTC.json | 291 +++++++++++++ external/deployments/bobMainnet/rETH.json | 291 +++++++++++++ external/deployments/bobMainnet/tBTC.json | 291 +++++++++++++ external/deployments/bobMainnet/usdc.json | 291 +++++++++++++ external/deployments/bobMainnet/usdt.json | 291 +++++++++++++ external/deployments/bobMainnet/wstETH.json | 291 +++++++++++++ external/deployments/ethMainnet/DAI.json | 291 +++++++++++++ external/deployments/ethMainnet/USDC.json | 291 +++++++++++++ external/deployments/ethMainnet/USDT.json | 291 +++++++++++++ external/deployments/rskMainnet/BNBs.json | 291 +++++++++++++ external/deployments/rskMainnet/FISH.json | 291 +++++++++++++ external/deployments/rskMainnet/MOC.json | 291 +++++++++++++ external/deployments/rskMainnet/MYNT.json | 291 +++++++++++++ external/deployments/rskMainnet/POWA.json | 291 +++++++++++++ external/deployments/rskMainnet/RDOC.json | 291 +++++++++++++ external/deployments/rskMainnet/RIF.json | 291 +++++++++++++ external/deployments/rskMainnet/SOV.json | 291 +++++++++++++ external/deployments/rskMainnet/iBPro.json | 291 +++++++++++++ external/deployments/rskMainnet/iDLLR.json | 291 +++++++++++++ external/deployments/rskMainnet/iDOC.json | 291 +++++++++++++ external/deployments/rskMainnet/iRBTC.json | 291 +++++++++++++ external/deployments/rskMainnet/iUSDT.json | 291 +++++++++++++ external/deployments/rskMainnet/iXUSD.json | 291 +++++++++++++ hardhat.config.js | 104 ++++- hardhat/tasks/governance.js | 94 ++-- hardhat/tasks/misc.js | 174 +++++--- hardhat/tasks/utils.js | 402 ++++++++++-------- package.json | 6 + scripts/externalData/dist.csv | 0 scripts/externalData/example.csv | 6 + scripts/externalData/example_native.csv | 6 + scripts/send-direct-helpers/ERC20.json | 297 +++++++++++++ scripts/send-direct-helpers/bnb-tokens.json | 8 + scripts/send-direct-helpers/bob-tokens.json | 90 ++++ scripts/send-direct-helpers/eth-tokens.json | 5 + scripts/send-direct-helpers/file-populator.js | 72 ++++ scripts/send-direct-helpers/populator.sh | 4 + scripts/send-direct-helpers/rsk-tokens.json | 27 ++ 56 files changed, 12942 insertions(+), 284 deletions(-) create mode 100644 external/deployments/bnbMainnet/BUSD.json create mode 100644 external/deployments/bnbMainnet/DAI.json create mode 100644 external/deployments/bnbMainnet/ETHW.json create mode 100644 external/deployments/bnbMainnet/ETHb.json create mode 100644 external/deployments/bnbMainnet/USDC.json create mode 100644 external/deployments/bnbMainnet/USDT.json create mode 100644 external/deployments/bobMainnet/DAI.json create mode 100644 external/deployments/bobMainnet/DLLR.json create mode 100644 external/deployments/bobMainnet/DOG.json create mode 100644 external/deployments/bobMainnet/POWA.json create mode 100644 external/deployments/bobMainnet/PUPS.json create mode 100644 external/deployments/bobMainnet/SAT.json create mode 100644 external/deployments/bobMainnet/SOV.json create mode 100644 external/deployments/bobMainnet/SolvBTC.json create mode 100644 external/deployments/bobMainnet/SolvBTC_BBN.json create mode 100644 external/deployments/bobMainnet/USDC.json create mode 100644 external/deployments/bobMainnet/USDT.json create mode 100644 external/deployments/bobMainnet/UniBTC.json create mode 100644 external/deployments/bobMainnet/WBTC.json create mode 100644 external/deployments/bobMainnet/rETH.json create mode 100644 external/deployments/bobMainnet/tBTC.json create mode 100644 external/deployments/bobMainnet/usdc.json create mode 100644 external/deployments/bobMainnet/usdt.json create mode 100644 external/deployments/bobMainnet/wstETH.json create mode 100644 external/deployments/ethMainnet/DAI.json create mode 100644 external/deployments/ethMainnet/USDC.json create mode 100644 external/deployments/ethMainnet/USDT.json create mode 100644 external/deployments/rskMainnet/BNBs.json create mode 100644 external/deployments/rskMainnet/FISH.json create mode 100644 external/deployments/rskMainnet/MOC.json create mode 100644 external/deployments/rskMainnet/MYNT.json create mode 100644 external/deployments/rskMainnet/POWA.json create mode 100644 external/deployments/rskMainnet/RDOC.json create mode 100644 external/deployments/rskMainnet/RIF.json create mode 100644 external/deployments/rskMainnet/SOV.json create mode 100644 external/deployments/rskMainnet/iBPro.json create mode 100644 external/deployments/rskMainnet/iDLLR.json create mode 100644 external/deployments/rskMainnet/iDOC.json create mode 100644 external/deployments/rskMainnet/iRBTC.json create mode 100644 external/deployments/rskMainnet/iUSDT.json create mode 100644 external/deployments/rskMainnet/iXUSD.json delete mode 100644 scripts/externalData/dist.csv create mode 100644 scripts/externalData/example.csv create mode 100644 scripts/externalData/example_native.csv create mode 100644 scripts/send-direct-helpers/ERC20.json create mode 100644 scripts/send-direct-helpers/bnb-tokens.json create mode 100644 scripts/send-direct-helpers/bob-tokens.json create mode 100644 scripts/send-direct-helpers/eth-tokens.json create mode 100644 scripts/send-direct-helpers/file-populator.js create mode 100755 scripts/send-direct-helpers/populator.sh create mode 100644 scripts/send-direct-helpers/rsk-tokens.json diff --git a/external/deployments/bnbMainnet/BUSD.json b/external/deployments/bnbMainnet/BUSD.json new file mode 100644 index 000000000..4ba954268 --- /dev/null +++ b/external/deployments/bnbMainnet/BUSD.json @@ -0,0 +1,291 @@ +{ + "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bnbMainnet/DAI.json b/external/deployments/bnbMainnet/DAI.json new file mode 100644 index 000000000..68a25d5f9 --- /dev/null +++ b/external/deployments/bnbMainnet/DAI.json @@ -0,0 +1,291 @@ +{ + "address": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bnbMainnet/ETHW.json b/external/deployments/bnbMainnet/ETHW.json new file mode 100644 index 000000000..ea5a8085f --- /dev/null +++ b/external/deployments/bnbMainnet/ETHW.json @@ -0,0 +1,291 @@ +{ + "address": "0x302cd8973be5ca2334b4ff7e7b01ba41455559b3", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bnbMainnet/ETHb.json b/external/deployments/bnbMainnet/ETHb.json new file mode 100644 index 000000000..76400a639 --- /dev/null +++ b/external/deployments/bnbMainnet/ETHb.json @@ -0,0 +1,291 @@ +{ + "address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bnbMainnet/USDC.json b/external/deployments/bnbMainnet/USDC.json new file mode 100644 index 000000000..ea0a2b14c --- /dev/null +++ b/external/deployments/bnbMainnet/USDC.json @@ -0,0 +1,291 @@ +{ + "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bnbMainnet/USDT.json b/external/deployments/bnbMainnet/USDT.json new file mode 100644 index 000000000..693138090 --- /dev/null +++ b/external/deployments/bnbMainnet/USDT.json @@ -0,0 +1,291 @@ +{ + "address": "0x55d398326f99059ff775485246999027b3197955", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/DAI.json b/external/deployments/bobMainnet/DAI.json new file mode 100644 index 000000000..070d061c0 --- /dev/null +++ b/external/deployments/bobMainnet/DAI.json @@ -0,0 +1,291 @@ +{ + "address": "0x6c851f501a3f24e29a8e39a29591cddf09369080", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/DLLR.json b/external/deployments/bobMainnet/DLLR.json new file mode 100644 index 000000000..1bee9769b --- /dev/null +++ b/external/deployments/bobMainnet/DLLR.json @@ -0,0 +1,291 @@ +{ + "address": "0xf3107eec1e6f067552c035fd87199e1a5169cb20", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/DOG.json b/external/deployments/bobMainnet/DOG.json new file mode 100644 index 000000000..5edb6b744 --- /dev/null +++ b/external/deployments/bobMainnet/DOG.json @@ -0,0 +1,291 @@ +{ + "address": "0xce528db0d9126fe940dcb9876e8c295df670d7c4", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/POWA.json b/external/deployments/bobMainnet/POWA.json new file mode 100644 index 000000000..7ab67994b --- /dev/null +++ b/external/deployments/bobMainnet/POWA.json @@ -0,0 +1,291 @@ +{ + "address": "0xd0c2f08a873186db5cfb7b767db62bef9e495bff", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/PUPS.json b/external/deployments/bobMainnet/PUPS.json new file mode 100644 index 000000000..ed9caa874 --- /dev/null +++ b/external/deployments/bobMainnet/PUPS.json @@ -0,0 +1,291 @@ +{ + "address": "0x5e36c0c344a29de1de2517845fe2289b18feea25", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/SAT.json b/external/deployments/bobMainnet/SAT.json new file mode 100644 index 000000000..4a4ae297b --- /dev/null +++ b/external/deployments/bobMainnet/SAT.json @@ -0,0 +1,291 @@ +{ + "address": "0x78fea795cbfcc5ffd6fb5b845a4f53d25c283bdb", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/SOV.json b/external/deployments/bobMainnet/SOV.json new file mode 100644 index 000000000..85131626e --- /dev/null +++ b/external/deployments/bobMainnet/SOV.json @@ -0,0 +1,291 @@ +{ + "address": "0xba20a5e63eeefffa6fd365e7e540628f8fc61474", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/SolvBTC.json b/external/deployments/bobMainnet/SolvBTC.json new file mode 100644 index 000000000..2ef588f44 --- /dev/null +++ b/external/deployments/bobMainnet/SolvBTC.json @@ -0,0 +1,291 @@ +{ + "address": "0x541fd749419ca806a8bc7da8ac23d346f2df8b77", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/SolvBTC_BBN.json b/external/deployments/bobMainnet/SolvBTC_BBN.json new file mode 100644 index 000000000..b268ba94e --- /dev/null +++ b/external/deployments/bobMainnet/SolvBTC_BBN.json @@ -0,0 +1,291 @@ +{ + "address": "0xcc0966d8418d412c599a6421b760a847eb169a8c", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/USDC.json b/external/deployments/bobMainnet/USDC.json new file mode 100644 index 000000000..6f78ef1e3 --- /dev/null +++ b/external/deployments/bobMainnet/USDC.json @@ -0,0 +1,291 @@ +{ + "address": "0xe75d0fb2c24a55ca1e3f96781a2bcc7bdba058f0", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/USDT.json b/external/deployments/bobMainnet/USDT.json new file mode 100644 index 000000000..436e2a7b0 --- /dev/null +++ b/external/deployments/bobMainnet/USDT.json @@ -0,0 +1,291 @@ +{ + "address": "0x05d032ac25d322df992303dca074ee7392c117b9", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/UniBTC.json b/external/deployments/bobMainnet/UniBTC.json new file mode 100644 index 000000000..d73828f21 --- /dev/null +++ b/external/deployments/bobMainnet/UniBTC.json @@ -0,0 +1,291 @@ +{ + "address": "0x236f8c0a61da474db21b693fb2ea7aab0c803894", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/WBTC.json b/external/deployments/bobMainnet/WBTC.json new file mode 100644 index 000000000..7263ca452 --- /dev/null +++ b/external/deployments/bobMainnet/WBTC.json @@ -0,0 +1,291 @@ +{ + "address": "0x03c7054bcb39f7b2e5b2c7acb37583e32d70cfa3", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/rETH.json b/external/deployments/bobMainnet/rETH.json new file mode 100644 index 000000000..09071521d --- /dev/null +++ b/external/deployments/bobMainnet/rETH.json @@ -0,0 +1,291 @@ +{ + "address": "0xb5686c4f60904ec2bda6277d6fe1f7caa8d1b41a", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/tBTC.json b/external/deployments/bobMainnet/tBTC.json new file mode 100644 index 000000000..f051a6de0 --- /dev/null +++ b/external/deployments/bobMainnet/tBTC.json @@ -0,0 +1,291 @@ +{ + "address": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/usdc.json b/external/deployments/bobMainnet/usdc.json new file mode 100644 index 000000000..6f78ef1e3 --- /dev/null +++ b/external/deployments/bobMainnet/usdc.json @@ -0,0 +1,291 @@ +{ + "address": "0xe75d0fb2c24a55ca1e3f96781a2bcc7bdba058f0", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/usdt.json b/external/deployments/bobMainnet/usdt.json new file mode 100644 index 000000000..436e2a7b0 --- /dev/null +++ b/external/deployments/bobMainnet/usdt.json @@ -0,0 +1,291 @@ +{ + "address": "0x05d032ac25d322df992303dca074ee7392c117b9", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/bobMainnet/wstETH.json b/external/deployments/bobMainnet/wstETH.json new file mode 100644 index 000000000..da72a084c --- /dev/null +++ b/external/deployments/bobMainnet/wstETH.json @@ -0,0 +1,291 @@ +{ + "address": "0x85008ae6198bc91ac0735cb5497cf125ddaac528", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/ethMainnet/DAI.json b/external/deployments/ethMainnet/DAI.json new file mode 100644 index 000000000..258c67f85 --- /dev/null +++ b/external/deployments/ethMainnet/DAI.json @@ -0,0 +1,291 @@ +{ + "address": "0x6b175474e89094c44da98b954eedeac495271d0f", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/ethMainnet/USDC.json b/external/deployments/ethMainnet/USDC.json new file mode 100644 index 000000000..a8c319775 --- /dev/null +++ b/external/deployments/ethMainnet/USDC.json @@ -0,0 +1,291 @@ +{ + "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/ethMainnet/USDT.json b/external/deployments/ethMainnet/USDT.json new file mode 100644 index 000000000..ba5d1b0bf --- /dev/null +++ b/external/deployments/ethMainnet/USDT.json @@ -0,0 +1,291 @@ +{ + "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/BNBs.json b/external/deployments/rskMainnet/BNBs.json new file mode 100644 index 000000000..33d72a9b9 --- /dev/null +++ b/external/deployments/rskMainnet/BNBs.json @@ -0,0 +1,291 @@ +{ + "address": "0x6d9659bdf5b1a1da217f7bbaf7dbaf8190e2e71b", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/FISH.json b/external/deployments/rskMainnet/FISH.json new file mode 100644 index 000000000..33ddc24d6 --- /dev/null +++ b/external/deployments/rskMainnet/FISH.json @@ -0,0 +1,291 @@ +{ + "address": "0x055a902303746382fbb7d18f6ae0df56efdc5213", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/MOC.json b/external/deployments/rskMainnet/MOC.json new file mode 100644 index 000000000..dfa979bf8 --- /dev/null +++ b/external/deployments/rskMainnet/MOC.json @@ -0,0 +1,291 @@ +{ + "address": "0x9ac7fe28967b30e3a4e6e03286d715b42b453d10", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/MYNT.json b/external/deployments/rskMainnet/MYNT.json new file mode 100644 index 000000000..a455274f5 --- /dev/null +++ b/external/deployments/rskMainnet/MYNT.json @@ -0,0 +1,291 @@ +{ + "address": "0x2e6b1d146064613e8f521eb3c6e65070af964ebb", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/POWA.json b/external/deployments/rskMainnet/POWA.json new file mode 100644 index 000000000..c51128f3b --- /dev/null +++ b/external/deployments/rskMainnet/POWA.json @@ -0,0 +1,291 @@ +{ + "address": "0xfe8929d36ac789c562008abd59f5dd7e1eb1f5b6", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/RDOC.json b/external/deployments/rskMainnet/RDOC.json new file mode 100644 index 000000000..560af0be2 --- /dev/null +++ b/external/deployments/rskMainnet/RDOC.json @@ -0,0 +1,291 @@ +{ + "address": "0x2d919f19d4892381d58edebeca66d5642cef1a1f", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/RIF.json b/external/deployments/rskMainnet/RIF.json new file mode 100644 index 000000000..bd8a114ca --- /dev/null +++ b/external/deployments/rskMainnet/RIF.json @@ -0,0 +1,291 @@ +{ + "address": "0x2acc95758f8b5f583470ba265eb685a8f45fc9d5", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/SOV.json b/external/deployments/rskMainnet/SOV.json new file mode 100644 index 000000000..1e72dbeb8 --- /dev/null +++ b/external/deployments/rskMainnet/SOV.json @@ -0,0 +1,291 @@ +{ + "address": "0xefc78fc7d48b64958315949279ba181c2114abbd", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iBPro.json b/external/deployments/rskMainnet/iBPro.json new file mode 100644 index 000000000..d73683257 --- /dev/null +++ b/external/deployments/rskMainnet/iBPro.json @@ -0,0 +1,291 @@ +{ + "address": "0x6e2fb26a60da535732f8149b25018c9c0823a715", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iDLLR.json b/external/deployments/rskMainnet/iDLLR.json new file mode 100644 index 000000000..0148059a3 --- /dev/null +++ b/external/deployments/rskMainnet/iDLLR.json @@ -0,0 +1,291 @@ +{ + "address": "0x077fcb01cab070a30bc14b44559c96f529ee017f", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iDOC.json b/external/deployments/rskMainnet/iDOC.json new file mode 100644 index 000000000..9eea24fcc --- /dev/null +++ b/external/deployments/rskMainnet/iDOC.json @@ -0,0 +1,291 @@ +{ + "address": "0xd8d25f03ebba94e15df2ed4d6d38276b595593c1", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iRBTC.json b/external/deployments/rskMainnet/iRBTC.json new file mode 100644 index 000000000..362e0b6f8 --- /dev/null +++ b/external/deployments/rskMainnet/iRBTC.json @@ -0,0 +1,291 @@ +{ + "address": "0xa9dcdc63eabb8a2b6f39d7ff9429d88340044a7a", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iUSDT.json b/external/deployments/rskMainnet/iUSDT.json new file mode 100644 index 000000000..903cb9363 --- /dev/null +++ b/external/deployments/rskMainnet/iUSDT.json @@ -0,0 +1,291 @@ +{ + "address": "0x849c47f9c259e9d62f289bf1b2729039698d8387", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/external/deployments/rskMainnet/iXUSD.json b/external/deployments/rskMainnet/iXUSD.json new file mode 100644 index 000000000..d3e5e3b5f --- /dev/null +++ b/external/deployments/rskMainnet/iXUSD.json @@ -0,0 +1,291 @@ +{ + "address": "0x8f77ecf69711a4b346f23109c40416be3dc7f129", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/hardhat.config.js b/hardhat.config.js index f79668d3c..e1a0628d7 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -34,6 +34,11 @@ const mainnetPKs = [ ].filter((item, i, arr) => item !== "" && arr.indexOf(item) === i); const mainnetAccounts = mainnetPKs.length > 0 ? mainnetPKs : mnemonic; +const networkIdToUse = process.env.NETWORK_ID ? JSON.parse(process.env.NETWORK_ID) : 31337; +// minGasPrice parameter: Only for use from london or higher evm onwards +// NOT recommended fo RSK +const minGasPrice = process.env.MIN_GAS_PRICE ? JSON.parse(process.env.MIN_GAS_PRICE) : 0; + /* * Test hardhat forking with patched hardhat * @@ -162,19 +167,55 @@ module.exports = { }, networks: { hardhat: { - chainId: 31337, + // hardfork: "shanghai", + chains: { + 30: { + hardforkHistory: { + istanbul: 2000000, + london: 4000000, + }, + }, + 31: { + hardforkHistory: { + istanbul: 1000000, + london: 3000000, + }, + }, + 1: { + hardforkHistory: { + istanbul: 9069000, + london: 12965000, + // shanghai: 17000000, + }, + }, + 56: { + hardforkHistory: { + istanbul: 5184000, + london: 30720096, + // shanghai: 42578785, + }, + }, + // 60808: { + // hardforkHistory: { + // london: 0, + // // shanghai: 0, + // }, + // }, + }, + chainId: networkIdToUse, allowUnlimitedContractSize: true, accounts: { mnemonic: "test test test test test test test test test test test junk" }, initialBaseFeePerGas: 0, + // initialBaseFeePerGas: minGasPrice, // Only for use from london or higher evm - not recommended fo RSK //blockGasLimit: 6800000, //gasPrice: 66000010, - //timeout: 1000000, + timeout: 10000000, }, localhost: { timeout: 100000, }, rskForkedTestnet: { - chainId: 31337, + chainId: networkIdToUse, url: "http://127.0.0.1:8545/", gasPrice: 66000010, blockGasLimit: 6800000, @@ -203,7 +244,7 @@ module.exports = { timeout: 100000, }, rskForkedMainnet: { - chainId: 31337, + chainId: networkIdToUse, accounts: mainnetAccounts, url: "http://127.0.0.1:8545", blockGasLimit: 6800000, @@ -262,6 +303,13 @@ module.exports = { url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`, accounts: mainnetAccounts, }, + ethForkedMainnet: { + chainId: networkIdToUse, + accounts: mainnetAccounts, + url: "http://127.0.0.1:8545", + live: true, + tags: ["mainnet", "forked"], + }, bobTestnet: { url: "https://bob-sepolia.rpc.gobob.xyz/", chainId: 808813, @@ -278,7 +326,7 @@ module.exports = { gasPrice: 50000000, }, bobForkedTestnet: { - chainId: 31337, + chainId: networkIdToUse, accounts: testnetAccounts, url: "http://127.0.0.1:8545", gasPrice: 50000000, @@ -286,6 +334,28 @@ module.exports = { tags: ["testnet", "forked"], timeout: 100000, }, + bobForkedMainnet: { + chainId: networkIdToUse, + accounts: mainnetAccounts, + url: "http://127.0.0.1:8545", + live: true, + tags: ["mainnet", "forked"], + }, + bnbMainnet: { + url: "https://bsc.sovryn.app/mainnet", + chainId: 56, + accounts: mainnetAccounts, + // live: true, + tags: ["mainnet"], + // gasPrice: 50000000, + }, + bnbForkedMainnet: { + chainId: networkIdToUse, + accounts: mainnetAccounts, + url: "http://127.0.0.1:8545", + live: true, + tags: ["mainnet", "forked"], + }, }, paths: { sources: "./contracts", @@ -306,33 +376,43 @@ module.exports = { deployments: { rskSovrynTestnet: ["external/deployments/rskTestnet"], rskTestnet: [ - "external/deployments/rskTestnet", "deployment/deployments/rskSovrynTestnet", + "external/deployments/rskTestnet", ], rskForkedTestnet: [ - "external/deployments/rskTestnet", "external/deployments/rskForkedTestnet", "deployment/deployments/rskSovrynTestnet", + "external/deployments/rskTestnet", ], rskForkedTestnetFlashback: ["external/deployments/rskForkedTestnetFlashback"], rskForkedMainnetFlashback: ["external/deployments/rskForkedMainnetFlashback"], rskSovrynMainnet: ["external/deployments/rskMainnet"], rskMainnet: [ - "external/deployments/rskMainnet", "deployment/deployments/rskSovrynMainnet", + "external/deployments/rskMainnet", ], rskForkedMainnet: [ - "external/deployments/rskMainnet", "deployment/deployments/rskSovrynMainnet", "external/deployments/rskForkedMainnet", + "external/deployments/rskMainnet", + ], + bobTestnet: ["external/deployments/bobTestnet", "deployment/deployments/bobTestnet"], + bobMainnet: ["external/deployments/bobMainnet", "deployment/deployments/bobMainnet"], + bobForkedMainnet: [ + "external/deployments/bobMainnet", + "deployment/deployments/bobMainnet", ], - bobTestnet: ["external/deployments/bobTestnet"], - bobMainnet: ["external/deployments/bobMainnet"], bobForkedTestnet: [ "external/deployments/bobTestnet", "deployment/deployments/bobTestnet", ], - ethMainnet: ["external/deployments/ethMainnet", "deployment/deployments/ethMainnet"], + ethMainnet: ["deployment/deployments/ethMainnet", "external/deployments/ethMainnet"], + ethForkedMainnet: [ + "external/deployments/ethMainnet", + "deployment/deployments/ethMainnet", + ], + bnbMainnet: ["external/deployments/bnbMainnet"], + bnbForkedMainnet: ["external/deployments/bnbMainnet"], }, }, typechain: { diff --git a/hardhat/tasks/governance.js b/hardhat/tasks/governance.js index 775365ce9..654083cc0 100644 --- a/hardhat/tasks/governance.js +++ b/hardhat/tasks/governance.js @@ -12,6 +12,11 @@ const { const { sendWithMultisig, getSignerFromAccount } = require("../../deployment/helpers/helpers"); const { default: BigNumber } = require("bignumber.js"); +const VestingType = { + TeamVesting: 5, + Vesting: 1, +}; + const getImpersonatedSignerFromJsonRpcProvider = async (addressToImpersonate) => { //await impersonateAccount(addressToImpersonate); //return await ethers.getSigner(addressToImpersonate); @@ -242,37 +247,6 @@ async function createVestings(hre, dryRun, path, multiplier, signerAcc) { console.log(ethers.utils.formatEther(balanceBefore.sub(balanceAfter)).toString()); } -task("governance:cancelTeamVestingsOfAccount", "Cancel all team vesting contracts of account") - .addPositionalParam("address", "Cancel this user's all team vestings") - .addOptionalParam("startFrom", "Cancel starting from timestamp", 0, types.int) - .addOptionalParam( - "signer", - "Cancelling multisig transaction creator", - "deployer", - types.string - ) - .setAction(async ({ address: userAddress, signer: signerAcc, startFrom }, hre) => { - const { ethers } = hre; - const vestingRegistry = await ethers.getContract("VestingRegistry"); - const vestings = await vestingRegistry.getVestingsOf(userAddress); - for (const vesting of vestings) { - await cancelTeamVesting(hre, vesting.vestingAddress, startFrom, signerAcc); - } - }); - -task("governance:cancelTeamVesting", "Cancel team vesting contract") - .addPositionalParam("address", "Team vesting contract to cancel") - .addOptionalParam("startFrom", "Cancel starting from timestamp", 0, types.int) - .addOptionalParam( - "signer", - "Cancelling multisig transaction creator", - "deployer", - types.string - ) - .setAction(async ({ address: vestingAddress, signer: signerAcc, startFrom }, hre) => { - await cancelTeamVesting(hre, vestingAddress, startFrom, signerAcc); - }); - async function cancelTeamVesting(hre, vestingAddress, startFrom, signerAcc) { const { ethers, @@ -349,21 +323,6 @@ async function parseVestingsFile(ethers, fileName, multiplier) { }); } -task("governance:createVestings", "Create vestings") - .addParam("path", "The file path") - .addParam("decimals", "Number of decimals for amount", 2, types.int) - .addFlag("dryRun", "Dry run") - .addOptionalParam("signer", "Signer name: 'signer' or 'deployer'", "deployer") - .setAction(async ({ path, signer, dryRun, decimals }, hre) => { - const multiplier = (10 ** (18 - decimals)).toString(); - await createVestings(hre, dryRun, path, multiplier, signer); - }); - -const VestingType = { - TeamVesting: 5, - Vesting: 1, -}; - function calculateUid(tokenOwner, vestingCreationType, cliff, duration) { /*const uid = ethers.utils.keccak256( ethers.utils.defaultAbiCoder.encode( @@ -556,6 +515,47 @@ async function createFourYearVestings(hre, path, signerAcc) { console.log(balanceBefore.sub(balanceAfter) / ethers.constants.WeiPerEther); } +task("governance:cancelTeamVestingsOfAccount", "Cancel all team vesting contracts of account") + .addPositionalParam("address", "Cancel this user's all team vestings") + .addOptionalParam("startFrom", "Cancel starting from timestamp", 0, types.int) + .addOptionalParam( + "signer", + "Cancelling multisig transaction creator", + "deployer", + types.string + ) + .setAction(async ({ address: userAddress, signer: signerAcc, startFrom }, hre) => { + const { ethers } = hre; + const vestingRegistry = await ethers.getContract("VestingRegistry"); + const vestings = await vestingRegistry.getVestingsOf(userAddress); + for (const vesting of vestings) { + await cancelTeamVesting(hre, vesting.vestingAddress, startFrom, signerAcc); + } + }); + +task("governance:cancelTeamVesting", "Cancel team vesting contract") + .addPositionalParam("address", "Team vesting contract to cancel") + .addOptionalParam("startFrom", "Cancel starting from timestamp", 0, types.int) + .addOptionalParam( + "signer", + "Cancelling multisig transaction creator", + "deployer", + types.string + ) + .setAction(async ({ address: vestingAddress, signer: signerAcc, startFrom }, hre) => { + await cancelTeamVesting(hre, vestingAddress, startFrom, signerAcc); + }); + +task("governance:createVestings", "Create vestings") + .addParam("path", "The file path") + .addParam("decimals", "Number of decimals for amount", 2, types.int) + .addFlag("dryRun", "Dry run") + .addOptionalParam("signer", "Signer name: 'signer' or 'deployer'", "deployer") + .setAction(async ({ path, signer, dryRun, decimals }, hre) => { + const multiplier = (10 ** (18 - decimals)).toString(); + await createVestings(hre, dryRun, path, multiplier, signer); + }); + task("governance:createFourYearVestings", "Create vestings") .addParam("path", "The file path") .addOptionalParam("signer", "Signer name: 'signer' or 'deployer'", "deployer") @@ -607,7 +607,7 @@ task( create4YUVestings().catch((error) => { console.error("Error:", error); }); - */ +*/ task("governance:getVotingPower", "Get a staker's voting power current or at a block") .addParam("address", "The staker's address to get current voting power for") diff --git a/hardhat/tasks/misc.js b/hardhat/tasks/misc.js index 1c57a97a3..6a607fddb 100644 --- a/hardhat/tasks/misc.js +++ b/hardhat/tasks/misc.js @@ -32,59 +32,6 @@ const getEthersLog = async (contract, filter) => { return parsedEvents; }; -task("VestingStakeSet-event", "get transactions with VestingStakeSet event emitted").setAction( - async (taskArgs, hre) => { - const { - deployments: { deploy, get, log }, - getNamedAccounts, - ethers, - } = hre; - const staking = await ethers.getContractAt( - "IStaking", - "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e" - ); - //const abi = (await deployments.getArtifact("Staking")).abi; - const abi = ["event VestingStakeSet(uint256,uint96)"]; - //const abi = ["event TokensStaked(address,uint256,uint256,uint256)"]; - const iface = new ethers.utils.Interface(abi); - //const filter = staking.filters.VestingStakeSet(null, null); - //cblock = 3780053; // a block with the first vesting created - cblock = 5190053; // a block with the first vesting created - block = await ethers.provider.getBlockNumber(); - let index = 0; - while (cblock != block) { - cblock += 10000; - if (cblock > block) cblock = block; - const filter = { - address: "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e", - topics: [ - //ethers.utils.id("TokensStaked(address,uint256,uint256,uint256)") - ethers.utils.id("VestingStakeSet(uint256,uint96)"), - ], - fromBlock: cblock - 10000, - toBlock: cblock, - }; - let cres = []; - - try { - cres = await ethers.provider.getLogs(filter); - } catch (e) { - console.log(e); - console.log("failure at block", cblock); - return; - } - //console.log(await getEthersLog(staking, filter)); - if (cres[0]) { - console.log("index: ", index++, "\n", cres); - //break; - } - if (cblock % 500000 == 0) { - console.log(cblock, "block reached"); - } - } - } -); - const getImpersonatedSigner = async (addressToImpersonate) => { await impersonateAccount(addressToImpersonate); return await ethers.getSigner(addressToImpersonate); @@ -212,7 +159,7 @@ task("misc:forkedchain:vestingStake", "Stakes from vesting contract") logger.warning(await staking.getStakes(vesting)); }); -task("getBalanceOfAccounts", "Get ERC20 or native token balance of account or address") +task("misc:get-balance-of-accounts", "Get ERC20 or native token balance of account or address") .addPositionalParam( "accounts", "Address(es) or named account(s) contract name(s) to get balance of: 'deployer' or 'MultiSigWallet,deployer,0x542fda317318ebf1d3deaf76e0b632741a7e677d'" @@ -268,3 +215,122 @@ task("getBalanceOfAccounts", "Get ERC20 or native token balance of account or ad } } }); +task( + "misc:vesting-stake-set-event", + "get transactions with VestingStakeSet event emitted" +).setAction(async (taskArgs, hre) => { + const { + deployments: { deploy, get, log }, + getNamedAccounts, + ethers, + } = hre; + const staking = await ethers.getContractAt( + "IStaking", + "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e" + ); + //const abi = (await deployments.getArtifact("Staking")).abi; + const abi = ["event VestingStakeSet(uint256,uint96)"]; + //const abi = ["event TokensStaked(address,uint256,uint256,uint256)"]; + const iface = new ethers.utils.Interface(abi); + //const filter = staking.filters.VestingStakeSet(null, null); + //cblock = 3780053; // a block with the first vesting created + cblock = 5190053; // a block with the first vesting created + block = await ethers.provider.getBlockNumber(); + let index = 0; + while (cblock != block) { + cblock += 10000; + if (cblock > block) cblock = block; + const filter = { + address: "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e", + topics: [ + //ethers.utils.id("TokensStaked(address,uint256,uint256,uint256)") + ethers.utils.id("VestingStakeSet(uint256,uint96)"), + ], + fromBlock: cblock - 10000, + toBlock: cblock, + }; + let cres = []; + + try { + cres = await ethers.provider.getLogs(filter); + } catch (e) { + console.log(e); + console.log("failure at block", cblock); + return; + } + //console.log(await getEthersLog(staking, filter)); + if (cres[0]) { + console.log("index: ", index++, "\n", cres); + //break; + } + if (cblock % 500000 == 0) { + console.log(cblock, "block reached"); + } + } +}); + +/** + * This is the infura node version to run an eth node + * It is throwing the error: + * + * "Error HH604: Error running JSON-RPC server: Too Many Requests error received from mainnet.infura.io" + * +task("misc:run-forked-eth-mainnet", "Runs a forked eth node") + .addOptionalParam("forkBlock", "Block number to fork from") + .setAction(async (taskArgs, hre) => { + const { NODE_REAL_API_KEY } = process.env; + const forkParams = { + jsonRpcUrl: `https://eth-mainnet.nodereal.io/v1/${NODE_REAL_API_KEY}`, + blockNumber: taskArgs.forkBlock ? parseInt(taskArgs.forkBlock) : undefined, + }; + await hre.network.provider.request({ + method: "hardhat_reset", + params: [ + { + forking: forkParams, + }, + ], + }); + await hre.run("node", { noDeploy: true }); + } +); +*/ + +// Please obtain a node-real api key and config it on .env file +task("misc:run-forked-eth-mainnet", "Runs a forked eth node") + .addOptionalParam("forkBlock", "Block number to fork from") + .setAction(async (taskArgs, hre) => { + const { NODE_REAL_API_KEY } = process.env; + const forkParams = { + jsonRpcUrl: `https://eth-mainnet.nodereal.io/v1/${NODE_REAL_API_KEY}`, + blockNumber: taskArgs.forkBlock ? parseInt(taskArgs.forkBlock) : undefined, + }; + + await hre.network.provider.request({ + method: "hardhat_reset", + params: [{ forking: forkParams }], + }); + + // Now we run the node task with the noDeploy option + await hre.run("node", { noDeploy: true }); + }); + +// Testing with a Tenderly's RPC endpoint +/// @todo: replace with a more reliable RPC endpoint +task("misc:run-forked-bob-mainnet", "Runs a forked bob node") + .addOptionalParam("forkBlock", "Block number to fork from") + .setAction(async (taskArgs, hre) => { + const forkParams = { + jsonRpcUrl: `https://bob.gateway.tenderly.co/${process.env.TENDERLY_BOB_RPC_KEY}`, + blockNumber: taskArgs.forkBlock ? parseInt(taskArgs.forkBlock) : undefined, + }; + await hre.network.provider.request({ + method: "hardhat_reset", + params: [ + { + forking: forkParams, + }, + ], + }); + await hre.run("node", { noDeploy: true }); + }); diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index e1c1816d0..453ae12cb 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -1,7 +1,10 @@ const fs = require("fs"); const csv = require("csv-parser"); -const { task } = require("hardhat/config"); const Logs = require("node-logs"); +const logger = new Logs().showInConsole(true); +const { task } = require("hardhat/config"); +const { getSignerFromAccount } = require("../../deployment/helpers/helpers"); + /*const { signWithMultisig, multisigCheckTx, @@ -11,26 +14,136 @@ const Logs = require("node-logs"); multisigRemoveOwner, } = require("../../deployment/helpers/helpers");*/ -const currencies = { - eth: "0x0000000000000000000000000000000000000000", - usdc: "0xe75d0fb2c24a55ca1e3f96781a2bcc7bdba058f0", - usdt: "0x05d032ac25d322df992303dca074ee7392c117b9", - dai: "0x6c851f501a3f24e29a8e39a29591cddf09369080", - wbtc: "0x03c7054bcb39f7b2e5b2c7acb37583e32d70cfa3", - weth: "0x4200000000000000000000000000000000000006", // or... may be: 0x148964f7E4f96d347528467BFe8Bff36a953ba60 (ERC20) or 0x140c1A044D7d6650b73D4045b5ea1D2AD4666c2B (ERC-721) - sov: "0xba20a5e63eeEFfFA6fD365E7e540628F8fC61474", - // xusd: "0x", // not found in BOB mainnet - powa: "0xd0c2f08a873186db5cfb7b767db62bef9e495bff", - sat: "0x78fea795cbfcc5ffd6fb5b845a4f53d25c283bdb", - tbtc: "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2", - reth: "0xb5686c4f60904ec2bda6277d6fe1f7caa8d1b41a", - alex: "0xa669e059fdcbdfc532a2edd658eb2922799eedb8", - dllr: "0xf3107eec1e6f067552c035fd87199e1a5169cb20", - wsteth: "0x85008ae6198bc91ac0735cb5497cf125ddaac528", - // stone: "0x", -}; +// function to parse distribution .csv files on NATIVE coin +async function parseFileForSendNATIVE(fileName) { + const { BigNumber } = require("ethers"); + console.log(fileName); + let totalAmount = BigNumber.from("0"); + let receivers = []; + let amounts = []; + let errorMsg = ""; + const DECIMALS = 18; // We know the number of decimals is always 18 -const logger = new Logs().showInConsole(true); + return new Promise((resolve, reject) => { + fs.createReadStream(fileName) + .pipe(csv()) + .on("data", (row) => { + const tokenOwner = row.tokenOwner.trim(); + const rawAmount = row.amount.trim(); + + const parts = rawAmount.split("."); + if (parts.length !== 2) { + errorMsg += `\n${tokenOwner} amount: ${rawAmount} (invalid decimal format)`; + return; + } + + let [integerPart, decimalPart] = parts; + + // If integerPart is empty (like ".00123"), treat it as "0" + if (!integerPart) { + integerPart = "0"; + } + + // Ensure the decimal part has exactly 18 digits + if (decimalPart.length < DECIMALS) { + decimalPart = decimalPart.padEnd(DECIMALS, "0"); + } else if (decimalPart.length > DECIMALS) { + errorMsg += `\n${tokenOwner} amount: ${rawAmount} (more than ${DECIMALS} decimal places)`; + return; + } + + const fullIntegerStr = integerPart + decimalPart; + if (!/^\d+$/.test(fullIntegerStr)) { + errorMsg += `\n${tokenOwner} amount: ${rawAmount} (invalid characters)`; + return; + } + + // Convert to BigNumber and back to string to remove leading zeros + const amountBN = BigNumber.from(fullIntegerStr); + const normalizedAmountStr = amountBN.toString(); + + totalAmount = totalAmount.add(amountBN); + + receivers.push(tokenOwner); + amounts.push(normalizedAmountStr); + + console.log("======================================="); + console.log(`'${tokenOwner}',`); + console.log(normalizedAmountStr); + }) + .on("end", () => { + console.log(receivers); + console.log(amounts); + + if (errorMsg !== "") { + reject(new Error(`Formatting error: ${errorMsg}`)); + } else { + resolve({ + totalAmount: totalAmount.toString(), + receivers, + amounts, + }); + } + }) + .on("error", (err) => { + reject(err); + }); + }); +} + +// functions to parse distribution .csv files on ERC20 token +async function parseFileForSendDirect(fileName, multiplier) { + console.log(fileName); + let totalAmount = 0; + let receivers = []; + let amounts = []; + let errorMsg = ""; + + return new Promise((resolve, reject) => { + fs.createReadStream(fileName) + // The default behavior of csv-parser with a header line present + // is that it will use the first line as headers automatically. + .pipe(csv()) + .on("data", (row) => { + // Now using the header names directly: + const tokenOwner = row.tokenOwner.trim(); + const amountStr = row.amount.trim(); + const decimals = amountStr.split("."); + + if (decimals.length !== 2 || decimals[1].length !== 2) { + errorMsg += `\n${tokenOwner} amount: ${amountStr}`; + } + + let amount = amountStr.replace(",", "").replace(".", ""); + amount = parseInt(amount, 10) * multiplier; + totalAmount += amount; + + receivers.push(tokenOwner); + amounts.push(amount); + + console.log("======================================="); + console.log(`'${tokenOwner}',`); + console.log(amount); + }) + .on("end", () => { + console.log(receivers); + console.log(amounts); + + if (errorMsg !== "") { + reject(new Error(`Formatting error: ${errorMsg}`)); + } else { + resolve({ + totalAmount, + receivers, + amounts, + }); + } + }) + .on("error", (err) => { + reject(err); + }); + }); +} task( "utils:compare-bytecode", @@ -205,176 +318,123 @@ task("utils:replace-tx", "Replace tx in mempool") } } ); - -// functions to parse distribution .csv files on NATIVE coin -async function parseFileNATIVE(fileName) { - console.log(fileName); - let totalAmount = 0; - let receivers = []; - let amounts = []; - let errorMsg = ""; - - return new Promise((resolve, reject) => { - fs.createReadStream(fileName) - .pipe(csv()) - .on("data", (row) => { - const tokenOwner = row[0].trim(); - let rawAmount = row[1].trim(); - let amountStr = rawAmount.replace(",", "").replace(".", "").replace(" ", ""); - - if (parseInt(amountStr, 10) !== parseInt(rawAmount, 10)) { - errorMsg += `\n${tokenOwner} amount: ${rawAmount}`; - } - - const amount = parseInt(amountStr, 10); - totalAmount += amount; - - receivers.push(tokenOwner); - amounts.push(amount); - - console.log("======================================="); - console.log(`'${tokenOwner}',`); - console.log(amount); - }) - .on("end", () => { - console.log(receivers); - console.log(amounts); - - if (errorMsg !== "") { - reject(new Error(`Formatting error: ${errorMsg}`)); - } else { - resolve({ - totalAmount, - receivers, - amounts, - }); - } - }) - .on("error", (err) => { - reject(err); - }); - }); -} - -// functions to parse distribution .csv files on ERC20 token -async function parseFile(fileName, multiplier) { - console.log(fileName); - let totalAmount = 0; - let receivers = []; - let amounts = []; - let errorMsg = ""; - - return new Promise((resolve, reject) => { - fs.createReadStream(fileName) - .pipe(csv()) - .on("data", (row) => { - const tokenOwner = row[0].trim(); - const amountStr = row[1].trim(); - const decimals = amountStr.split("."); - - if (decimals.length !== 2 || decimals[1].length !== 2) { - errorMsg += `\n${tokenOwner} amount: ${amountStr}`; - } - - let amount = amountStr.replace(",", "").replace(".", ""); - amount = parseInt(amount, 10) * multiplier; - totalAmount += amount; - - receivers.push(tokenOwner); - amounts.push(amount); - - console.log("======================================="); - console.log(`'${tokenOwner}',`); - console.log(amount); - }) - .on("end", () => { - console.log(receivers); - console.log(amounts); - - if (errorMsg !== "") { - reject(new Error(`Formatting error: ${errorMsg}`)); - } else { - resolve({ - totalAmount, - receivers, - amounts, - }); - } - }) - .on("error", (err) => { - reject(err); - }); - }); -} - // a task to use the GenericTokenSender.transferTokensUsingList function to distribute tokens -// way of use: $ hh sendDirect --currency=USDC --path=./scripts/externalData/dist.csv --dryrun=false --multiplier=10*16 --network bobMainnet -task("sendDirect", "Direct token sender script") - .addParam( - "currency", - "The currency type (e.g., NATIVE, USDC, USDT, DAI, WBTC, WETH, SOV, XUSD, POWA, SAT)" - ) +// way of use: $ hh utils:send-direct --currency USDC --path "./scripts/externalData/dist.csv" --dryrun --network bobMainnet +task("utils:send-direct", "Direct token sender script") + .addOptionalParam("currency", "The currency type (e.g., WBTC, XUSD, POWA, SAT...)") .addParam("path", "The file path for addresses") - .addParam("dryrun", "Whether to do a SIMULATION or not") - .addParam("multiplier", "The multiplier for token amounts", 10 * 16, types.int) - .setAction(async ({ currency, path, dryrun, multiplier }, hre) => { + .addParam("account", "The address of the account to use for signing the transaction") + .addFlag("dryRun", "When present, the flag instructs the script to simulate the transaction") + .addFlag( + "native", + "When present, the flag instructs the script to use the native currency and ignore the currency parameter" + ) + .setAction(async ({ currency, path, account, dryrun, native }, hre) => { + // if native flag is not present, the currency parameter is required + if (!native && !currency) { + logger.error( + "If the native asset is not distirbuted, the currency parameter is required" + ); + return; + } const { ethers } = hre; + const { constants } = require("ethers"); + + const testBlock = await ethers.provider.getBlock("latest"); + + if (dryRun && (!hre.network.tags.forked || testBlock.number === 0)) { + logger.error("Dry run is only available on live forked networks"); + logger.info("Please run in a separate terminal: $ npm run fork:xxx-mainnet-chained"); + logger.info("Where 'xxx' is the network name: bob, eth, bnb or rsk"); + return; + } + + let signer = await getSignerFromAccount(hre, account); + let signerAddress = signer.address; - const acct = (await ethers.getSigners())[0]; // Use the first signer from ethers + // this action is only valid in RSK or BOB networks. + // We will update on future deployments on Eth and Bnb networks. + const netId = await ethers.provider.getNetwork().then((n) => n.chainId); + if (netId === 1 || netId === 56) { + logger.error("This action is only valid in RSK or BOB networks"); + return; + } - const GenericTokenSender = await ethers.getContract("GenericTokenSender"); + const GenericTokenSender = await ethers.getContract("GenericTokenSender", signer); + const token = native ? constants.AddressZero : await ethers.getContract(currency); + const decimals = native ? 18 : await token.decimals(); - const balanceBefore = await acct.getBalance(); + const balanceBefore = await signer.getBalance(); let totalAmount = 0; // Data parsing - const data = - currency === "NATIVE" - ? await parseFileNATIVE(path) - : await parseFile(path, multiplier); + const data = native + ? await parseFileForSendNATIVE(path) + : await parseFileForSendDirect(path, 10 ** decimals); totalAmount += data.totalAmount; - // Check if the currency exists in the currencies object - if (currency !== "NATIVE" && !currencies.hasOwnProperty(currency)) { - throw new Error( - `Currency "${currency}" not found in the supported currencies list. Please check for typos or add the currency.` - ); + const usersBalancesBefore = []; + + // Get the balances of the users before the distribution + for (let i = 0; i < data.receivers.length; i++) { + const balance = native + ? await ethers.provider.getBalance(data.receivers[i]) + : await token.balanceOf(data.receivers[i]); + usersBalancesBefore.push(balance); } - // Dry run check - if (!dryrun) { - const tx = await GenericTokenSender.transferTokensUsingList( - currency !== "NATIVE" - ? currencies[currency.toLowerCase()] - : ethers.constants.AddressZero, - data.receivers, - data.amounts - ); - const receiptTx = await tx.wait(); - console.log("Transaction hash:"); - console.log(tx.hash); - console.log("Transaction gas used:"); - console.log(tx.gasUsed); - fs.writeFileSync( - `./scripts/externalData/${currency}_distribution_tx_receipt.json`, - JSON.stringify(receiptTx, null, 2), - { flags: "w" } - ); - } else { - // MISSING SCRIPT TO SIMULATE TRANSACTION + const tx = await GenericTokenSender.transferTokensUsingList( + !native ? token.address.toLowerCase() : token, + data.receivers, + data.amounts + ); + const receiptTx = await tx.wait(); + console.log("Transaction hash:"); + console.log(tx.hash); + console.log("Transaction gas used:"); + console.log(tx.gasUsed); + fs.writeFileSync( + `./scripts/externalData/${currency}_distribution_tx_receipt.json`, + JSON.stringify(receiptTx, null, 2), + { flags: "w" } + ); + + const usersBalancesAfter = []; + + // Get the balances of the users after the distribution + for (let i = 0; i < data.receivers.length; i++) { + const balance = native + ? await ethers.provider.getBalance(data.receivers[i]) + : await token.balanceOf(data.receivers[i]); + usersBalancesAfter.push(balance); } console.log("======================================="); console.log(`${currency} amount:`); - console.log(totalAmount / 10 ** 18); + console.log(totalAmount / 10 ** decimals); const balanceAfter = await conf.acct.getBalance(); console.log("Execution cost:"); console.log((balanceBefore - balanceAfter) / 10 ** 18); - }); + for (let i = 0; i < data.receivers.length; i++) { + const diff = usersBalancesAfter[i] - usersBalancesBefore[i]; + const expectedDiff = data.amounts[i]; + const matchDiff = diff === expectedDiff; + console.log("======================================="); + console.log(`amount received by '${data.receivers[i]}',`); + console.log(diff / 10 ** decimals); + console.log("while the expected amount was:"); + console.log(data.amounts[i] / 10 ** decimals); + if (matchDiff) { + console.log(`The expected amount matches for ${data.receivers[i]}`); + } else { + console.error(`The amounts DO NOT match for ${data.receivers[i]}`); + } + } + }); // way of use: $ hh simulate-tx --tx-to
--tx-value --tx-data --tx-from
--tx-gas-limit --tx-gas-price --tx-nonce --url -task("simulate-tx", "Simulates a transaction on forked network") +task("utils:simulate-tx", "Simulates a transaction on forked network") .addParam("txTo", "The address to send the transaction to") .addParam("txValue", "The value to send in the transaction") .addParam("txFrom", "The account to use to sign the transaction") @@ -433,7 +493,7 @@ task("simulate-tx", "Simulates a transaction on forked network") fs.writeFileSync("./txReceipt.json", JSON.stringify(txReceipt, null, 2), { flag: "w+" }); }); // way of use: $ hh send-tx --network --tx-to
--tx-value --tx-data --tx-from
--tx-gas-limit --tx-gas-price --tx-nonce --simulate -task("send-tx", "Creates and sends a raw transaction") +task("utils:send-tx", "Creates and sends a raw transaction") .addParam("txTo", "address: The address to send the transaction to") .addParam("txValue", "number: The value to send in the transaction") .addParam("txData", "byte-string: The data to include in the transaction") @@ -542,7 +602,7 @@ task("send-tx", "Creates and sends a raw transaction") } }); // way of use: $ hh data-parser --abi --params -task("data-parser", "Encode data into abi format") +task("utils:data-parser", "Encode data into abi format") .addParam("abi", "must follow the following syntax: 'function functionName(type1,type2,...)'") .addParam("params", "A single string wit comma separated values") .setAction(async (taskArgs, hre) => { @@ -574,7 +634,7 @@ task("data-parser", "Encode data into abi format") } }); // way of use: $ hh unit-parser --unit --decimals -task("unit-parser", "Parse unit from string") +task("utils:unit-parser", "Parse unit from string") .addParam("unit", "The unit to parse") .addParam("decimals", "The number of decimals") .setAction(async (taskArgs, hre) => { @@ -585,7 +645,7 @@ task("unit-parser", "Parse unit from string") console.log("Unit parsed: ", unitParsed.toString()); }); // way of use: $ hh zero-padder --arg --bytes -task("zero-padder", "Pad an argument with zeros") +task("utils:zero-padder", "Pad an argument with zeros") .addParam("arg", "The argument to pad") .addParam("bytes", "The length of the argument after padding") .setAction(async (taskArgs, hre) => { diff --git a/package.json b/package.json index 2f9323108..f2b6efa77 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,13 @@ "npm-publish": "npm run compile && npm publish", "fees-withdraw": "brownie run rewards_cron", "set-block": "brownie run setBlock_cron", + "run-forked-eth-mainnet": "npx hardhat misc:run-forked-eth-mainnet", + "run-forked-bob-mainnet": "npx hardhat misc:run-forked-bob-mainnet", "fork:rsk-mainnet": "hardhat node --fork https://mainnet-dev.sovryn.app/rpc --no-deploy", + "fork:eth-mainnet-chained": "export NETWORK_ID=1 && npm run run-forked-eth-mainnet", + "fork:rsk-mainnet-chained": "export NETWORK_ID=30 && hardhat node --fork https://mainnet-dev.sovryn.app/rpc --no-deploy", + "fork:bnb-mainnet-chained": "export NETWORK_ID=56 && hardhat node --fork https://bsc.sovryn.app/mainnet --no-deploy", + "fork:bob-mainnet-chained": "export NETWORK_ID=60808 && npm run run-forked-bob-mainnet", "fork:rsk-mainnet-at-block": "cross-env IS_FORKED=1 && hardhat node --fork https://mainnet-dev.sovryn.app/rpc --no-deploy --fork-block-number 4690000", "fork:rsk-testnet": "hardhat node --fork https://testnet.sovryn.app/rpc --no-deploy", "hh:console-fork-mainnet": "hardhat console --network rskForkedMainnet", diff --git a/scripts/externalData/dist.csv b/scripts/externalData/dist.csv deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/externalData/example.csv b/scripts/externalData/example.csv new file mode 100644 index 000000000..cc651088b --- /dev/null +++ b/scripts/externalData/example.csv @@ -0,0 +1,6 @@ +tokenOwner,amount +0x1234567890abcdef1234567890abcdef12345678,100.00 +0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,200.50 +0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef,300.25 +0x1111111111111111111111111111111111111111,400.75 +0x2222222222222222222222222222222222222222,500.10 \ No newline at end of file diff --git a/scripts/externalData/example_native.csv b/scripts/externalData/example_native.csv new file mode 100644 index 000000000..87234874a --- /dev/null +++ b/scripts/externalData/example_native.csv @@ -0,0 +1,6 @@ +tokenOwner,amount +0x1234567890abcdef1234567890abcdef12345678,0.00123 +0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,0.45678 +0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef,0.00089 +0x1111111111111111111111111111111111111111,0.98765 +0x2222222222222222222222222222222222222222,1.23456 \ No newline at end of file diff --git a/scripts/send-direct-helpers/ERC20.json b/scripts/send-direct-helpers/ERC20.json new file mode 100644 index 000000000..28a6ffea5 --- /dev/null +++ b/scripts/send-direct-helpers/ERC20.json @@ -0,0 +1,297 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20", + "sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000b4638038062000b4683398101604081905262000034916200011f565b600362000042838262000218565b50600462000051828262000218565b505050620002e4565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008257600080fd5b81516001600160401b03808211156200009f576200009f6200005a565b604051601f8301601f19908116603f01168101908282118183101715620000ca57620000ca6200005a565b81604052838152602092508683858801011115620000e757600080fd5b600091505b838210156200010b5785820183015181830184015290820190620000ec565b600093810190920192909252949350505050565b600080604083850312156200013357600080fd5b82516001600160401b03808211156200014b57600080fd5b620001598683870162000070565b935060208501519150808211156200017057600080fd5b506200017f8582860162000070565b9150509250929050565b600181811c908216806200019e57607f821691505b602082108103620001bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021357600081815260208120601f850160051c81016020861015620001ee5750805b601f850160051c820191505b818110156200020f57828155600101620001fa565b5050505b505050565b81516001600160401b038111156200023457620002346200005a565b6200024c8162000245845462000189565b84620001c5565b602080601f8311600181146200028457600084156200026b5750858301515b600019600386901b1c1916600185901b1785556200020f565b600085815260208120601f198616915b82811015620002b55788860151825594840194600190910190840162000294565b5085821015620002d45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61085280620002f46000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220961a8a5111686e8c0cf74ea9302ff2120280274990a59f81450fc42e269ef06364736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220961a8a5111686e8c0cf74ea9302ff2120280274990a59f81450fc42e269ef06364736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/scripts/send-direct-helpers/bnb-tokens.json b/scripts/send-direct-helpers/bnb-tokens.json new file mode 100644 index 000000000..037f0b802 --- /dev/null +++ b/scripts/send-direct-helpers/bnb-tokens.json @@ -0,0 +1,8 @@ +{ + "USDT": ["0x55d398326f99059ff775485246999027b3197955"], + "USDC": ["0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"], + "DAI": ["0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"], + "ETHb": ["0x2170ed0880ac9a755fd29b2688956bd959f933f8"], + "BUSD": ["0xe9e7cea3dedca5984780bafc599bd69add087d56"], + "ETHW": ["0x302cd8973be5ca2334b4ff7e7b01ba41455559b3"] +} diff --git a/scripts/send-direct-helpers/bob-tokens.json b/scripts/send-direct-helpers/bob-tokens.json new file mode 100644 index 000000000..a47c77ddd --- /dev/null +++ b/scripts/send-direct-helpers/bob-tokens.json @@ -0,0 +1,90 @@ +{ + "WBTC": [ + "0x03c7054bcb39f7b2e5b2c7acb37583e32d70cfa3", + "1", + "wrapped-bitcoin", + 8, + "https://coinmarketcap.com/dexscan/ethereum/0x4585fe77225b41b697c938b018e2ac67ac5a20c0/", + ".sc-f70bb44c-0.ckOAPt.base-text", + "out_btc.csv" + ], + "tBTC": [ + "0xBBa2eF945D523C4e2608C9E1214C2Cc64D4fc2e2", + "1", + "tbtc", + 18, + "https://coinmarketcap.com/dexscan/ethereum/0xdbac78be00503d10ae0074e5e5873a61fc56647c/", + ".sc-f70bb44c-0.ckOAPt.base-text", + "out_btc.csv" + ], + "rETH": [ + "0xb5686c4f60904ec2bda6277d6fe1f7caa8d1b41a", + "1", + "rocket-pool-eth", + 18, + "https://coinmarketcap.com/dexscan/ethereum/0x553e9c493678d8606d6a5ba284643db2110df823/", + ".sc-f70bb44c-0.ckOAPt.base-text", + "out_eth.csv" + ], + "wstETH": [ + "0x85008aE6198BC91aC0735CB5497CF125ddAAc528", + "1", + "wrapped-steth", + 18, + "https://coinmarketcap.com/dexscan/ethereum/0x109830a1aaad605bbf02a9dfa7b0b92ec2fb7daa/", + ".sc-f70bb44c-0.ckOAPt.base-text", + "out_eth.csv" + ], + "USDT": [ + "0x05d032ac25d322df992303dca074ee7392c117b9", + "1", + "tether", + 6, + "https://coinmarketcap.com/currencies/tether/", + ".sc-f70bb44c-0.jxpCgO.base-text", + "" + ], + "USDC": [ + "0xe75D0fB2C24A55cA1e3F96781a2bCC7bdba058F0", + "1", + "usd-coin", + 6, + "https://coinmarketcap.com/currencies/usd-coin/", + ".sc-f70bb44c-0.jxpCgO.base-text", + "" + ], + "DAI": [ + "0x6c851f501a3f24e29a8e39a29591cddf09369080", + "1", + "dai", + 18, + "https://coinmarketcap.com/currencies/multi-collateral-dai/", + ".sc-f70bb44c-0.jxpCgO.base-text", + "" + ], + "DLLR": ["0xf3107eEC1e6F067552C035FD87199e1A5169CB20", "1", "eDLLR", 18, "", "", ""], + "SOV": [ + "0xba20a5e63eeEFfFA6fD365E7e540628F8fC61474", + "1", + "sovryn", + 18, + "https://coinmarketcap.com/currencies/sovryn/", + ".sc-f70bb44c-0.jxpCgO.base-text", + "out_sov.csv" + ], + "POWA": ["0xd0C2f08a873186db5cFB7b767dB62BEF9e495BFF", "1", "POWA", 18, "", "", ""], + "SAT": ["0x78fea795cbfcc5ffd6fb5b845a4f53d25c283bdb", "1", "SAT", 18, "", "", ""], + "DOG": ["0xcE528Db0d9126FE940dcB9876E8C295df670D7c4", "1", "DOG", 18, "", "", ""], + "PUPS": ["0x5E36c0C344A29DE1DE2517845Fe2289B18Feea25", "1", "PUPS", 18, "", "", ""], + "SolvBTC": ["0x541FD749419CA806a8bc7da8ac23D346f2dF8B77", "1", "SolvBTC", 18, "", "", ""], + "UniBTC": ["0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894", "2.8571", "UniBTC", 8, "", "", ""], + "SolvBTC_BBN": [ + "0xCC0966D8418d412c599A6421b760a847eB169A8c", + "2.8571", + "SolvBTC_BBN", + 18, + "", + "", + "" + ] +} diff --git a/scripts/send-direct-helpers/eth-tokens.json b/scripts/send-direct-helpers/eth-tokens.json new file mode 100644 index 000000000..dcae90402 --- /dev/null +++ b/scripts/send-direct-helpers/eth-tokens.json @@ -0,0 +1,5 @@ +{ + "USDT": ["0xdac17f958d2ee523a2206206994597c13d831ec7"], + "USDC": ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"], + "DAI": ["0x6b175474e89094c44da98b954eedeac495271d0f"] +} diff --git a/scripts/send-direct-helpers/file-populator.js b/scripts/send-direct-helpers/file-populator.js new file mode 100644 index 000000000..e71ea873c --- /dev/null +++ b/scripts/send-direct-helpers/file-populator.js @@ -0,0 +1,72 @@ +const fs = require("fs"); +const path = require("path"); + +// Main script +(async () => { + try { + // Get the "inputFile" parameter + const inputFile = process.argv[2]; + if (!inputFile) { + throw new Error( + "Missing inputFile parameter. Usage: node file-populator.js " + ); + } + + // Validate inputFile structure and extract NETWORK + const inputFileMatch = inputFile.match(/\.\/.*\/(\w+)-tokens\.json$/); + if (!inputFileMatch) { + throw new Error( + "inputFile name does not match the expected pattern: './some-prefix-path/xxx-tokens.json'" + ); + } + const NETWORK = inputFileMatch[1]; + const outputDir = `./external/deployments/${NETWORK}Mainnet`; + + // Ensure the output directory exists + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + console.log(`Created directory: ${outputDir}`); + } + + // Load inputFile content + const inputData = require(path.resolve(inputFile)); + + // Load ERC20.json content + const ERC20 = require("./ERC20.json"); + const abiArray = ERC20.abi; + if (!Array.isArray(abiArray)) { + throw new Error("Invalid ERC20.json file: Missing or invalid 'abi' key."); + } + + // Process each key in inputFile + for (const [key, addresses] of Object.entries(inputData)) { + if (!Array.isArray(addresses) || addresses.length === 0) { + console.warn(`Skipping ${key} due to invalid addresses array.`); + continue; + } + + const outputFilePath = path.join(outputDir, `${key}.json`); + + // Skip if the file already exists + if (fs.existsSync(outputFilePath)) { + console.log(`File already exists, skipping: ${outputFilePath}`); + continue; + } + + // Prepare the object to write + const outputData = { + address: addresses[0].toLowerCase(), // Use the 0th element of the array + abi: abiArray, // Use the ABI from ERC20.json + }; + + // Write the JSON file + fs.writeFileSync(outputFilePath, JSON.stringify(outputData, null, 2)); + console.log(`File created: ${outputFilePath}`); + } + + console.log("Processing completed successfully."); + } catch (error) { + console.error(`Error: ${error.message}`); + process.exit(1); + } +})(); diff --git a/scripts/send-direct-helpers/populator.sh b/scripts/send-direct-helpers/populator.sh new file mode 100755 index 000000000..cf42c5362 --- /dev/null +++ b/scripts/send-direct-helpers/populator.sh @@ -0,0 +1,4 @@ +node ./scripts/send-direct-helpers/file-populator "./scripts/send-direct-helpers/bnb-tokens.json" +node ./scripts/send-direct-helpers/file-populator "./scripts/send-direct-helpers/bob-tokens.json" +node ./scripts/send-direct-helpers/file-populator "./scripts/send-direct-helpers/eth-tokens.json" +node ./scripts/send-direct-helpers/file-populator "./scripts/send-direct-helpers/rsk-tokens.json" \ No newline at end of file diff --git a/scripts/send-direct-helpers/rsk-tokens.json b/scripts/send-direct-helpers/rsk-tokens.json new file mode 100644 index 000000000..7a6fb5ab6 --- /dev/null +++ b/scripts/send-direct-helpers/rsk-tokens.json @@ -0,0 +1,27 @@ +{ + "ZUSDToken": ["0xdB107FA69E33f05180a4C2cE9c2E7CB481645C2d"], + "XUSD": ["0xb5999795BE0EbB5bAb23144AA5FD6A02D080299F"], + "WRBTC": ["0x542fDA317318eBF1d3DEAf76E0b632741A7e677d"], + "USDT": ["0xef213441a85df4d7acbdae0cf78004e1e486bb96"], + "ETHs": ["0x1D931Bf8656d795E50eF6D639562C5bD8Ac2B78f"], + "ETHes": ["0xfe878227c8f334038dab20a99fc3b373ffe0a755"], + "ETHbs": ["0x30d1b36924c2c0cd1c03ec257d7fff31bd8c3007"], + "DoC": ["0xe700691da7b9851f2f35f8b8182c69c53ccad9db"], + "DLLR": ["0xc1411567d2670e24d9C4DaAa7CdA95686e1250AA"], + "BPro": ["0x440cd83c160de5c96ddb20246815ea44c7abbca8"], + "BNBbs": ["0xd2a826b78200c8434b957913ce4067e6e3169385"], + "FISH": ["0x055A902303746382FBB7D18f6aE0df56eFDc5213"], + "MOC": ["0x9ac7fe28967b30e3a4e6e03286d715b42b453d10"], + "BNBs": ["0x6D9659bdF5b1A1dA217f7BbAf7dBAF8190E2e71B"], + "RIF": ["0x2aCc95758f8b5F583470bA265Eb685a8f45fC9D5"], + "iDOC": ["0xd8D25f03EBbA94E15Df2eD4d6D38276B595593c1"], + "iRBTC": ["0xa9DcDC63eaBb8a2b6f39D7fF9429d88340044a7A"], + "iUSDT": ["0x849C47f9C259E9D62F289BF1b2729039698D8387"], + "iBPro": ["0x6E2fb26a60dA535732F8149b25018C9c0823a715"], + "iXUSD": ["0x8F77ecf69711a4b346f23109c40416BE3dC7f129"], + "iDLLR": ["0x077FCB01cAb070a30bC14b44559C96F529eE017F"], + "SOV": ["0xEFc78fc7d48b64958315949279Ba181c2114ABBd"], + "POWA": ["0xfe8929d36AC789c562008aBD59f5Dd7E1eb1F5b6"], + "MYNT": ["0x2E6b1d146064613E8F521EB3C6E65070aF964EBB"], + "RDOC": ["0x2d919f19D4892381d58EdEbEcA66D5642ceF1A1F"] +} From 986fb6c909ae9bdb619ccfae396ed37636e4deac Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Dec 2024 19:48:52 +0000 Subject: [PATCH 3/7] SOV-4378: first set of tests on utils:send-direct passed on RSK [skip ci] --- deployment/helpers/helpers.js | 13 ++ hardhat/tasks/utils.js | 169 ++++++++++++++---------- scripts/externalData/example_native.csv | 6 +- 3 files changed, 114 insertions(+), 74 deletions(-) diff --git a/deployment/helpers/helpers.js b/deployment/helpers/helpers.js index da2ab6dfa..66a9a6b00 100644 --- a/deployment/helpers/helpers.js +++ b/deployment/helpers/helpers.js @@ -811,6 +811,18 @@ const upgradeWithTransparentUpgradableProxy = async ( } }; +const getImpersonatedSignerFromJsonRpcProvider = async (addressToImpersonate) => { + //await impersonateAccount(addressToImpersonate); + //return await ethers.getSigner(addressToImpersonate); + const provider = new ethers.providers.JsonRpcProvider("http://localhost:8545"); + await provider.send("hardhat_impersonateAccount", [addressToImpersonate]); + console.log( + "provider.getSigner(addressToImpersonate):", + provider.getSigner(addressToImpersonate).address + ); + return provider.getSigner(addressToImpersonate); +}; + module.exports = { getStakingModulesNames, getLoanTokenModulesNames, @@ -839,4 +851,5 @@ module.exports = { logTimer, upgradeWithTransparentUpgradableProxy, getSignerFromAccount, + getImpersonatedSignerFromJsonRpcProvider, }; diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index 453ae12cb..cdb977be4 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -14,15 +14,22 @@ const { getSignerFromAccount } = require("../../deployment/helpers/helpers"); multisigRemoveOwner, } = require("../../deployment/helpers/helpers");*/ -// function to parse distribution .csv files on NATIVE coin -async function parseFileForSendNATIVE(fileName) { +const assetNamesByNetwork = { + 1: "ETH", + 30: "RBTC", + 56: "BNB", + 60808: "ETH", +}; + +// functions to parse .csv files on asset distribution +async function parseFileForSendDirect(fileName, decimals) { const { BigNumber } = require("ethers"); console.log(fileName); let totalAmount = BigNumber.from("0"); let receivers = []; let amounts = []; let errorMsg = ""; - const DECIMALS = 18; // We know the number of decimals is always 18 + const DECIMALS = decimals; return new Promise((resolve, reject) => { fs.createReadStream(fileName) @@ -44,7 +51,7 @@ async function parseFileForSendNATIVE(fileName) { integerPart = "0"; } - // Ensure the decimal part has exactly 18 digits + // Ensure the decimal part has exactly DECIMALS digits if (decimalPart.length < DECIMALS) { decimalPart = decimalPart.padEnd(DECIMALS, "0"); } else if (decimalPart.length > DECIMALS) { @@ -64,7 +71,7 @@ async function parseFileForSendNATIVE(fileName) { totalAmount = totalAmount.add(amountBN); - receivers.push(tokenOwner); + receivers.push(tokenOwner.toLowerCase()); amounts.push(normalizedAmountStr); console.log("======================================="); @@ -91,60 +98,6 @@ async function parseFileForSendNATIVE(fileName) { }); } -// functions to parse distribution .csv files on ERC20 token -async function parseFileForSendDirect(fileName, multiplier) { - console.log(fileName); - let totalAmount = 0; - let receivers = []; - let amounts = []; - let errorMsg = ""; - - return new Promise((resolve, reject) => { - fs.createReadStream(fileName) - // The default behavior of csv-parser with a header line present - // is that it will use the first line as headers automatically. - .pipe(csv()) - .on("data", (row) => { - // Now using the header names directly: - const tokenOwner = row.tokenOwner.trim(); - const amountStr = row.amount.trim(); - const decimals = amountStr.split("."); - - if (decimals.length !== 2 || decimals[1].length !== 2) { - errorMsg += `\n${tokenOwner} amount: ${amountStr}`; - } - - let amount = amountStr.replace(",", "").replace(".", ""); - amount = parseInt(amount, 10) * multiplier; - totalAmount += amount; - - receivers.push(tokenOwner); - amounts.push(amount); - - console.log("======================================="); - console.log(`'${tokenOwner}',`); - console.log(amount); - }) - .on("end", () => { - console.log(receivers); - console.log(amounts); - - if (errorMsg !== "") { - reject(new Error(`Formatting error: ${errorMsg}`)); - } else { - resolve({ - totalAmount, - receivers, - amounts, - }); - } - }) - .on("error", (err) => { - reject(err); - }); - }); -} - task( "utils:compare-bytecode", "Compare the deployed onchain contract bytecode with the artifact to see if they match" @@ -319,7 +272,9 @@ task("utils:replace-tx", "Replace tx in mempool") } ); // a task to use the GenericTokenSender.transferTokensUsingList function to distribute tokens -// way of use: $ hh utils:send-direct --currency USDC --path "./scripts/externalData/dist.csv" --dryrun --network bobMainnet +// way of use: $ hh utils:send-direct --currency USDC --path "./scripts/externalData/dist.csv" --network bobMainnet +// example of dryRun: while running in another terminal: $ npm run fork:rsk-mainnet-chained +// we do: $ export NETWORK_ID=30 && hh utils:send-direct --currency BPro --path ./scripts/externalData/example_native.csv --dry-run --network rskForkedMainnet --account 0x924f5ad34698fd20c90fe5d5a8a0abd3b42dc711 task("utils:send-direct", "Direct token sender script") .addOptionalParam("currency", "The currency type (e.g., WBTC, XUSD, POWA, SAT...)") .addParam("path", "The file path for addresses") @@ -329,7 +284,8 @@ task("utils:send-direct", "Direct token sender script") "native", "When present, the flag instructs the script to use the native currency and ignore the currency parameter" ) - .setAction(async ({ currency, path, account, dryrun, native }, hre) => { + .setAction(async ({ currency, path, account, dryRun, native }, hre) => { + const { BigNumber } = require("ethers"); // if native flag is not present, the currency parameter is required if (!native && !currency) { logger.error( @@ -350,28 +306,95 @@ task("utils:send-direct", "Direct token sender script") } let signer = await getSignerFromAccount(hre, account); - let signerAddress = signer.address; + let signerAddress = signer._address; + console.log("Signer address: ", signerAddress); // this action is only valid in RSK or BOB networks. // We will update on future deployments on Eth and Bnb networks. const netId = await ethers.provider.getNetwork().then((n) => n.chainId); + console.log("Network ID: ", netId); if (netId === 1 || netId === 56) { logger.error("This action is only valid in RSK or BOB networks"); return; } + // GenericTokenSender contract address in BoB: 0x08429a6E565d7D3C15C40da30f1401b8985d71e3 + // GenericTokenSender contract address in RSK: 0x10DE444DE46E106eEF67f3793EE08cFf5297B0AA const GenericTokenSender = await ethers.getContract("GenericTokenSender", signer); - const token = native ? constants.AddressZero : await ethers.getContract(currency); + const token = native ? constants.AddressZero : await ethers.getContract(currency, signer); const decimals = native ? 18 : await token.decimals(); + console.log(`Decimals of ${currency} is: `, decimals); const balanceBefore = await signer.getBalance(); let totalAmount = 0; // Data parsing const data = native - ? await parseFileForSendNATIVE(path) - : await parseFileForSendDirect(path, 10 ** decimals); + ? await parseFileForSendDirect(path, 18) + : await parseFileForSendDirect(path, decimals); totalAmount += data.totalAmount; + console.log("Data successfully parsed"); + + if (native) { + currency = assetNamesByNetwork[netId.toString()]; + } + + if (!native) { + // check if signer hold enough assets and if so, send it to GenericTokenSender + const balance = await token.balanceOf(signerAddress); + const contractBalance = await token.balanceOf(GenericTokenSender.address); + console.log("Sender's balance of token: ", balance.toString()); + console.log("GenericTokenSender's balance of token: ", contractBalance.toString()); + if (balance.add(contractBalance).lt(totalAmount)) { + logger.error("Insufficient funds to distribute"); + return; + } + const amountToTransfer = BigNumber.from(totalAmount).sub(contractBalance); + const transfer_tx = await token.transfer(GenericTokenSender.address, amountToTransfer); + const transfer_receipt = await transfer_tx.wait(); + console.log("Token transferred"); + fs.writeFileSync( + `./scripts/externalData/${currency}_distribution_initial_transfer.json`, + JSON.stringify(transfer_receipt, null, 2), + { flags: "w" } + ); + + // const approved = await token.allowance(signerAddress, GenericTokenSender.address); + // console.log("Amount of token approved: ", approved.toString()); + // let tx_approval_receipt; + // if (approved.lt(totalAmount)) { + // const tx_approval = await token.approve(GenericTokenSender.address, totalAmount); + // tx_approval_receipt = await tx_approval.wait(); + // } + // console.log("Token approved"); + // fs.writeFileSync( + // `./scripts/externalData/${currency}_distribution_approval.json`, + // JSON.stringify(tx_approval_receipt, null, 2), + // { flags: "w" } + // ); + } else { + // check if signer hold enough assets and if so, send it to GenericTokenSender + const balance = await signer.getBalance(); + const contractBalance = await ethers.provider.getBalance(GenericTokenSender.address); + console.log("sender's balance of token: ", balance.toString()); + console.log("GenericTokenSender's balance of token: ", contractBalance.toString()); + if (balance.add(contractBalance).lt(totalAmount)) { + logger.error("Insufficient funds to distribute"); + return; + } + const amountToTransfer = BigNumber.from(totalAmount).sub(contractBalance); + const transfer_tx = await signer.sendTransaction({ + to: GenericTokenSender.address, + value: amountToTransfer, + }); + const transfer_receipt = await transfer_tx.wait(); + console.log("Native Asset transferred"); + fs.writeFileSync( + `./scripts/externalData/${currency}_distribution_initial_transfer.json`, + JSON.stringify(transfer_receipt, null, 2), + { flags: "w" } + ); + } const usersBalancesBefore = []; @@ -411,21 +434,25 @@ task("utils:send-direct", "Direct token sender script") console.log("======================================="); console.log(`${currency} amount:`); - console.log(totalAmount / 10 ** decimals); + // console.log(totalAmount / 10 ** decimals); + console.log(ethers.utils.formatUnits(totalAmount, decimals).toString() * 1); - const balanceAfter = await conf.acct.getBalance(); + const balanceAfter = await signer.getBalance(); console.log("Execution cost:"); - console.log((balanceBefore - balanceAfter) / 10 ** 18); + // console.log((balanceBefore.sub(balanceAfter)) / 10 ** 18); + console.log( + ethers.utils.formatUnits(balanceBefore.sub(balanceAfter), "ether").toString() * 1 + ); for (let i = 0; i < data.receivers.length; i++) { const diff = usersBalancesAfter[i] - usersBalancesBefore[i]; - const expectedDiff = data.amounts[i]; - const matchDiff = diff === expectedDiff; + const expectedDiff = data.amounts[i].toString(); + const matchDiff = diff == expectedDiff.toString(); console.log("======================================="); console.log(`amount received by '${data.receivers[i]}',`); console.log(diff / 10 ** decimals); console.log("while the expected amount was:"); - console.log(data.amounts[i] / 10 ** decimals); + console.log(data.amounts[i].toString() / 10 ** decimals); if (matchDiff) { console.log(`The expected amount matches for ${data.receivers[i]}`); } else { diff --git a/scripts/externalData/example_native.csv b/scripts/externalData/example_native.csv index 87234874a..fcccc89a9 100644 --- a/scripts/externalData/example_native.csv +++ b/scripts/externalData/example_native.csv @@ -1,6 +1,6 @@ tokenOwner,amount 0x1234567890abcdef1234567890abcdef12345678,0.00123 -0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,0.45678 +0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,0.045678 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef,0.00089 -0x1111111111111111111111111111111111111111,0.98765 -0x2222222222222222222222222222222222222222,1.23456 \ No newline at end of file +0x1111111111111111111111111111111111111111,0.098765 +0x2222222222222222222222222222222222222222,0.123456 \ No newline at end of file From b712c96d0d795e11f444d61083d1b562e1d5583a Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Dec 2024 20:07:11 +0000 Subject: [PATCH 4/7] SOV-4378: set of tests on utils:send-direct passed on BOB [skip ci] --- hardhat/tasks/utils.js | 7 +++---- scripts/externalData/example_native.csv | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index cdb977be4..d0994becc 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -323,6 +323,9 @@ task("utils:send-direct", "Direct token sender script") const GenericTokenSender = await ethers.getContract("GenericTokenSender", signer); const token = native ? constants.AddressZero : await ethers.getContract(currency, signer); const decimals = native ? 18 : await token.decimals(); + if (native) { + currency = assetNamesByNetwork[netId.toString()]; + } console.log(`Decimals of ${currency} is: `, decimals); const balanceBefore = await signer.getBalance(); @@ -335,10 +338,6 @@ task("utils:send-direct", "Direct token sender script") totalAmount += data.totalAmount; console.log("Data successfully parsed"); - if (native) { - currency = assetNamesByNetwork[netId.toString()]; - } - if (!native) { // check if signer hold enough assets and if so, send it to GenericTokenSender const balance = await token.balanceOf(signerAddress); diff --git a/scripts/externalData/example_native.csv b/scripts/externalData/example_native.csv index fcccc89a9..e234f0248 100644 --- a/scripts/externalData/example_native.csv +++ b/scripts/externalData/example_native.csv @@ -1,6 +1,6 @@ tokenOwner,amount 0x1234567890abcdef1234567890abcdef12345678,0.00123 -0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,0.045678 +0xabcdefabcdefabcdefabcdefabcdefabcdefabcd,0.0045678 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef,0.00089 -0x1111111111111111111111111111111111111111,0.098765 -0x2222222222222222222222222222222222222222,0.123456 \ No newline at end of file +0x1111111111111111111111111111111111111111,0.0098765 +0x2222222222222222222222222222222222222222,0.00123456 \ No newline at end of file From 2f337a7f5d0bc8a9ad0e495d959f0971e9d0cf8b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 10 Dec 2024 23:16:56 +0000 Subject: [PATCH 5/7] SOV-4378: canceltx and droptx created - missing a test [skip ci] --- hardhat.config.js | 11 +- hardhat/tasks/AC-TO-BE-DELETED.md | 178 +++++++++++++++++++++++++++++- hardhat/tasks/utils.js | 149 ++++++++++++++++++++++++- 3 files changed, 327 insertions(+), 11 deletions(-) diff --git a/hardhat.config.js b/hardhat.config.js index e1a0628d7..a2907319c 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -290,7 +290,7 @@ module.exports = { }, rskSovrynMainnet: { chainId: 30, - url: "https://mainnet-dev.sovryn.app/rpc", + url: "https://mainnet-dev.sovryn.app/rpc", // "txpool_content" AVAILABLE!!! accounts: mainnetAccounts, gasPrice: 66000010, blockGasLimit: 6800000, @@ -300,7 +300,9 @@ module.exports = { }, ethMainnet: { chainId: 1, - url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`, + // url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`, // "txpool_content" NOT AVAILABLE + // url: `https://eth-mainnet.nodereal.io/v1/${process.env.NODE_REAL_API_KEY}`, // "txpool_content" NOT AVAILABLE + url: `https://go.getblock.io/${process.env.GETBLOCK_API_KEY}`, // "txpool_content" AVAILABLE!!! accounts: mainnetAccounts, }, ethForkedMainnet: { @@ -318,7 +320,8 @@ module.exports = { tags: ["testnet"], }, bobMainnet: { - url: "https://rpc.gobob.xyz/", + url: "https://rpc.gobob.xyz/", // "txpool_content" NOT AVAILABLE + // url: `https://bob.gateway.tenderly.co/${process.env.TENDERLY_BOB_RPC_KEY}`, // "txpool_content" NOT AVAILABLE chainId: 60808, accounts: mainnetAccounts, live: true, @@ -342,7 +345,7 @@ module.exports = { tags: ["mainnet", "forked"], }, bnbMainnet: { - url: "https://bsc.sovryn.app/mainnet", + url: "https://bsc.sovryn.app/mainnet", // "txpool_content" AVAILABLE!!! chainId: 56, accounts: mainnetAccounts, // live: true, diff --git a/hardhat/tasks/AC-TO-BE-DELETED.md b/hardhat/tasks/AC-TO-BE-DELETED.md index 814d81342..882bee7f9 100644 --- a/hardhat/tasks/AC-TO-BE-DELETED.md +++ b/hardhat/tasks/AC-TO-BE-DELETED.md @@ -20,20 +20,186 @@ vii. Create tests for the script - this is critical because it is irreversible. -4. Add a task `utils:cancel-tx` which is a shortcut of the `utils:replace-tx` case to cancel tx. +4. Add tasks `canceltx` and `droptx` (both should do the same). The tasks will menat to be a shortcut for the `utils:replace-tx` for the replacement case of a dummy tx to cancel the original one. **IMPORTANT**: The purpose of this task is not to unstuck a delayed transaction to be confirmed faster, but to prevent a still pending transaction to be confirmed. Therefore, the syntax for this task must be brief, to type it as fast as possible. RSK and Ethereum are the best use cases for these tasks. - a. One optional param `--hash`, if not provided then the last tx is being cancelled which is the most common case of cancelling. - b. Follow DRY principle - don’t repeat the code - extract it from send-direct to a function. - c. how it should work: + a. They will have one optional param `--hash`; if not provided then the last tx is being cancelled which is the most common case of replacing. + b. A very recommended but also optional will be the param "nonce" to be summarized as `--n`. If provided we will know what it is the nonce of the dummy transaction for replacement. + c. Follow DRY principle - "don’t repeat yourself", in this case: the code - extract it from replace-tx to a function. + d. how it should work: get the last tx sent and set newGasPrice = pendingTx.gasPrice * 1.5; newMaxFee = pendingTx.maxFeePerGas * 1.5 - d. Create tests. + If the last tx is not available through the endpoint, deduct `gasPrice` and `maxFeePerGas` from `provider.getFeeData()`. + + e. Create tests. 5. When reviewed and approved - cherry-pick the tasks into the development branch. ### Notes -This task must fork the branch "bobDevelopment" in our core repo. \ No newline at end of file +This task must fork the branch "bobDevelopment" in our core repo. + +// RSK Case +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network rskSovrynMainnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> const { +... ethers: { provider }, +... ethers, +... } = hre; +undefined +> var x = await provider.getFeeData(); +undefined +> x +{ + lastBaseFeePerGas: null, + maxFeePerGas: null, + maxPriorityFeePerGas: null, + gasPrice: BigNumber { _hex: '0x03e252e0', _isBigNumber: true } +} +> x.gasPrice.toString() +'65164000' +> var newPrice = x.gasPrice.mul(3).div(2); +undefined +> newPrice.toString() +'97746000' +> +// BNB Case +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network bnbMainnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> const { +... ethers: { provider }, +... ethers, +... } = hre; +undefined +> var x = await provider.getFeeData(); +undefined +> x +{ + lastBaseFeePerGas: BigNumber { _hex: '0x00', _isBigNumber: true }, + maxFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, + maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, + gasPrice: BigNumber { _hex: '0x3b9aca00', _isBigNumber: true } +} +> x.gasPrice.toString() +'1000000000' +> x.maxFeePerGas.toString() +'1500000000' +> var newPrice = x.gasPrice.mul(3).div(2); +undefined +> var newMaxFee = x.maxFeePerGas.mul(3).div(2); +undefined +> newPrice.toString() +'1500000000' +> newMaxFee.toString() +'2250000000' +> .exit +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ + +// BOB Case + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network bobMainnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> const { +... ethers: { provider }, +... ethers, +... } = hre; +undefined +> var x = await provider.getFeeData(); +undefined +> x +{ + lastBaseFeePerGas: BigNumber { _hex: '0xfc', _isBigNumber: true }, + maxFeePerGas: BigNumber { _hex: '0x596830f8', _isBigNumber: true }, + maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, + gasPrice: BigNumber { _hex: '0x0f433c', _isBigNumber: true } +} +> x.gasPrice.toString() +'1000252' +> x.maxFeePerGas.toString() +'1500000504' +> var newPrice = x.gasPrice.mul(3).div(2); +undefined +> var newMaxFee = x.maxFeePerGas.mul(3).div(2); +undefined +> newPrice.toString() +'1500378' +> newMaxFee.toString() +'2250000756' +> .exit +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ + + +// ETH case + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network ethMainnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> const { +... ethers: { provider }, +... ethers, +... } = hre; +undefined +> var x = await provider.getFeeData(); +undefined +> x +{ + lastBaseFeePerGas: BigNumber { _hex: '0x049ae19559', _isBigNumber: true }, + maxFeePerGas: BigNumber { _hex: '0x098f2b59b2', _isBigNumber: true }, + maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, + gasPrice: BigNumber { _hex: '0x049b78a539', _isBigNumber: true } +} +> x.gasPrice.toString() +'19788244281' +> x.maxFeePerGas.toString() +'41056688562' +> var newPrice = x.gasPrice.mul(3).div(2); +undefined +> var newMaxFee = x.maxFeePerGas.mul(3).div(2); +undefined +> newPrice.toString() +'29682366421' +> newMaxFee.toString() +'61585032843' +> .exit +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ \ No newline at end of file diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index d0994becc..f1ba6c5da 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -233,8 +233,8 @@ task("utils:replace-tx", "Replace tx in mempool") newTo, newGasPrice, newGasLimit, - newMaxFee, newMaxPriorityFee, + newMaxFee, newData, newValue, signer, @@ -271,6 +271,153 @@ task("utils:replace-tx", "Replace tx in mempool") } } ); +// canceltx actually is a replacer of a transaction that we don't want to be confirmed +// when something goes wrong and we want to prevent the confirmation and we need to proceed fast. +// the prupose of this task is actually to replace with a dummy tx with higher gas price offering +// it is a special case of the utils:replace-tx task +task("canceltx", "Cancel tx in mempool") + .addParam("signer", "Signer name: 'signer' or 'deployer", "deployer") + .addOptionalParam("hash", "Transaction hash to cancel") + // WARN: have at hand this number by making: const N = await provider.getTransactionCount(signer); + // "N" will match the next nonce to be used + .addOptionalParam("n", "Nonce of the transaction to cancel") + .setAction(async ({ signer, hash, n }, hre) => { + const { + ethers: { provider }, + ethers, + } = hre; + const { AddressZero } = hre.ethers.constants; + + const signerAcc = (await hre.getNamedAccounts())[signer].toLowercase(); + const deployerSigner = await ethers.getSigner(signerAcc); + + let nonce; + if (!n) { + logger.error("THERE IS A GREAT CHANCE YOUR TRANSACTION IS ALREADY MINED"); + logger.error("A DUMMY TX WITH THE EXPECTED NEXT NONCE WILL BE SENT"); + nonce = await provider.getTransactionCount(signerAcc); + } else { + nonce = n; + } + + let newGasPrice; + let newMaxFee; + if (hash) { + // Fetch the transaction details + const tx = await provider.getTransaction(hash); + if (tx) { + if (tx.blockNumber) { + logger.error(`Transaction with hash ${hash} has already been mined.`); + return; + } + // Calculate new gas price (or max fee per gas for EIP-1559) + const newGasPrice = tx.gasPrice ? tx.gasPrice.mul(3).div(2) : null; + const newMaxFee = tx.maxFeePerGas ? tx.maxFeePerGas.mul(3).div(2) : null; + } + } + + if (!newGasPrice) { + newGasPrice = (await provider.getFeeData()).gasPrice.mul(3).div(2); + } + + if (!newMaxFee) { + currentMaxFee = (await provider.getFeeData()).maxFeePerGas; + newMaxFee = currentMaxFee ? currentMaxFee.mul(3).div(2) : null; + } + + const replacementTx = { + nonce: nonce, + from: signerAcc, + to: AddressZero, + data: "0x", + value: 0, + gasLimit: 100000, + gasPrice: newGasPrice, + }; + if (newMaxFee) { + replacementTx.maxFeePerGas = newMaxFee; + } + const dummyTx = await deployerSigner.sendTransaction(replacementTx); + logger.info(`Dummy transaction hash successfully broadcated at: `); + logger.info(dummyTx.hash); + const dummyReceipt = await dummyTx.wait(); + + logger.success(`Target transaction has been successfully cancelled.`); + }); +// droptx actually is a replacer of a transaction that we don't want to be confirmed +// when something goes wrong and we want to prevent the confirmation and we need to proceed fast. +// the prupose of this task is actually to replace with a dummy tx with higher gas price offering +// it is a special case of the utils:replace-tx task +// fastest, safest way of use: $ hh droptx --n +task("droptx", "Cancel tx in mempool") + .addParam("signer", "Signer name: 'signer' or 'deployer", "deployer") + .addOptionalParam("hash", "Transaction hash to cancel") + // WARN: have at hand this number by making: const N = await provider.getTransactionCount(signer); + // "N" will match the next nonce to be used + .addOptionalParam("n", "Nonce of the transaction to cancel") + .setAction(async ({ signer, hash, n }, hre) => { + const { + ethers: { provider }, + ethers, + } = hre; + const { AddressZero } = hre.ethers.constants; + + const signerAcc = (await hre.getNamedAccounts())[signer].toLowercase(); + const deployerSigner = await ethers.getSigner(signerAcc); + + let nonce; + if (!n) { + logger.error("THERE IS A GREAT CHANCE YOUR TRANSACTION IS ALREADY MINED"); + logger.error("A DUMMY TX WITH THE EXPECTED NEXT NONCE WILL BE SENT"); + nonce = await provider.getTransactionCount(signerAcc); + } else { + nonce = n; + } + + let newGasPrice; + let newMaxFee; + if (hash) { + // Fetch the transaction details + const tx = await provider.getTransaction(hash); + if (tx) { + if (tx.blockNumber) { + logger.error(`Transaction with hash ${hash} has already been mined.`); + return; + } + // Calculate new gas price (or max fee per gas for EIP-1559) + const newGasPrice = tx.gasPrice ? tx.gasPrice.mul(3).div(2) : null; + const newMaxFee = tx.maxFeePerGas ? tx.maxFeePerGas.mul(3).div(2) : null; + } + } + + if (!newGasPrice) { + newGasPrice = (await provider.getFeeData()).gasPrice.mul(3).div(2); + } + + if (!newMaxFee) { + currentMaxFee = (await provider.getFeeData()).maxFeePerGas; + newMaxFee = currentMaxFee ? currentMaxFee.mul(3).div(2) : null; + } + + const replacementTx = { + nonce: nonce, + from: signerAcc, + to: AddressZero, + data: "0x", + value: 0, + gasLimit: 100000, + gasPrice: newGasPrice, + }; + if (newMaxFee) { + replacementTx.maxFeePerGas = newMaxFee; + } + const dummyTx = await deployerSigner.sendTransaction(replacementTx); + logger.info(`Dummy transaction hash successfully broadcated at: `); + logger.info(dummyTx.hash); + const dummyReceipt = await dummyTx.wait(); + + logger.success(`Target transaction has been successfully cancelled.`); + }); // a task to use the GenericTokenSender.transferTokensUsingList function to distribute tokens // way of use: $ hh utils:send-direct --currency USDC --path "./scripts/externalData/dist.csv" --network bobMainnet // example of dryRun: while running in another terminal: $ npm run fork:rsk-mainnet-chained From 2754a080726075804234b2d8e93b311653e6a6e0 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 11 Dec 2024 01:48:21 +0000 Subject: [PATCH 6/7] SOV-4378: testing for droptx done on live and passed [skip ci] --- .gitignore | 5 +- hardhat/tasks/utils.js | 16 +-- .../broadcast-stucked.log | 96 ++++++++++++++ .../canceltx-logs-to-delete/calcel-test.log | 24 ++++ .../console-rsk-testnet.log | 125 ++++++++++++++++++ 5 files changed, 257 insertions(+), 9 deletions(-) create mode 100644 tests-onchain/canceltx-logs-to-delete/broadcast-stucked.log create mode 100644 tests-onchain/canceltx-logs-to-delete/calcel-test.log create mode 100644 tests-onchain/canceltx-logs-to-delete/console-rsk-testnet.log diff --git a/.gitignore b/.gitignore index 43cb3b351..e0ef311b3 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,7 @@ typechain/ venv/ !/external/artifacts/ cache_hardhat/ -foundry/ \ No newline at end of file +foundry/ +!/tests-onchain/canceltx-logs-to-delete/broadcast-stucked.log +!/tests-onchain/canceltx-logs-to-delete/calcel-test.log +!/tests-onchain/canceltx-logs-to-delete/console-rsk-testnet.log \ No newline at end of file diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index f1ba6c5da..0c55a36fa 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -288,7 +288,7 @@ task("canceltx", "Cancel tx in mempool") } = hre; const { AddressZero } = hre.ethers.constants; - const signerAcc = (await hre.getNamedAccounts())[signer].toLowercase(); + const signerAcc = (await hre.getNamedAccounts())[signer].toLowerCase(); const deployerSigner = await ethers.getSigner(signerAcc); let nonce; @@ -348,7 +348,7 @@ task("canceltx", "Cancel tx in mempool") // when something goes wrong and we want to prevent the confirmation and we need to proceed fast. // the prupose of this task is actually to replace with a dummy tx with higher gas price offering // it is a special case of the utils:replace-tx task -// fastest, safest way of use: $ hh droptx --n +// fastest, safest way of use: $ hh droptx --n --network task("droptx", "Cancel tx in mempool") .addParam("signer", "Signer name: 'signer' or 'deployer", "deployer") .addOptionalParam("hash", "Transaction hash to cancel") @@ -362,7 +362,7 @@ task("droptx", "Cancel tx in mempool") } = hre; const { AddressZero } = hre.ethers.constants; - const signerAcc = (await hre.getNamedAccounts())[signer].toLowercase(); + const signerAcc = (await hre.getNamedAccounts())[signer].toLowerCase(); const deployerSigner = await ethers.getSigner(signerAcc); let nonce; @@ -665,7 +665,7 @@ task("utils:simulate-tx", "Simulates a transaction on forked network") fs.writeFileSync("./txResponse.json", JSON.stringify(txResponse, null, 2), { flag: "w+" }); fs.writeFileSync("./txReceipt.json", JSON.stringify(txReceipt, null, 2), { flag: "w+" }); }); -// way of use: $ hh send-tx --network --tx-to
--tx-value --tx-data --tx-from
--tx-gas-limit --tx-gas-price --tx-nonce --simulate +// way of use: $ hh utils:send-tx --network --tx-to
--tx-value --tx-data --tx-from
--tx-gas-limit --tx-gas-price --tx-nonce --simulate task("utils:send-tx", "Creates and sends a raw transaction") .addParam("txTo", "address: The address to send the transaction to") .addParam("txValue", "number: The value to send in the transaction") @@ -718,14 +718,14 @@ task("utils:send-tx", "Creates and sends a raw transaction") console.error(`Error executing child task: ${error.message}`); } return; - } else if (signer && !simulate) { + } else if (signer && !taskArgs.simulate) { console.log( `WARINIG: REAL TRANSACTION;\n Address ${taskArgs.txFrom} found in wallet, sending transaction...` ); - const signedTx = await ethers.provider.getSigner().signTransaction(tx); - const txResponse = await ethers.provider.sendTransaction(signedTx); - const txReceipt = await txResponse.wait(); + // const signedTx = await ethers.provider.getSigner().signTransaction(tx); + const txResponse = await signer.sendTransaction(tx); console.log("Transaction hash: ", txResponse.hash); + const txReceipt = await txResponse.wait(); fs.writeFileSync("./txResponse.json", JSON.stringify(txResponse, null, 2), { flag: "w+", }); diff --git a/tests-onchain/canceltx-logs-to-delete/broadcast-stucked.log b/tests-onchain/canceltx-logs-to-delete/broadcast-stucked.log new file mode 100644 index 000000000..12db4110c --- /dev/null +++ b/tests-onchain/canceltx-logs-to-delete/broadcast-stucked.log @@ -0,0 +1,96 @@ +// we aim to send a tx to be stucked due low gas price levels: +// tx data: +// function selector: transfer(address,uint256) = 0xa9059cbb +// Alice's address = 0xa64a9275b64676466bb76fa51e3f1ab276535d19 +// payload: 0xa9059cbb000000000000000000000000a64a9275b64676466bb76fa51e3f1ab276535d190000000000000000000000000000000000000000000000000de0b6b3a7640000 +// hh utils:send-tx --network rskSovrynTestnet --tx-to 0x6a9a07972d07e58f0daf5122d11e069288a375fb --tx-value 0 --tx-data 0xa9059cbb000000000000000000000000a64a9275b64676466bb76fa51e3f1ab276535d190000000000000000000000000000000000000000000000000de0b6b3a7640000 --tx-from 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 --tx-gas-limit 100000 --tx-gas-price 5042793 --tx-nonce 393 + + + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh utils:send-tx --network rskSovrynTestnet --tx-to 0x6a9a07972d07e58f0daf5122d11e069288a375fb --tx-value 0 --tx-data 0xa9059cbb000000000000000000000000a64a9275b64676466bb76fa51e3f1ab276535d190000000000000000000000000000000000000000000000000de0b6b3a7640000 --tx-from 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 --tx-gas-limit 100000 --tx-gas-price 5042793 --tx-nonce 393 +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +WARINIG: REAL TRANSACTION; + Address 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 found in wallet, sending transaction... +Transaction hash: 0x570542fe66b8b09daf823eb412d9c93479ffa4f39199d991036c05aa322380ff +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ + + + +An unexpected error occurred: + +Error: nonce has already been used + +// we need to repeat with lower gas price +// hh utils:send-tx --network rskSovrynTestnet --tx-to 0x6a9a07972d07e58f0daf5122d11e069288a375fb --tx-value 0 --tx-data 0xa9059cbb000000000000000000000000a64a9275b64676466bb76fa51e3f1ab276535d190000000000000000000000000000000000000000000000000de0b6b3a7640000 --tx-from 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 --tx-gas-limit 100000 --tx-gas-price 5000000 --tx-nonce 394 + + + + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh utils:send-tx --network rskSovrynTestnet --tx-to 0x6a9a07972d07e58f0daf5122d11e069288a375fb --tx-value 0 --tx-data 0xa9059cbb000000000000000000000000a64a9275b64676466bb76fa51e3f1ab276535d190000000000000000000000000000000000000000000000000de0b6b3a7640000 --tx-from 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 --tx-gas-limit 100000 --tx-gas-price 5000000 --tx-nonce 394 +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +WARINIG: REAL TRANSACTION; + Address 0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919 found in wallet, sending transaction... +An unexpected error occurred: + +Error: transaction was replaced [ See: https://links.ethers.org/v5-errors-TRANSACTION_REPLACED ] (cancelled=true, reason="replaced", replacement={"hash":"0x197d1d737b0b0c1059693edf4bf1a70c3762024b5715e8e64f6a42ecfcd7d971","type":0,"accessList":null,"blockHash":"0xb70c3d3ecc886b40e8585ab80eda3ef8295ee55b9c29c12f20f6003cb2917859","blockNumber":5852548,"transactionIndex":2,"confirmations":1,"from":"0xcaB74E724B0Bc1e7Eb05449073B87f6cE7FA8919","gasPrice":{"type":"BigNumber","hex":"0x7ce916"},"gasLimit":{"type":"BigNumber","hex":"0x0186a0"},"to":"0x0000000000000000000000000000000000000000","value":{"type":"BigNumber","hex":"0x00"},"nonce":394,"data":"0x","r":"0xbfb79a4212a45c2b5b3f357ae2f6a37e6ddd891990e3f665dc9a7cdb4784be68","s":"0x32228951b4b959b36492ce7ced08de1d9f0ab84f20ec2a0182ec1b9039c567d2","v":97,"creates":null,"chainId":31}, hash="0xe393b82d5954ed0d50ec6d50ca5492e62c3f955f438d3042dd128fd12a2a8108", receipt={"to":"0x0000000000000000000000000000000000000000","from":"0xcaB74E724B0Bc1e7Eb05449073B87f6cE7FA8919","contractAddress":null,"transactionIndex":2,"gasUsed":{"type":"BigNumber","hex":"0x5208"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0xb70c3d3ecc886b40e8585ab80eda3ef8295ee55b9c29c12f20f6003cb2917859","transactionHash":"0x197d1d737b0b0c1059693edf4bf1a70c3762024b5715e8e64f6a42ecfcd7d971","logs":[],"blockNumber":5852548,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x02a6c6"},"status":1,"type":0,"byzantium":true}, code=TRANSACTION_REPLACED, version=providers/5.7.2) + at Logger.makeError (/home/ubuntu/SOVRYN/CORE/node_modules/@ethersproject/logger/src.ts/index.ts:269:28) + at EthersProviderWrapper. (/home/ubuntu/SOVRYN/CORE/node_modules/@ethersproject/providers/src.ts/base-provider.ts:1380:55) + at step (/home/ubuntu/SOVRYN/CORE/node_modules/@ethersproject/providers/lib/base-provider.js:48:23) + at Object.next (/home/ubuntu/SOVRYN/CORE/node_modules/@ethersproject/providers/lib/base-provider.js:29:53) + at fulfilled (/home/ubuntu/SOVRYN/CORE/node_modules/@ethersproject/providers/lib/base-provider.js:20:58) + at processTicksAndRejections (node:internal/process/task_queues:96:5) { + reason: 'replaced', + code: 'TRANSACTION_REPLACED', + cancelled: true, + replacement: { + hash: '0x197d1d737b0b0c1059693edf4bf1a70c3762024b5715e8e64f6a42ecfcd7d971', + type: 0, + accessList: null, + blockHash: '0xb70c3d3ecc886b40e8585ab80eda3ef8295ee55b9c29c12f20f6003cb2917859', + blockNumber: 5852548, + transactionIndex: 2, + confirmations: 1, + from: '0xcaB74E724B0Bc1e7Eb05449073B87f6cE7FA8919', + gasPrice: BigNumber { _hex: '0x7ce916', _isBigNumber: true }, + gasLimit: BigNumber { _hex: '0x0186a0', _isBigNumber: true }, + to: '0x0000000000000000000000000000000000000000', + value: BigNumber { _hex: '0x00', _isBigNumber: true }, + nonce: 394, + data: '0x', + r: '0xbfb79a4212a45c2b5b3f357ae2f6a37e6ddd891990e3f665dc9a7cdb4784be68', + s: '0x32228951b4b959b36492ce7ced08de1d9f0ab84f20ec2a0182ec1b9039c567d2', + v: 97, + creates: null, + chainId: 31, + wait: [Function (anonymous)] + }, + hash: '0xe393b82d5954ed0d50ec6d50ca5492e62c3f955f438d3042dd128fd12a2a8108', + receipt: { + to: '0x0000000000000000000000000000000000000000', + from: '0xcaB74E724B0Bc1e7Eb05449073B87f6cE7FA8919', + contractAddress: null, + transactionIndex: 2, + gasUsed: BigNumber { _hex: '0x5208', _isBigNumber: true }, + logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + blockHash: '0xb70c3d3ecc886b40e8585ab80eda3ef8295ee55b9c29c12f20f6003cb2917859', + transactionHash: '0x197d1d737b0b0c1059693edf4bf1a70c3762024b5715e8e64f6a42ecfcd7d971', + logs: [], + blockNumber: 5852548, + confirmations: 1, + cumulativeGasUsed: BigNumber { _hex: '0x02a6c6', _isBigNumber: true }, + status: 1, + type: 0, + byzantium: true + } +} +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ \ No newline at end of file diff --git a/tests-onchain/canceltx-logs-to-delete/calcel-test.log b/tests-onchain/canceltx-logs-to-delete/calcel-test.log new file mode 100644 index 000000000..d59bdf709 --- /dev/null +++ b/tests-onchain/canceltx-logs-to-delete/calcel-test.log @@ -0,0 +1,24 @@ +hh droptx --n 393 --network rskSovrynTestnet + +An unexpected error occurred: + +Error: nonce has already been used + +// we need to repeat with lower gas price + +// nonce expired + +hh droptx --n 394 --network rskSovrynTestnet + + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh droptx --n 394 --network rskSovrynTestnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +2024-12-11 01:35:45 Dummy transaction hash successfully broadcated at: +2024-12-11 01:35:45 0x197d1d737b0b0c1059693edf4bf1a70c3762024b5715e8e64f6a42ecfcd7d971 +2024-12-11 01:36:21 Target transaction has been successfully cancelled. +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ \ No newline at end of file diff --git a/tests-onchain/canceltx-logs-to-delete/console-rsk-testnet.log b/tests-onchain/canceltx-logs-to-delete/console-rsk-testnet.log new file mode 100644 index 000000000..77839815a --- /dev/null +++ b/tests-onchain/canceltx-logs-to-delete/console-rsk-testnet.log @@ -0,0 +1,125 @@ +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network rskovrynTestnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> var txpoolContent = await hre.ethers.provider.send("txpool_content", []); +undefined +> Object.keys(txpoolContent.pending).length +3 +> Object.keys(txpoolContent.pending) +[ + '1e6721e0a50dd312d3381f75640ff453df385690', + 'c67d9ee30d2119a384e02de568be80fe785074ba', + 'f813c5dfe9602fb4b76ad71305788e9ca1649f31' +] +> Object.values(txpoolContent.pending) +[ + { '430208': [ [Object] ] }, + { '994199': [ [Object] ] }, + { '418834': [ [Object] ] } +] +> var alpha = (await hre.getNamedAccounts())["deployer"]; +undefined +> var token = await ethers.getContract("SOV"); +undefined +> var alphaSOVBalance = await token.balanceOf(alpha); +undefined +> alphaSOVBalance.toString() +'769132035924188321941' +> var alphaRBTCBalance = await ethers.provider.getBalance(alpha); +undefined +> alphaRBTCBalance.toString() +'2004085854910958704' +> alphaRBTCBalance.toString()/10**18 +2.004085854910959 +> alphaSOVBalance.toString()/10**18 +769.1320359241884 +> alpha +'0xcaB74E724B0Bc1e7Eb05449073B87f6cE7FA8919' +> token.address +'0x6a9A07972D07e58F0daf5122d11E069288A375fb' +> var Alice = "0xA64A9275b64676466bb76fa51E3f1ab276535D19".toLowerCase() +undefined +> Alice +'0xa64a9275b64676466bb76fa51e3f1ab276535d19' +> Alpha +Uncaught ReferenceError: Alpha is not defined +> alpha.toLowerCase() +'0xcab74e724b0bc1e7eb05449073b87f6ce7fa8919' +> token.address.toLowerCase() +'0x6a9a07972d07e58f0daf5122d11e069288a375fb' +> var fees = await ethers.provider.getFeeData(); +undefined +> fees +{ + lastBaseFeePerGas: null, + maxFeePerGas: null, + maxPriorityFeePerGas: null, + gasPrice: BigNumber { _hex: '0x530ce9', _isBigNumber: true } +} +> fees.gasPrice.toString() +'5442793' +> var N = await ethers.provider.getTransactionCount(alpha); +undefined +> N +393 +> +/// weird the testnet's gas price, so mainnet was queried: +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network rskSovrynMainnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> var fees = await ethers.provider.getFeeData(); +undefined +> fees +{ + lastBaseFeePerGas: null, + maxFeePerGas: null, + maxPriorityFeePerGas: null, + gasPrice: BigNumber { _hex: '0x03e252e0', _isBigNumber: true } +} +> fees.gasPrice.toString() +'65164000' +> +/// number is right + + + + +// after running the stuck tx send, we should have this console open to query mempool: + + + +ubuntu@ip-10-0-12-30:~/SOVRYN/CORE$ hh console --network rskSovrynTestnet +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +CryptoEnv > Type your password to decrypt the env, or press enter to skip it + +CryptoEnv > 3 keys decrypted +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Welcome to Node.js v16.20.0. +Type ".help" for more information. +> var txpoolContent = await hre.ethers.provider.send("txpool_content", []); +undefined +> Object.keys(txpoolContent.pending).length +3 +> \ No newline at end of file From 1899f9cf201b102fb4491cc4a8a0b2ad59e52569 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 17 Dec 2024 13:03:51 +0000 Subject: [PATCH 7/7] SOV-4378: including fixings from PR review --- hardhat/tasks/misc.js | 30 +++++----- hardhat/tasks/utils.js | 127 +++++++++++++++-------------------------- 2 files changed, 63 insertions(+), 94 deletions(-) diff --git a/hardhat/tasks/misc.js b/hardhat/tasks/misc.js index 6a607fddb..4e34e9519 100644 --- a/hardhat/tasks/misc.js +++ b/hardhat/tasks/misc.js @@ -1,5 +1,13 @@ +require("dotenv").config(); const Logs = require("node-logs"); const logger = new Logs().showInConsole(true); +const { NODE_REAL_API_KEY, TENDERLY_BOB_RPC_KEY } = process.env; + +const forkRpcUrls = { + ethMainnet: `https://eth-mainnet.nodereal.io/v1/${NODE_REAL_API_KEY}`, + bobMainnet: `https://bob.gateway.tenderly.co/${TENDERLY_BOB_RPC_KEY}`, +}; + const { impersonateAccount, mine, @@ -224,24 +232,21 @@ task( getNamedAccounts, ethers, } = hre; - const staking = await ethers.getContractAt( - "IStaking", - "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e" - ); + const staking = await ethers.getContract("Staking"); //const abi = (await deployments.getArtifact("Staking")).abi; - const abi = ["event VestingStakeSet(uint256,uint96)"]; + // const abi = ["event VestingStakeSet(uint256,uint96)"]; //const abi = ["event TokensStaked(address,uint256,uint256,uint256)"]; - const iface = new ethers.utils.Interface(abi); + // const iface = new ethers.utils.Interface(abi); //const filter = staking.filters.VestingStakeSet(null, null); - //cblock = 3780053; // a block with the first vesting created - cblock = 5190053; // a block with the first vesting created + cblock = 3780053; // a block with the first vesting created + // cblock = 5190053; // a block with the first vesting created block = await ethers.provider.getBlockNumber(); let index = 0; while (cblock != block) { cblock += 10000; if (cblock > block) cblock = block; const filter = { - address: "0x5684a06CaB22Db16d901fEe2A5C081b4C91eA40e", + address: staking.address, topics: [ //ethers.utils.id("TokensStaked(address,uint256,uint256,uint256)") ethers.utils.id("VestingStakeSet(uint256,uint96)"), @@ -258,10 +263,8 @@ task( console.log("failure at block", cblock); return; } - //console.log(await getEthersLog(staking, filter)); if (cres[0]) { console.log("index: ", index++, "\n", cres); - //break; } if (cblock % 500000 == 0) { console.log(cblock, "block reached"); @@ -300,9 +303,8 @@ task("misc:run-forked-eth-mainnet", "Runs a forked eth node") task("misc:run-forked-eth-mainnet", "Runs a forked eth node") .addOptionalParam("forkBlock", "Block number to fork from") .setAction(async (taskArgs, hre) => { - const { NODE_REAL_API_KEY } = process.env; const forkParams = { - jsonRpcUrl: `https://eth-mainnet.nodereal.io/v1/${NODE_REAL_API_KEY}`, + jsonRpcUrl: forkRpcUrls.ethMainnet, blockNumber: taskArgs.forkBlock ? parseInt(taskArgs.forkBlock) : undefined, }; @@ -321,7 +323,7 @@ task("misc:run-forked-bob-mainnet", "Runs a forked bob node") .addOptionalParam("forkBlock", "Block number to fork from") .setAction(async (taskArgs, hre) => { const forkParams = { - jsonRpcUrl: `https://bob.gateway.tenderly.co/${process.env.TENDERLY_BOB_RPC_KEY}`, + jsonRpcUrl: forkRpcUrls.bobMainnet, blockNumber: taskArgs.forkBlock ? parseInt(taskArgs.forkBlock) : undefined, }; await hre.network.provider.request({ diff --git a/hardhat/tasks/utils.js b/hardhat/tasks/utils.js index 0c55a36fa..c19f3299c 100644 --- a/hardhat/tasks/utils.js +++ b/hardhat/tasks/utils.js @@ -5,15 +5,6 @@ const logger = new Logs().showInConsole(true); const { task } = require("hardhat/config"); const { getSignerFromAccount } = require("../../deployment/helpers/helpers"); -/*const { - signWithMultisig, - multisigCheckTx, - multisigRevokeConfirmation, - multisigExecuteTx, - multisigAddOwner, - multisigRemoveOwner, -} = require("../../deployment/helpers/helpers");*/ - const assetNamesByNetwork = { 1: "ETH", 30: "RBTC", @@ -24,7 +15,7 @@ const assetNamesByNetwork = { // functions to parse .csv files on asset distribution async function parseFileForSendDirect(fileName, decimals) { const { BigNumber } = require("ethers"); - console.log(fileName); + logger.info(fileName); let totalAmount = BigNumber.from("0"); let receivers = []; let amounts = []; @@ -74,13 +65,13 @@ async function parseFileForSendDirect(fileName, decimals) { receivers.push(tokenOwner.toLowerCase()); amounts.push(normalizedAmountStr); - console.log("======================================="); - console.log(`'${tokenOwner}',`); - console.log(normalizedAmountStr); + logger.info("======================================="); + logger.info(`'${tokenOwner}',`); + logger.info(normalizedAmountStr); }) .on("end", () => { - console.log(receivers); - console.log(amounts); + logger.info(receivers); + logger.info(amounts); if (errorMsg !== "") { reject(new Error(`Formatting error: ${errorMsg}`)); @@ -156,9 +147,6 @@ task( ? address : deployment.implementation ?? deployment.address; const onchainBytecode = await provider.getCode(contractAddress); - // console.log("onchain bytecode: ", await provider.getCode(contractAddress)); - // console.log(); - // console.log("expected deployedBytecode: ", deploymentObject.deployedBytecode); const sameLength = onchainBytecode.length === expectedBytecode.length; if (!sameLength) { logger.error( @@ -454,12 +442,12 @@ task("utils:send-direct", "Direct token sender script") let signer = await getSignerFromAccount(hre, account); let signerAddress = signer._address; - console.log("Signer address: ", signerAddress); + logger.info("Signer address: ", signerAddress); // this action is only valid in RSK or BOB networks. // We will update on future deployments on Eth and Bnb networks. const netId = await ethers.provider.getNetwork().then((n) => n.chainId); - console.log("Network ID: ", netId); + logger.info("Network ID: ", netId); if (netId === 1 || netId === 56) { logger.error("This action is only valid in RSK or BOB networks"); return; @@ -473,7 +461,7 @@ task("utils:send-direct", "Direct token sender script") if (native) { currency = assetNamesByNetwork[netId.toString()]; } - console.log(`Decimals of ${currency} is: `, decimals); + logger.info(`Decimals of ${currency} is: `, decimals); const balanceBefore = await signer.getBalance(); let totalAmount = 0; @@ -483,14 +471,14 @@ task("utils:send-direct", "Direct token sender script") ? await parseFileForSendDirect(path, 18) : await parseFileForSendDirect(path, decimals); totalAmount += data.totalAmount; - console.log("Data successfully parsed"); + logger.success("Data successfully parsed"); if (!native) { // check if signer hold enough assets and if so, send it to GenericTokenSender const balance = await token.balanceOf(signerAddress); const contractBalance = await token.balanceOf(GenericTokenSender.address); - console.log("Sender's balance of token: ", balance.toString()); - console.log("GenericTokenSender's balance of token: ", contractBalance.toString()); + logger.info("Sender's balance of token: ", balance.toString()); + logger.info("GenericTokenSender's balance of token: ", contractBalance.toString()); if (balance.add(contractBalance).lt(totalAmount)) { logger.error("Insufficient funds to distribute"); return; @@ -498,32 +486,18 @@ task("utils:send-direct", "Direct token sender script") const amountToTransfer = BigNumber.from(totalAmount).sub(contractBalance); const transfer_tx = await token.transfer(GenericTokenSender.address, amountToTransfer); const transfer_receipt = await transfer_tx.wait(); - console.log("Token transferred"); + logger.success("Token transferred"); fs.writeFileSync( `./scripts/externalData/${currency}_distribution_initial_transfer.json`, JSON.stringify(transfer_receipt, null, 2), { flags: "w" } ); - - // const approved = await token.allowance(signerAddress, GenericTokenSender.address); - // console.log("Amount of token approved: ", approved.toString()); - // let tx_approval_receipt; - // if (approved.lt(totalAmount)) { - // const tx_approval = await token.approve(GenericTokenSender.address, totalAmount); - // tx_approval_receipt = await tx_approval.wait(); - // } - // console.log("Token approved"); - // fs.writeFileSync( - // `./scripts/externalData/${currency}_distribution_approval.json`, - // JSON.stringify(tx_approval_receipt, null, 2), - // { flags: "w" } - // ); } else { // check if signer hold enough assets and if so, send it to GenericTokenSender const balance = await signer.getBalance(); const contractBalance = await ethers.provider.getBalance(GenericTokenSender.address); - console.log("sender's balance of token: ", balance.toString()); - console.log("GenericTokenSender's balance of token: ", contractBalance.toString()); + logger.info("sender's balance of token: ", balance.toString()); + logger.info("GenericTokenSender's balance of token: ", contractBalance.toString()); if (balance.add(contractBalance).lt(totalAmount)) { logger.error("Insufficient funds to distribute"); return; @@ -534,7 +508,7 @@ task("utils:send-direct", "Direct token sender script") value: amountToTransfer, }); const transfer_receipt = await transfer_tx.wait(); - console.log("Native Asset transferred"); + logger.success("Native Asset transferred"); fs.writeFileSync( `./scripts/externalData/${currency}_distribution_initial_transfer.json`, JSON.stringify(transfer_receipt, null, 2), @@ -558,10 +532,10 @@ task("utils:send-direct", "Direct token sender script") data.amounts ); const receiptTx = await tx.wait(); - console.log("Transaction hash:"); - console.log(tx.hash); - console.log("Transaction gas used:"); - console.log(tx.gasUsed); + logger.info("Transaction hash:"); + logger.info(tx.hash); + logger.info("Transaction gas used:"); + logger.info(tx.gasUsed); fs.writeFileSync( `./scripts/externalData/${currency}_distribution_tx_receipt.json`, JSON.stringify(receiptTx, null, 2), @@ -578,15 +552,13 @@ task("utils:send-direct", "Direct token sender script") usersBalancesAfter.push(balance); } - console.log("======================================="); - console.log(`${currency} amount:`); - // console.log(totalAmount / 10 ** decimals); - console.log(ethers.utils.formatUnits(totalAmount, decimals).toString() * 1); + logger.info("======================================="); + logger.info(`${currency} amount:`); + logger.info(ethers.utils.formatUnits(totalAmount, decimals).toString() * 1); const balanceAfter = await signer.getBalance(); - console.log("Execution cost:"); - // console.log((balanceBefore.sub(balanceAfter)) / 10 ** 18); - console.log( + logger.info("Execution cost:"); + logger.info( ethers.utils.formatUnits(balanceBefore.sub(balanceAfter), "ether").toString() * 1 ); @@ -594,13 +566,13 @@ task("utils:send-direct", "Direct token sender script") const diff = usersBalancesAfter[i] - usersBalancesBefore[i]; const expectedDiff = data.amounts[i].toString(); const matchDiff = diff == expectedDiff.toString(); - console.log("======================================="); - console.log(`amount received by '${data.receivers[i]}',`); - console.log(diff / 10 ** decimals); - console.log("while the expected amount was:"); - console.log(data.amounts[i].toString() / 10 ** decimals); + logger.info("======================================="); + logger.info(`amount received by '${data.receivers[i]}',`); + logger.info(diff / 10 ** decimals); + logger.info("while the expected amount was:"); + logger.info(data.amounts[i].toString() / 10 ** decimals); if (matchDiff) { - console.log(`The expected amount matches for ${data.receivers[i]}`); + logger.success(`The expected amount matches for ${data.receivers[i]}`); } else { console.error(`The amounts DO NOT match for ${data.receivers[i]}`); } @@ -655,13 +627,12 @@ task("utils:simulate-tx", "Simulates a transaction on forked network") signer = await getImpersonatedSigner(taskArgs.txFrom); const balance = await ethers.provider.getBalance(signer.address); if (balance.eq(0)) { - console.log(`Setting balance for address ${signer.address}...`); + logger.info(`Setting balance for address ${signer.address}...`); await setBalance(signer.address, ethers.utils.parseEther("1.0")); } - // const signedTx = await signer.signTransaction(tx); const txResponse = await signer.sendTransaction(tx); const txReceipt = await txResponse.wait(); - console.log("Simulated Transaction hash: ", txResponse.hash); + logger.info("Simulated Transaction hash: ", txResponse.hash); fs.writeFileSync("./txResponse.json", JSON.stringify(txResponse, null, 2), { flag: "w+" }); fs.writeFileSync("./txReceipt.json", JSON.stringify(txReceipt, null, 2), { flag: "w+" }); }); @@ -679,7 +650,7 @@ task("utils:send-tx", "Creates and sends a raw transaction") const { ethers } = hre; if (!taskArgs.txGasPrice) { taskArgs.txGasPrice = await ethers.provider.getGasPrice(); - console.log( + logger.info( `Current gas price: ${ethers.utils.formatUnits(taskArgs.txGasPrice, "gwei")} gwei` ); } @@ -698,7 +669,7 @@ task("utils:send-tx", "Creates and sends a raw transaction") (account) => account.address.toLowerCase() === taskArgs.txFrom.toLowerCase() ); if (!signer || taskArgs.simulate) { - console.log(`simulating on forked network...`); + logger.info(`simulating on forked network...`); const command = "hh simulate-tx " + `--tx-to ${tx.to} ` + @@ -709,22 +680,21 @@ task("utils:send-tx", "Creates and sends a raw transaction") `${taskArgs.txGasLimit ? `--tx-gas-limit ${tx.gasLimit}` : ""} ` + `${taskArgs.txGasPrice ? `--tx-gas-price ${tx.gasPrice}` : ""} ` + `${taskArgs.txNonce ? `--tx-nonce ${tx.nonce}` : ""}`; - console.log(`Running command: ${command}`); + logger.info(`Running command: ${command}`); try { // Run the child task synchronously const output = execSync(command, { stdio: "inherit" }); - console.log(`Child task completed successfully.`); + logger.success(`Child task completed successfully.`); } catch (error) { console.error(`Error executing child task: ${error.message}`); } return; } else if (signer && !taskArgs.simulate) { - console.log( + logger.warning( `WARINIG: REAL TRANSACTION;\n Address ${taskArgs.txFrom} found in wallet, sending transaction...` ); - // const signedTx = await ethers.provider.getSigner().signTransaction(tx); const txResponse = await signer.sendTransaction(tx); - console.log("Transaction hash: ", txResponse.hash); + logger.info("Transaction hash: ", txResponse.hash); const txReceipt = await txResponse.wait(); fs.writeFileSync("./txResponse.json", JSON.stringify(txResponse, null, 2), { flag: "w+", @@ -737,7 +707,7 @@ task("utils:send-tx", "Creates and sends a raw transaction") } else { signer = await ethers.provider.getSigner(); if (taskArgs.simulate) { - console.log("simulating on forked network..."); + logger.info("simulating on forked network..."); const command = "hh simulate-tx " + `--tx-to ${tx.to} ` + @@ -751,19 +721,19 @@ task("utils:send-tx", "Creates and sends a raw transaction") try { // Run the child task synchronously const output = execSync(command, { stdio: "inherit" }); - console.log(`Child task completed successfully.`); + logger.success(`Child task completed successfully.`); } catch (error) { console.error(`Error executing child task: ${error.message}`); } return; } else { - console.log( + logger.warning( "WARINIG: REAL TRANSACTION;\n No address provided, sending transaction from account[0]..." ); const signedTx = await signer.signTransaction(tx); const txResponse = await ethers.provider.sendTransaction(signedTx); const txReceipt = await txResponse.wait(); - console.log("Transaction hash: ", txResponse.hash); + logger.info("Transaction hash: ", txResponse.hash); fs.writeFileSync("./txResponse.json", JSON.stringify(txResponse, null, 2), { flag: "w+", }); @@ -790,20 +760,17 @@ task("utils:data-parser", "Encode data into abi format") params.forEach((param, index) => { try { const x = JSON.parse(param); - // if JSON parse is successful, convert param into ethers BigNumber params[index] = ethers.BigNumber.from(x); - // console.log(`Parsed parameter for index ${index}: `, params[index]); } catch (e) { params[index] = param.toLowerCase(); - // console.log(`Parsed parameter for index ${index}: `, params[index]); } }); if (match && match[1]) { fName = match[1]; const data = iface.encodeFunctionData(fName, params); - console.log("\n\nEncoded data: \n\n", data, "\n\n"); + logger.success("\n\nEncoded data: \n\n", data, "\n\n"); } else { - console.log("Invalid ABI syntax"); + logger.error("Invalid ABI syntax"); } }); // way of use: $ hh unit-parser --unit --decimals @@ -815,7 +782,7 @@ task("utils:unit-parser", "Parse unit from string") const unit = taskArgs.unit; const decimals = taskArgs.decimals; const unitParsed = ethers.utils.parseUnits(unit, decimals); - console.log("Unit parsed: ", unitParsed.toString()); + logger.info("Unit parsed: ", unitParsed.toString()); }); // way of use: $ hh zero-padder --arg --bytes task("utils:zero-padder", "Pad an argument with zeros") @@ -826,5 +793,5 @@ task("utils:zero-padder", "Pad an argument with zeros") const arg = taskArgs.arg.toLowerCase(); const bytesLength = taskArgs.bytes; const paddedArg = ethers.utils.hexZeroPad(arg, bytesLength); - console.log("Padded argument: ", paddedArg); + logger.info("Padded argument: ", paddedArg); });