diff --git a/abi/Distributor.json b/abi/Distributor.json new file mode 100644 index 0000000..c8e1a4c --- /dev/null +++ b/abi/Distributor.json @@ -0,0 +1,130 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "factoryAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "Distributor__InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "Distributor__MismatchedArrays", + "type": "error" + }, + { + "inputs": [], + "name": "Distributor__MismatchedPercentages", + "type": "error" + }, + { + "inputs": [], + "name": "Distributor__NoTokenToDistribute", + "type": "error" + }, + { + "inputs": [], + "name": "Distributor__NoZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "Distributor__OnlyFactoryAddressIsAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "winners", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "percentages", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "Distributed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "winners", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "percentages", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "distribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getConstants", + "outputs": [ + { + "internalType": "address", + "name": "_FACTORY_ADDRESS", + "type": "address" + }, + { + "internalType": "address", + "name": "_STADIUM_ADDRESS", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_COMMISSION_FEE", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_VERSION", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/abi/proxyFactory.json b/abi/proxyFactory.json new file mode 100644 index 0000000..ce54aaf --- /dev/null +++ b/abi/proxyFactory.json @@ -0,0 +1,530 @@ +[ + { + "inputs": [ + { + "internalType": "address[]", + "name": "_whitelistedTokens", + "type": "address[]" + }, + { + "internalType": "address", + "name": "_stadiumAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__CloseTimeNotInRange", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ContestIsAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ContestIsNotClosed", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ContestIsNotExpired", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ContestIsNotRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__DelegateCallFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ImplementationNotDeployed", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__InvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__NoEmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__NoZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ProxyAddressCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyFactory__ProxyIsNotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "Distributed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "organizer", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "closeTime", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "SetContest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "stadiumAddress", + "type": "address" + } + ], + "name": "SetStadiumAddress", + "type": "event" + }, + { + "inputs": [], + "name": "EXPIRATION_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CONTEST_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "deployProxyAndDistribute", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "organizer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "deployProxyAndDistributeByOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "organizer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "deployProxyAndDistributeBySignature", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "organizer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "distributeByOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "getProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "saltToCloseTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "organizer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "contestId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "closeTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setContest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newStadiumAddress", + "type": "address" + } + ], + "name": "setStadiumAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stadiumAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file