From f8b7a2f134e51726e9cf47c69dc21b334e540dcf Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 4 Jan 2022 17:35:30 -0800 Subject: [PATCH 1/2] added: rinkeby network --- .../src/contracts/hardhat_contracts.json | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/packages/react-app/src/contracts/hardhat_contracts.json b/packages/react-app/src/contracts/hardhat_contracts.json index 7eba6f23..75051d04 100644 --- a/packages/react-app/src/contracts/hardhat_contracts.json +++ b/packages/react-app/src/contracts/hardhat_contracts.json @@ -1,4 +1,112 @@ { + "4": { + "rinkeby": { + "name": "rinkeby", + "chainId": "4", + "contracts": { + "Distributor": { + "address": "0x0e76C65F57D88DD35079E19CEa92a3bA197C18D4", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "ethDistributed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "tokenDistributed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "distributeEther", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "distributeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + } + } + } + }, "5": { "goerli": { "name": "goerli", From 8a51e0a52a0abddff702679bbd1ea33f759912d1 Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 4 Jan 2022 18:08:45 -0800 Subject: [PATCH 2/2] added: contracts --- packages/react-app/src/App.jsx | 2 +- .../src/contracts/hardhat_contracts.json | 110 +++++++++++++++++- 2 files changed, 110 insertions(+), 2 deletions(-) diff --git a/packages/react-app/src/App.jsx b/packages/react-app/src/App.jsx index e5727ca6..ad72b965 100644 --- a/packages/react-app/src/App.jsx +++ b/packages/react-app/src/App.jsx @@ -424,7 +424,7 @@ function App(props) { - + {options} diff --git a/packages/react-app/src/contracts/hardhat_contracts.json b/packages/react-app/src/contracts/hardhat_contracts.json index 75051d04..3e75e371 100644 --- a/packages/react-app/src/contracts/hardhat_contracts.json +++ b/packages/react-app/src/contracts/hardhat_contracts.json @@ -1,4 +1,112 @@ { + "1": { + "mainnet": { + "name": "mainnet", + "chainId": "1", + "contracts": { + "Distributor": { + "address": "0x3E1516166E38eF3C995BDad7a27e8B1643e3450D", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "ethDistributed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "tokenDistributed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "distributeEther", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "distributeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + } + } + } + }, "4": { "rinkeby": { "name": "rinkeby", @@ -113,7 +221,7 @@ "chainId": "5", "contracts": { "Distributor": { - "address": "0x7B31B672aF3160F7f90799D41223Ab05840c3097", + "address": "0x80fB8Dc425f13b9118d8B382803cAA5289F93218", "abi": [ { "anonymous": false,