diff --git a/abis/v3_2_0/abis/CompoundPrizePool.json b/abis/v3_2_0/abis/CompoundPrizePool.json new file mode 100644 index 0000000..5418738 --- /dev/null +++ b/abis/v3_2_0/abis/CompoundPrizePool.json @@ -0,0 +1,1310 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AwardCaptured", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Awarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AwardedExternalERC20", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "AwardedExternalERC721", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "cToken", + "type": "address" + } + ], + "name": "CompoundPrizePoolInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract ControlledTokenInterface", + "name": "token", + "type": "address" + } + ], + "name": "ControlledTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CreditBurned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CreditMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "creditLimitMantissa", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "creditRateMantissa", + "type": "uint128" + } + ], + "name": "CreditPlanSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "referrer", + "type": "address" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "reserveRegistry", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxExitFeeMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxTimelockDuration", + "type": "uint256" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee", + "type": "uint256" + } + ], + "name": "InstantWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityCap", + "type": "uint256" + } + ], + "name": "LiquidityCapSet", + "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": "prizeStrategy", + "type": "address" + } + ], + "name": "PrizeStrategySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReserveFeeCaptured", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReserveWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TimelockDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTimestamp", + "type": "uint256" + } + ], + "name": "TimelockedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemed", + "type": "uint256" + } + ], + "name": "TimelockedWithdrawalSwept", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TransferredExternalERC20", + "type": "event" + }, + { + "inputs": [], + "name": "accountedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "awardBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "awardExternalERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "awardExternalERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "balanceOfCredit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "beforeTokenTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cToken", + "outputs": [ + { + "internalType": "contract CTokenInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateEarlyExitFee", + "outputs": [ + { + "internalType": "uint256", + "name": "exitFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "burnedCredit", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateReserveFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateTimelockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "durationSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "burnedCredit", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_externalToken", + "type": "address" + } + ], + "name": "canAwardExternal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "captureAwardBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "creditPlanOf", + "outputs": [ + { + "internalType": "uint128", + "name": "creditLimitMantissa", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "creditRateMantissa", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "address", + "name": "referrer", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_principal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_interest", + "type": "uint256" + } + ], + "name": "estimateCreditAccrualTime", + "outputs": [ + { + "internalType": "uint256", + "name": "durationSeconds", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryInterface", + "name": "_reserveRegistry", + "type": "address" + }, + { + "internalType": "contract ControlledTokenInterface[]", + "name": "_controlledTokens", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_maxExitFeeMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxTimelockDuration", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryInterface", + "name": "_reserveRegistry", + "type": "address" + }, + { + "internalType": "contract ControlledTokenInterface[]", + "name": "_controlledTokens", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_maxExitFeeMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxTimelockDuration", + "type": "uint256" + }, + { + "internalType": "contract CTokenInterface", + "name": "_cToken", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "liquidityCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxExitFeeMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTimelockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizeStrategy", + "outputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRegistry", + "outputs": [ + { + "internalType": "contract RegistryInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controlledToken", + "type": "address" + }, + { + "internalType": "uint128", + "name": "_creditRateMantissa", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_creditLimitMantissa", + "type": "uint128" + } + ], + "name": "setCreditPlanOf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_liquidityCap", + "type": "uint256" + } + ], + "name": "setLiquidityCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "_prizeStrategy", + "type": "address" + } + ], + "name": "setPrizeStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "sweepTimelockBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "timelockBalanceAvailableAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "timelockBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "timelockDepositTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "timelockTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferExternalERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maximumExitFee", + "type": "uint256" + } + ], + "name": "withdrawInstantlyFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "withdrawReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "withdrawWithTimelockFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abis/v3_2_0/abis/CompoundPrizePoolProxyFactory.json b/abis/v3_2_0/abis/CompoundPrizePoolProxyFactory.json new file mode 100644 index 0000000..71af79b --- /dev/null +++ b/abis/v3_2_0/abis/CompoundPrizePoolProxyFactory.json @@ -0,0 +1,70 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "ProxyCreated", + "type": "event" + }, + { + "inputs": [], + "name": "create", + "outputs": [ + { + "internalType": "contract CompoundPrizePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "deployMinimal", + "outputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "instance", + "outputs": [ + { + "internalType": "contract CompoundPrizePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abis/v3_2_0/abis/MultipleWinners.json b/abis/v3_2_0/abis/MultipleWinners.json new file mode 100644 index 0000000..2e1f168 --- /dev/null +++ b/abis/v3_2_0/abis/MultipleWinners.json @@ -0,0 +1,1084 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Upgradeable", + "name": "externalErc20", + "type": "address" + } + ], + "name": "ExternalErc20AwardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Upgradeable", + "name": "externalErc20Award", + "type": "address" + } + ], + "name": "ExternalErc20AwardRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC721Upgradeable", + "name": "externalErc721", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "ExternalErc721AwardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC721Upgradeable", + "name": "externalErc721Award", + "type": "address" + } + ], + "name": "ExternalErc721AwardRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prizePeriodStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "prizePeriodSeconds", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract PrizePool", + "name": "prizePool", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract TicketInterface", + "name": "ticket", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract IERC20Upgradeable", + "name": "sponsorship", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract RNGInterface", + "name": "rng", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract IERC20Upgradeable[]", + "name": "externalErc20Awards", + "type": "address[]" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "NoWinners", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "numberOfWinners", + "type": "uint256" + } + ], + "name": "NumberOfWinnersSet", + "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": "contract PeriodicPrizeStrategyListenerInterface", + "name": "periodicPrizeStrategyListener", + "type": "address" + } + ], + "name": "PeriodicPrizeStrategyListenerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "prizePool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "rngRequestId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "rngLockBlock", + "type": "uint32" + } + ], + "name": "PrizePoolAwardCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "prizePool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "rngRequestId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "rngLockBlock", + "type": "uint32" + } + ], + "name": "PrizePoolAwardStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + } + ], + "name": "PrizePoolAwarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "prizePeriodStartedAt", + "type": "uint256" + } + ], + "name": "PrizePoolOpened", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "RngRequestFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "rngRequestTimeout", + "type": "uint32" + } + ], + "name": "RngRequestTimeoutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract RNGInterface", + "name": "rngService", + "type": "address" + } + ], + "name": "RngServiceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "splitExternalErc20Awards", + "type": "bool" + } + ], + "name": "SplitExternalErc20AwardsSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract TokenListenerInterface", + "name": "tokenListener", + "type": "address" + } + ], + "name": "TokenListenerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "_externalErc20", + "type": "address" + } + ], + "name": "addExternalErc20Award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable[]", + "name": "_externalErc20s", + "type": "address[]" + } + ], + "name": "addExternalErc20Awards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "_externalErc721", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "addExternalErc721Award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "address", + "name": "referrer", + "type": "address" + } + ], + "name": "beforeTokenMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "beforeTokenTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTime", + "type": "uint256" + } + ], + "name": "calculateNextPrizePeriodStartTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canCompleteAward", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canStartAward", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cancelAward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "completeAward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentPrize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "secondsPerBlockMantissa", + "type": "uint256" + } + ], + "name": "estimateRemainingBlocksToPrize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getExternalErc20Awards", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "_externalErc721", + "type": "address" + } + ], + "name": "getExternalErc721AwardTokenIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getExternalErc721Awards", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastRngLockBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastRngRequestId", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_prizePeriodStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_prizePeriodSeconds", + "type": "uint256" + }, + { + "internalType": "contract PrizePool", + "name": "_prizePool", + "type": "address" + }, + { + "internalType": "contract TicketInterface", + "name": "_ticket", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_sponsorship", + "type": "address" + }, + { + "internalType": "contract RNGInterface", + "name": "_rng", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable[]", + "name": "externalErc20Awards", + "type": "address[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_prizePeriodStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_prizePeriodSeconds", + "type": "uint256" + }, + { + "internalType": "contract PrizePool", + "name": "_prizePool", + "type": "address" + }, + { + "internalType": "contract TicketInterface", + "name": "_ticket", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_sponsorship", + "type": "address" + }, + { + "internalType": "contract RNGInterface", + "name": "_rng", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_numberOfWinners", + "type": "uint256" + } + ], + "name": "initializeMultipleWinners", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isPrizePeriodOver", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isRngCompleted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isRngRequested", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isRngTimedOut", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numberOfWinners", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "periodicPrizeStrategyListener", + "outputs": [ + { + "internalType": "contract PeriodicPrizeStrategyListenerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizePeriodEndAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizePeriodRemainingSeconds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizePeriodSeconds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizePeriodStartedAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizePool", + "outputs": [ + { + "internalType": "contract PrizePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "_externalErc20", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_prevExternalErc20", + "type": "address" + } + ], + "name": "removeExternalErc20Award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "_externalErc721", + "type": "address" + }, + { + "internalType": "contract IERC721Upgradeable", + "name": "_prevExternalErc721", + "type": "address" + } + ], + "name": "removeExternalErc721Award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rng", + "outputs": [ + { + "internalType": "contract RNGInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rngRequestTimeout", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "setNumberOfWinners", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PeriodicPrizeStrategyListenerInterface", + "name": "_periodicPrizeStrategyListener", + "type": "address" + } + ], + "name": "setPeriodicPrizeStrategyListener", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_rngRequestTimeout", + "type": "uint32" + } + ], + "name": "setRngRequestTimeout", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RNGInterface", + "name": "rngService", + "type": "address" + } + ], + "name": "setRngService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_splitExternalErc20Awards", + "type": "bool" + } + ], + "name": "setSplitExternalErc20Awards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "_tokenListener", + "type": "address" + } + ], + "name": "setTokenListener", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "splitExternalErc20Awards", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sponsorship", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "startAward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ticket", + "outputs": [ + { + "internalType": "contract TicketInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenListener", + "outputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferExternalERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] + \ No newline at end of file diff --git a/abis/v3_2_0/abis/PrizePool.json b/abis/v3_2_0/abis/PrizePool.json new file mode 100644 index 0000000..0d57d8a --- /dev/null +++ b/abis/v3_2_0/abis/PrizePool.json @@ -0,0 +1,1251 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AwardCaptured", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Awarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AwardedExternalERC20", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "winner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "AwardedExternalERC721", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract ControlledTokenInterface", + "name": "token", + "type": "address" + } + ], + "name": "ControlledTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CreditBurned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CreditMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "creditLimitMantissa", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "creditRateMantissa", + "type": "uint128" + } + ], + "name": "CreditPlanSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "referrer", + "type": "address" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "reserveRegistry", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxExitFeeMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxTimelockDuration", + "type": "uint256" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee", + "type": "uint256" + } + ], + "name": "InstantWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityCap", + "type": "uint256" + } + ], + "name": "LiquidityCapSet", + "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": "prizeStrategy", + "type": "address" + } + ], + "name": "PrizeStrategySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReserveFeeCaptured", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReserveWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TimelockDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTimestamp", + "type": "uint256" + } + ], + "name": "TimelockedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemed", + "type": "uint256" + } + ], + "name": "TimelockedWithdrawalSwept", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TransferredExternalERC20", + "type": "event" + }, + { + "inputs": [], + "name": "accountedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "award", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "awardBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "awardExternalERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "awardExternalERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "balanceOfCredit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "beforeTokenTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateEarlyExitFee", + "outputs": [ + { + "internalType": "uint256", + "name": "exitFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "burnedCredit", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateReserveFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateTimelockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "durationSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "burnedCredit", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_externalToken", + "type": "address" + } + ], + "name": "canAwardExternal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "captureAwardBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "creditPlanOf", + "outputs": [ + { + "internalType": "uint128", + "name": "creditLimitMantissa", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "creditRateMantissa", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "address", + "name": "referrer", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_principal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_interest", + "type": "uint256" + } + ], + "name": "estimateCreditAccrualTime", + "outputs": [ + { + "internalType": "uint256", + "name": "durationSeconds", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryInterface", + "name": "_reserveRegistry", + "type": "address" + }, + { + "internalType": "contract ControlledTokenInterface[]", + "name": "_controlledTokens", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_maxExitFeeMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxTimelockDuration", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "liquidityCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxExitFeeMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTimelockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prizeStrategy", + "outputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRegistry", + "outputs": [ + { + "internalType": "contract RegistryInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controlledToken", + "type": "address" + }, + { + "internalType": "uint128", + "name": "_creditRateMantissa", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_creditLimitMantissa", + "type": "uint128" + } + ], + "name": "setCreditPlanOf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_liquidityCap", + "type": "uint256" + } + ], + "name": "setLiquidityCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TokenListenerInterface", + "name": "_prizeStrategy", + "type": "address" + } + ], + "name": "setPrizeStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "sweepTimelockBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "timelockBalanceAvailableAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "timelockBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "timelockDepositTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "timelockTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "externalToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferExternalERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maximumExitFee", + "type": "uint256" + } + ], + "name": "withdrawInstantlyFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "withdrawReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "controlledToken", + "type": "address" + } + ], + "name": "withdrawWithTimelockFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/generated/Comptroller/Comptroller.ts b/generated/Comptroller/Comptroller.ts deleted file mode 100644 index 391003b..0000000 --- a/generated/Comptroller/Comptroller.ts +++ /dev/null @@ -1,1914 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class BalanceDripActivated extends ethereum.Event { - get params(): BalanceDripActivated__Params { - return new BalanceDripActivated__Params(this); - } -} - -export class BalanceDripActivated__Params { - _event: BalanceDripActivated; - - constructor(event: BalanceDripActivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class BalanceDripDeactivated extends ethereum.Event { - get params(): BalanceDripDeactivated__Params { - return new BalanceDripDeactivated__Params(this); - } -} - -export class BalanceDripDeactivated__Params { - _event: BalanceDripDeactivated; - - constructor(event: BalanceDripDeactivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } -} - -export class BalanceDripDripped extends ethereum.Event { - get params(): BalanceDripDripped__Params { - return new BalanceDripDripped__Params(this); - } -} - -export class BalanceDripDripped__Params { - _event: BalanceDripDripped; - - constructor(event: BalanceDripDripped) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[3].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } -} - -export class BalanceDripRateSet extends ethereum.Event { - get params(): BalanceDripRateSet__Params { - return new BalanceDripRateSet__Params(this); - } -} - -export class BalanceDripRateSet__Params { - _event: BalanceDripRateSet; - - constructor(event: BalanceDripRateSet) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class DripTokenClaimed extends ethereum.Event { - get params(): DripTokenClaimed__Params { - return new DripTokenClaimed__Params(this); - } -} - -export class DripTokenClaimed__Params { - _event: DripTokenClaimed; - - constructor(event: DripTokenClaimed) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class DripTokenDripped extends ethereum.Event { - get params(): DripTokenDripped__Params { - return new DripTokenDripped__Params(this); - } -} - -export class DripTokenDripped__Params { - _event: DripTokenDripped; - - constructor(event: DripTokenDripped) { - this._event = event; - } - - get dripToken(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class TransferredOut extends ethereum.Event { - get params(): TransferredOut__Params { - return new TransferredOut__Params(this); - } -} - -export class TransferredOut__Params { - _event: TransferredOut; - - constructor(event: TransferredOut) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class VolumeDripActivated extends ethereum.Event { - get params(): VolumeDripActivated__Params { - return new VolumeDripActivated__Params(this); - } -} - -export class VolumeDripActivated__Params { - _event: VolumeDripActivated; - - constructor(event: VolumeDripActivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class VolumeDripDeactivated extends ethereum.Event { - get params(): VolumeDripDeactivated__Params { - return new VolumeDripDeactivated__Params(this); - } -} - -export class VolumeDripDeactivated__Params { - _event: VolumeDripDeactivated; - - constructor(event: VolumeDripDeactivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } -} - -export class VolumeDripDripped extends ethereum.Event { - get params(): VolumeDripDripped__Params { - return new VolumeDripDripped__Params(this); - } -} - -export class VolumeDripDripped__Params { - _event: VolumeDripDripped; - - constructor(event: VolumeDripDripped) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get user(): Address { - return this._event.parameters[4].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class VolumeDripPeriodEnded extends ethereum.Event { - get params(): VolumeDripPeriodEnded__Params { - return new VolumeDripPeriodEnded__Params(this); - } -} - -export class VolumeDripPeriodEnded__Params { - _event: VolumeDripPeriodEnded; - - constructor(event: VolumeDripPeriodEnded) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get period(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get totalSupply(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } - - get drippedTokens(): BigInt { - return this._event.parameters[6].value.toBigInt(); - } -} - -export class VolumeDripPeriodStarted extends ethereum.Event { - get params(): VolumeDripPeriodStarted__Params { - return new VolumeDripPeriodStarted__Params(this); - } -} - -export class VolumeDripPeriodStarted__Params { - _event: VolumeDripPeriodStarted; - - constructor(event: VolumeDripPeriodStarted) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get period(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } - - get endTime(): BigInt { - return this._event.parameters[6].value.toBigInt(); - } -} - -export class VolumeDripSet extends ethereum.Event { - get params(): VolumeDripSet__Params { - return new VolumeDripSet__Params(this); - } -} - -export class VolumeDripSet__Params { - _event: VolumeDripSet; - - constructor(event: VolumeDripSet) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class Comptroller__balanceOfClaimsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__getBalanceDripResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__getVolumeDripResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__getVolumeDripPeriodResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__updateAndClaimDripsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__updateAndClaimDripsInputPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class Comptroller__updateDripsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__updateDripsInputPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class Comptroller extends ethereum.SmartContract { - static bind(address: Address): Comptroller { - return new Comptroller("Comptroller", address); - } - - balanceOfClaims( - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "balanceOfClaims", - "balanceOfClaims(address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray< - Comptroller__balanceOfClaimsResultValue0Struct - >(); - } - - try_balanceOfClaims( - user: Address, - dripTokens: Array
- ): ethereum.CallResult< - Array - > { - let result = super.tryCall( - "balanceOfClaims", - "balanceOfClaims(address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray() - ); - } - - balanceOfDrip(user: Address, dripToken: Address): BigInt { - let result = super.call( - "balanceOfDrip", - "balanceOfDrip(address,address):(uint256)", - [ethereum.Value.fromAddress(user), ethereum.Value.fromAddress(dripToken)] - ); - - return result[0].toBigInt(); - } - - try_balanceOfDrip( - user: Address, - dripToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "balanceOfDrip", - "balanceOfDrip(address,address):(uint256)", - [ethereum.Value.fromAddress(user), ethereum.Value.fromAddress(dripToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getActiveBalanceDripTokens( - source: Address, - measure: Address - ): Array
{ - let result = super.call( - "getActiveBalanceDripTokens", - "getActiveBalanceDripTokens(address,address):(address[])", - [ethereum.Value.fromAddress(source), ethereum.Value.fromAddress(measure)] - ); - - return result[0].toAddressArray(); - } - - try_getActiveBalanceDripTokens( - source: Address, - measure: Address - ): ethereum.CallResult> { - let result = super.tryCall( - "getActiveBalanceDripTokens", - "getActiveBalanceDripTokens(address,address):(address[])", - [ethereum.Value.fromAddress(source), ethereum.Value.fromAddress(measure)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getActiveVolumeDripTokens( - source: Address, - measure: Address, - isReferral: boolean - ): Array
{ - let result = super.call( - "getActiveVolumeDripTokens", - "getActiveVolumeDripTokens(address,address,bool):(address[])", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return result[0].toAddressArray(); - } - - try_getActiveVolumeDripTokens( - source: Address, - measure: Address, - isReferral: boolean - ): ethereum.CallResult> { - let result = super.tryCall( - "getActiveVolumeDripTokens", - "getActiveVolumeDripTokens(address,address,bool):(address[])", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBalanceDrip( - source: Address, - measure: Address, - dripToken: Address - ): Comptroller__getBalanceDripResult { - let result = super.call( - "getBalanceDrip", - "getBalanceDrip(address,address,address):(uint256,uint128,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken) - ] - ); - - return new Comptroller__getBalanceDripResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getBalanceDrip( - source: Address, - measure: Address, - dripToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getBalanceDrip", - "getBalanceDrip(address,address,address):(uint256,uint128,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getBalanceDripResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getVolumeDrip( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): Comptroller__getVolumeDripResult { - let result = super.call( - "getVolumeDrip", - "getVolumeDrip(address,address,address,bool):(uint256,uint256,uint256)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return new Comptroller__getVolumeDripResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getVolumeDrip( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): ethereum.CallResult { - let result = super.tryCall( - "getVolumeDrip", - "getVolumeDrip(address,address,address,bool):(uint256,uint256,uint256)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getVolumeDripResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getVolumeDripPeriod( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean, - period: i32 - ): Comptroller__getVolumeDripPeriodResult { - let result = super.call( - "getVolumeDripPeriod", - "getVolumeDripPeriod(address,address,address,bool,uint16):(uint112,uint112,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(period)) - ] - ); - - return new Comptroller__getVolumeDripPeriodResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getVolumeDripPeriod( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean, - period: i32 - ): ethereum.CallResult { - let result = super.tryCall( - "getVolumeDripPeriod", - "getVolumeDripPeriod(address,address,address,bool,uint16):(uint112,uint112,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(period)) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getVolumeDripPeriodResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - isVolumeDripActive( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): boolean { - let result = super.call( - "isVolumeDripActive", - "isVolumeDripActive(address,address,address,bool):(bool)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return result[0].toBoolean(); - } - - try_isVolumeDripActive( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): ethereum.CallResult { - let result = super.tryCall( - "isVolumeDripActive", - "isVolumeDripActive(address,address,address,bool):(bool)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - supportsInterface(interfaceId: Bytes): boolean { - let result = super.call( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - - return result[0].toBoolean(); - } - - try_supportsInterface(interfaceId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - updateAndClaimDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "updateAndClaimDrips", - "updateAndClaimDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray< - Comptroller__updateAndClaimDripsResultValue0Struct - >(); - } - - try_updateAndClaimDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): ethereum.CallResult< - Array - > { - let result = super.tryCall( - "updateAndClaimDrips", - "updateAndClaimDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray< - Comptroller__updateAndClaimDripsResultValue0Struct - >() - ); - } - - updateDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "updateDrips", - "updateDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray(); - } - - try_updateDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): ethereum.CallResult> { - let result = super.tryCall( - "updateDrips", - "updateDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray() - ); - } -} - -export class ConstructorCall extends ethereum.Call { - get inputs(): ConstructorCall__Inputs { - return new ConstructorCall__Inputs(this); - } - - get outputs(): ConstructorCall__Outputs { - return new ConstructorCall__Outputs(this); - } -} - -export class ConstructorCall__Inputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class ConstructorCall__Outputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class ActivateBalanceDripCall extends ethereum.Call { - get inputs(): ActivateBalanceDripCall__Inputs { - return new ActivateBalanceDripCall__Inputs(this); - } - - get outputs(): ActivateBalanceDripCall__Outputs { - return new ActivateBalanceDripCall__Outputs(this); - } -} - -export class ActivateBalanceDripCall__Inputs { - _call: ActivateBalanceDripCall; - - constructor(call: ActivateBalanceDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class ActivateBalanceDripCall__Outputs { - _call: ActivateBalanceDripCall; - - constructor(call: ActivateBalanceDripCall) { - this._call = call; - } -} - -export class ActivateVolumeDripCall extends ethereum.Call { - get inputs(): ActivateVolumeDripCall__Inputs { - return new ActivateVolumeDripCall__Inputs(this); - } - - get outputs(): ActivateVolumeDripCall__Outputs { - return new ActivateVolumeDripCall__Outputs(this); - } -} - -export class ActivateVolumeDripCall__Inputs { - _call: ActivateVolumeDripCall; - - constructor(call: ActivateVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get endTime(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } -} - -export class ActivateVolumeDripCall__Outputs { - _call: ActivateVolumeDripCall; - - constructor(call: ActivateVolumeDripCall) { - this._call = call; - } -} - -export class BeforeTokenMintCall extends ethereum.Call { - get inputs(): BeforeTokenMintCall__Inputs { - return new BeforeTokenMintCall__Inputs(this); - } - - get outputs(): BeforeTokenMintCall__Outputs { - return new BeforeTokenMintCall__Outputs(this); - } -} - -export class BeforeTokenMintCall__Inputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get measure(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenMintCall__Outputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get value2(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get measure(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall extends ethereum.Call { - get inputs(): CaptureClaimsForBalanceDripsForPairsCall__Inputs { - return new CaptureClaimsForBalanceDripsForPairsCall__Inputs(this); - } - - get outputs(): CaptureClaimsForBalanceDripsForPairsCall__Outputs { - return new CaptureClaimsForBalanceDripsForPairsCall__Outputs(this); - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall__Inputs { - _call: CaptureClaimsForBalanceDripsForPairsCall; - - constructor(call: CaptureClaimsForBalanceDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - CaptureClaimsForBalanceDripsForPairsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall__Outputs { - _call: CaptureClaimsForBalanceDripsForPairsCall; - - constructor(call: CaptureClaimsForBalanceDripsForPairsCall) { - this._call = call; - } -} - -export class CaptureClaimsForBalanceDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class ClaimDripCall extends ethereum.Call { - get inputs(): ClaimDripCall__Inputs { - return new ClaimDripCall__Inputs(this); - } - - get outputs(): ClaimDripCall__Outputs { - return new ClaimDripCall__Outputs(this); - } -} - -export class ClaimDripCall__Inputs { - _call: ClaimDripCall; - - constructor(call: ClaimDripCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ClaimDripCall__Outputs { - _call: ClaimDripCall; - - constructor(call: ClaimDripCall) { - this._call = call; - } -} - -export class ClaimDripsCall extends ethereum.Call { - get inputs(): ClaimDripsCall__Inputs { - return new ClaimDripsCall__Inputs(this); - } - - get outputs(): ClaimDripsCall__Outputs { - return new ClaimDripsCall__Outputs(this); - } -} - -export class ClaimDripsCall__Inputs { - _call: ClaimDripsCall; - - constructor(call: ClaimDripsCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } -} - -export class ClaimDripsCall__Outputs { - _call: ClaimDripsCall; - - constructor(call: ClaimDripsCall) { - this._call = call; - } -} - -export class DeactivateBalanceDripCall extends ethereum.Call { - get inputs(): DeactivateBalanceDripCall__Inputs { - return new DeactivateBalanceDripCall__Inputs(this); - } - - get outputs(): DeactivateBalanceDripCall__Outputs { - return new DeactivateBalanceDripCall__Outputs(this); - } -} - -export class DeactivateBalanceDripCall__Inputs { - _call: DeactivateBalanceDripCall; - - constructor(call: DeactivateBalanceDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get prevDripToken(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class DeactivateBalanceDripCall__Outputs { - _call: DeactivateBalanceDripCall; - - constructor(call: DeactivateBalanceDripCall) { - this._call = call; - } -} - -export class DeactivateVolumeDripCall extends ethereum.Call { - get inputs(): DeactivateVolumeDripCall__Inputs { - return new DeactivateVolumeDripCall__Inputs(this); - } - - get outputs(): DeactivateVolumeDripCall__Outputs { - return new DeactivateVolumeDripCall__Outputs(this); - } -} - -export class DeactivateVolumeDripCall__Inputs { - _call: DeactivateVolumeDripCall; - - constructor(call: DeactivateVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get prevDripToken(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class DeactivateVolumeDripCall__Outputs { - _call: DeactivateVolumeDripCall; - - constructor(call: DeactivateVolumeDripCall) { - this._call = call; - } -} - -export class MintAndCaptureVolumeDripsForPairsCall extends ethereum.Call { - get inputs(): MintAndCaptureVolumeDripsForPairsCall__Inputs { - return new MintAndCaptureVolumeDripsForPairsCall__Inputs(this); - } - - get outputs(): MintAndCaptureVolumeDripsForPairsCall__Outputs { - return new MintAndCaptureVolumeDripsForPairsCall__Outputs(this); - } -} - -export class MintAndCaptureVolumeDripsForPairsCall__Inputs { - _call: MintAndCaptureVolumeDripsForPairsCall; - - constructor(call: MintAndCaptureVolumeDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - MintAndCaptureVolumeDripsForPairsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class MintAndCaptureVolumeDripsForPairsCall__Outputs { - _call: MintAndCaptureVolumeDripsForPairsCall; - - constructor(call: MintAndCaptureVolumeDripsForPairsCall) { - this._call = call; - } -} - -export class MintAndCaptureVolumeDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetBalanceDripRateCall extends ethereum.Call { - get inputs(): SetBalanceDripRateCall__Inputs { - return new SetBalanceDripRateCall__Inputs(this); - } - - get outputs(): SetBalanceDripRateCall__Outputs { - return new SetBalanceDripRateCall__Outputs(this); - } -} - -export class SetBalanceDripRateCall__Inputs { - _call: SetBalanceDripRateCall; - - constructor(call: SetBalanceDripRateCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class SetBalanceDripRateCall__Outputs { - _call: SetBalanceDripRateCall; - - constructor(call: SetBalanceDripRateCall) { - this._call = call; - } -} - -export class SetVolumeDripCall extends ethereum.Call { - get inputs(): SetVolumeDripCall__Inputs { - return new SetVolumeDripCall__Inputs(this); - } - - get outputs(): SetVolumeDripCall__Outputs { - return new SetVolumeDripCall__Outputs(this); - } -} - -export class SetVolumeDripCall__Inputs { - _call: SetVolumeDripCall; - - constructor(call: SetVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetVolumeDripCall__Outputs { - _call: SetVolumeDripCall; - - constructor(call: SetVolumeDripCall) { - this._call = call; - } -} - -export class TransferOutCall extends ethereum.Call { - get inputs(): TransferOutCall__Inputs { - return new TransferOutCall__Inputs(this); - } - - get outputs(): TransferOutCall__Outputs { - return new TransferOutCall__Outputs(this); - } -} - -export class TransferOutCall__Inputs { - _call: TransferOutCall; - - constructor(call: TransferOutCall) { - this._call = call; - } - - get token(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferOutCall__Outputs { - _call: TransferOutCall; - - constructor(call: TransferOutCall) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} - -export class UpdateActiveBalanceDripsForPairsCall extends ethereum.Call { - get inputs(): UpdateActiveBalanceDripsForPairsCall__Inputs { - return new UpdateActiveBalanceDripsForPairsCall__Inputs(this); - } - - get outputs(): UpdateActiveBalanceDripsForPairsCall__Outputs { - return new UpdateActiveBalanceDripsForPairsCall__Outputs(this); - } -} - -export class UpdateActiveBalanceDripsForPairsCall__Inputs { - _call: UpdateActiveBalanceDripsForPairsCall; - - constructor(call: UpdateActiveBalanceDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateActiveBalanceDripsForPairsCallPairsStruct - >(); - } -} - -export class UpdateActiveBalanceDripsForPairsCall__Outputs { - _call: UpdateActiveBalanceDripsForPairsCall; - - constructor(call: UpdateActiveBalanceDripsForPairsCall) { - this._call = call; - } -} - -export class UpdateActiveBalanceDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateActiveVolumeDripsForPairsCall extends ethereum.Call { - get inputs(): UpdateActiveVolumeDripsForPairsCall__Inputs { - return new UpdateActiveVolumeDripsForPairsCall__Inputs(this); - } - - get outputs(): UpdateActiveVolumeDripsForPairsCall__Outputs { - return new UpdateActiveVolumeDripsForPairsCall__Outputs(this); - } -} - -export class UpdateActiveVolumeDripsForPairsCall__Inputs { - _call: UpdateActiveVolumeDripsForPairsCall; - - constructor(call: UpdateActiveVolumeDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateActiveVolumeDripsForPairsCallPairsStruct - >(); - } -} - -export class UpdateActiveVolumeDripsForPairsCall__Outputs { - _call: UpdateActiveVolumeDripsForPairsCall; - - constructor(call: UpdateActiveVolumeDripsForPairsCall) { - this._call = call; - } -} - -export class UpdateActiveVolumeDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateAndClaimDripsCall extends ethereum.Call { - get inputs(): UpdateAndClaimDripsCall__Inputs { - return new UpdateAndClaimDripsCall__Inputs(this); - } - - get outputs(): UpdateAndClaimDripsCall__Outputs { - return new UpdateAndClaimDripsCall__Outputs(this); - } -} - -export class UpdateAndClaimDripsCall__Inputs { - _call: UpdateAndClaimDripsCall; - - constructor(call: UpdateAndClaimDripsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateAndClaimDripsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class UpdateAndClaimDripsCall__Outputs { - _call: UpdateAndClaimDripsCall; - - constructor(call: UpdateAndClaimDripsCall) { - this._call = call; - } - - get value0(): Array { - return this._call.outputValues[0].value.toTupleArray< - UpdateAndClaimDripsCallValue0Struct - >(); - } -} - -export class UpdateAndClaimDripsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateAndClaimDripsCallValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class UpdateDripsCall extends ethereum.Call { - get inputs(): UpdateDripsCall__Inputs { - return new UpdateDripsCall__Inputs(this); - } - - get outputs(): UpdateDripsCall__Outputs { - return new UpdateDripsCall__Outputs(this); - } -} - -export class UpdateDripsCall__Inputs { - _call: UpdateDripsCall; - - constructor(call: UpdateDripsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateDripsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class UpdateDripsCall__Outputs { - _call: UpdateDripsCall; - - constructor(call: UpdateDripsCall) { - this._call = call; - } - - get value0(): Array { - return this._call.outputValues[0].value.toTupleArray< - UpdateDripsCallValue0Struct - >(); - } -} - -export class UpdateDripsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateDripsCallValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/generated/schema.ts b/generated/schema.ts deleted file mode 100644 index c4d9b88..0000000 --- a/generated/schema.ts +++ /dev/null @@ -1,3103 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - TypedMap, - Entity, - Value, - ValueKind, - store, - Address, - Bytes, - BigInt, - BigDecimal -} from "@graphprotocol/graph-ts"; - -export class Comptroller extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save Comptroller entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save Comptroller entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("Comptroller", id.toString(), this); - } - - static load(id: string): Comptroller | null { - return store.get("Comptroller", id) as Comptroller | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get owner(): Bytes { - let value = this.get("owner"); - return value.toBytes(); - } - - set owner(value: Bytes) { - this.set("owner", Value.fromBytes(value)); - } - - get players(): Array { - let value = this.get("players"); - return value.toStringArray(); - } - - set players(value: Array) { - this.set("players", Value.fromStringArray(value)); - } - - get balanceDrips(): Array { - let value = this.get("balanceDrips"); - return value.toStringArray(); - } - - set balanceDrips(value: Array) { - this.set("balanceDrips", Value.fromStringArray(value)); - } - - get volumeDrips(): Array { - let value = this.get("volumeDrips"); - return value.toStringArray(); - } - - set volumeDrips(value: Array) { - this.set("volumeDrips", Value.fromStringArray(value)); - } -} - -export class SablierStream extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save SablierStream entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save SablierStream entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("SablierStream", id.toString(), this); - } - - static load(id: string): SablierStream | null { - return store.get("SablierStream", id) as SablierStream | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePool(): string { - let value = this.get("prizePool"); - return value.toString(); - } - - set prizePool(value: string) { - this.set("prizePool", Value.fromString(value)); - } -} - -export class PrizePool extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save PrizePool entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save PrizePool entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("PrizePool", id.toString(), this); - } - - static load(id: string): PrizePool | null { - return store.get("PrizePool", id) as PrizePool | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get deactivated(): boolean { - let value = this.get("deactivated"); - return value.toBoolean(); - } - - set deactivated(value: boolean) { - this.set("deactivated", Value.fromBoolean(value)); - } - - get owner(): Bytes | null { - let value = this.get("owner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set owner(value: Bytes | null) { - if (value === null) { - this.unset("owner"); - } else { - this.set("owner", Value.fromBytes(value as Bytes)); - } - } - - get reserveRegistry(): Bytes | null { - let value = this.get("reserveRegistry"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set reserveRegistry(value: Bytes | null) { - if (value === null) { - this.unset("reserveRegistry"); - } else { - this.set("reserveRegistry", Value.fromBytes(value as Bytes)); - } - } - - get prizeStrategy(): string | null { - let value = this.get("prizeStrategy"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizeStrategy(value: string | null) { - if (value === null) { - this.unset("prizeStrategy"); - } else { - this.set("prizeStrategy", Value.fromString(value as string)); - } - } - - get prizePoolType(): string | null { - let value = this.get("prizePoolType"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizePoolType(value: string | null) { - if (value === null) { - this.unset("prizePoolType"); - } else { - this.set("prizePoolType", Value.fromString(value as string)); - } - } - - get compoundPrizePool(): string | null { - let value = this.get("compoundPrizePool"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set compoundPrizePool(value: string | null) { - if (value === null) { - this.unset("compoundPrizePool"); - } else { - this.set("compoundPrizePool", Value.fromString(value as string)); - } - } - - get stakePrizePool(): string | null { - let value = this.get("stakePrizePool"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set stakePrizePool(value: string | null) { - if (value === null) { - this.unset("stakePrizePool"); - } else { - this.set("stakePrizePool", Value.fromString(value as string)); - } - } - - get yieldSourcePrizePool(): string | null { - let value = this.get("yieldSourcePrizePool"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set yieldSourcePrizePool(value: string | null) { - if (value === null) { - this.unset("yieldSourcePrizePool"); - } else { - this.set("yieldSourcePrizePool", Value.fromString(value as string)); - } - } - - get reserveFeeControlledToken(): Bytes { - let value = this.get("reserveFeeControlledToken"); - return value.toBytes(); - } - - set reserveFeeControlledToken(value: Bytes) { - this.set("reserveFeeControlledToken", Value.fromBytes(value)); - } - - get sablierStream(): string | null { - let value = this.get("sablierStream"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set sablierStream(value: string | null) { - if (value === null) { - this.unset("sablierStream"); - } else { - this.set("sablierStream", Value.fromString(value as string)); - } - } - - get underlyingCollateralToken(): Bytes | null { - let value = this.get("underlyingCollateralToken"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set underlyingCollateralToken(value: Bytes | null) { - if (value === null) { - this.unset("underlyingCollateralToken"); - } else { - this.set("underlyingCollateralToken", Value.fromBytes(value as Bytes)); - } - } - - get underlyingCollateralDecimals(): BigInt | null { - let value = this.get("underlyingCollateralDecimals"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set underlyingCollateralDecimals(value: BigInt | null) { - if (value === null) { - this.unset("underlyingCollateralDecimals"); - } else { - this.set( - "underlyingCollateralDecimals", - Value.fromBigInt(value as BigInt) - ); - } - } - - get underlyingCollateralName(): string | null { - let value = this.get("underlyingCollateralName"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set underlyingCollateralName(value: string | null) { - if (value === null) { - this.unset("underlyingCollateralName"); - } else { - this.set("underlyingCollateralName", Value.fromString(value as string)); - } - } - - get underlyingCollateralSymbol(): string | null { - let value = this.get("underlyingCollateralSymbol"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set underlyingCollateralSymbol(value: string | null) { - if (value === null) { - this.unset("underlyingCollateralSymbol"); - } else { - this.set("underlyingCollateralSymbol", Value.fromString(value as string)); - } - } - - get maxExitFeeMantissa(): BigInt { - let value = this.get("maxExitFeeMantissa"); - return value.toBigInt(); - } - - set maxExitFeeMantissa(value: BigInt) { - this.set("maxExitFeeMantissa", Value.fromBigInt(value)); - } - - get maxTimelockDuration(): BigInt { - let value = this.get("maxTimelockDuration"); - return value.toBigInt(); - } - - set maxTimelockDuration(value: BigInt) { - this.set("maxTimelockDuration", Value.fromBigInt(value)); - } - - get timelockTotalSupply(): BigInt | null { - let value = this.get("timelockTotalSupply"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set timelockTotalSupply(value: BigInt | null) { - if (value === null) { - this.unset("timelockTotalSupply"); - } else { - this.set("timelockTotalSupply", Value.fromBigInt(value as BigInt)); - } - } - - get liquidityCap(): BigInt { - let value = this.get("liquidityCap"); - return value.toBigInt(); - } - - set liquidityCap(value: BigInt) { - this.set("liquidityCap", Value.fromBigInt(value)); - } - - get cumulativePrizeGross(): BigInt { - let value = this.get("cumulativePrizeGross"); - return value.toBigInt(); - } - - set cumulativePrizeGross(value: BigInt) { - this.set("cumulativePrizeGross", Value.fromBigInt(value)); - } - - get cumulativePrizeReserveFee(): BigInt { - let value = this.get("cumulativePrizeReserveFee"); - return value.toBigInt(); - } - - set cumulativePrizeReserveFee(value: BigInt) { - this.set("cumulativePrizeReserveFee", Value.fromBigInt(value)); - } - - get cumulativePrizeNet(): BigInt { - let value = this.get("cumulativePrizeNet"); - return value.toBigInt(); - } - - set cumulativePrizeNet(value: BigInt) { - this.set("cumulativePrizeNet", Value.fromBigInt(value)); - } - - get currentPrizeId(): BigInt { - let value = this.get("currentPrizeId"); - return value.toBigInt(); - } - - set currentPrizeId(value: BigInt) { - this.set("currentPrizeId", Value.fromBigInt(value)); - } - - get currentState(): string { - let value = this.get("currentState"); - return value.toString(); - } - - set currentState(value: string) { - this.set("currentState", Value.fromString(value)); - } - - get prizes(): Array { - let value = this.get("prizes"); - return value.toStringArray(); - } - - set prizes(value: Array) { - this.set("prizes", Value.fromStringArray(value)); - } - - get tokenCreditRates(): Array { - let value = this.get("tokenCreditRates"); - return value.toStringArray(); - } - - set tokenCreditRates(value: Array) { - this.set("tokenCreditRates", Value.fromStringArray(value)); - } - - get tokenCreditBalances(): Array { - let value = this.get("tokenCreditBalances"); - return value.toStringArray(); - } - - set tokenCreditBalances(value: Array) { - this.set("tokenCreditBalances", Value.fromStringArray(value)); - } - - get prizePoolAccounts(): Array { - let value = this.get("prizePoolAccounts"); - return value.toStringArray(); - } - - set prizePoolAccounts(value: Array) { - this.set("prizePoolAccounts", Value.fromStringArray(value)); - } - - get controlledTokens(): Array { - let value = this.get("controlledTokens"); - return value.toStringArray(); - } - - set controlledTokens(value: Array) { - this.set("controlledTokens", Value.fromStringArray(value)); - } -} - -export class CompoundPrizePool extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save CompoundPrizePool entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save CompoundPrizePool entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("CompoundPrizePool", id.toString(), this); - } - - static load(id: string): CompoundPrizePool | null { - return store.get("CompoundPrizePool", id) as CompoundPrizePool | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get cToken(): Bytes | null { - let value = this.get("cToken"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set cToken(value: Bytes | null) { - if (value === null) { - this.unset("cToken"); - } else { - this.set("cToken", Value.fromBytes(value as Bytes)); - } - } -} - -export class StakePrizePool extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save StakePrizePool entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save StakePrizePool entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("StakePrizePool", id.toString(), this); - } - - static load(id: string): StakePrizePool | null { - return store.get("StakePrizePool", id) as StakePrizePool | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get stakeToken(): Bytes | null { - let value = this.get("stakeToken"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set stakeToken(value: Bytes | null) { - if (value === null) { - this.unset("stakeToken"); - } else { - this.set("stakeToken", Value.fromBytes(value as Bytes)); - } - } -} - -export class YieldSourcePrizePool extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save YieldSourcePrizePool entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save YieldSourcePrizePool entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("YieldSourcePrizePool", id.toString(), this); - } - - static load(id: string): YieldSourcePrizePool | null { - return store.get("YieldSourcePrizePool", id) as YieldSourcePrizePool | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get yieldSource(): Bytes | null { - let value = this.get("yieldSource"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set yieldSource(value: Bytes | null) { - if (value === null) { - this.unset("yieldSource"); - } else { - this.set("yieldSource", Value.fromBytes(value as Bytes)); - } - } -} - -export class PrizeStrategy extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save PrizeStrategy entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save PrizeStrategy entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("PrizeStrategy", id.toString(), this); - } - - static load(id: string): PrizeStrategy | null { - return store.get("PrizeStrategy", id) as PrizeStrategy | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get singleRandomWinner(): string | null { - let value = this.get("singleRandomWinner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set singleRandomWinner(value: string | null) { - if (value === null) { - this.unset("singleRandomWinner"); - } else { - this.set("singleRandomWinner", Value.fromString(value as string)); - } - } - - get multipleWinners(): string | null { - let value = this.get("multipleWinners"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set multipleWinners(value: string | null) { - if (value === null) { - this.unset("multipleWinners"); - } else { - this.set("multipleWinners", Value.fromString(value as string)); - } - } -} - -export class SingleRandomWinnerPrizeStrategy extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save SingleRandomWinnerPrizeStrategy entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save SingleRandomWinnerPrizeStrategy entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("SingleRandomWinnerPrizeStrategy", id.toString(), this); - } - - static load(id: string): SingleRandomWinnerPrizeStrategy | null { - return store.get( - "SingleRandomWinnerPrizeStrategy", - id - ) as SingleRandomWinnerPrizeStrategy | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get owner(): Bytes | null { - let value = this.get("owner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set owner(value: Bytes | null) { - if (value === null) { - this.unset("owner"); - } else { - this.set("owner", Value.fromBytes(value as Bytes)); - } - } - - get tokenListener(): string | null { - let value = this.get("tokenListener"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set tokenListener(value: string | null) { - if (value === null) { - this.unset("tokenListener"); - } else { - this.set("tokenListener", Value.fromString(value as string)); - } - } - - get prizePool(): string | null { - let value = this.get("prizePool"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizePool(value: string | null) { - if (value === null) { - this.unset("prizePool"); - } else { - this.set("prizePool", Value.fromString(value as string)); - } - } - - get rng(): Bytes | null { - let value = this.get("rng"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set rng(value: Bytes | null) { - if (value === null) { - this.unset("rng"); - } else { - this.set("rng", Value.fromBytes(value as Bytes)); - } - } - - get ticket(): string | null { - let value = this.get("ticket"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set ticket(value: string | null) { - if (value === null) { - this.unset("ticket"); - } else { - this.set("ticket", Value.fromString(value as string)); - } - } - - get sponsorship(): string | null { - let value = this.get("sponsorship"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set sponsorship(value: string | null) { - if (value === null) { - this.unset("sponsorship"); - } else { - this.set("sponsorship", Value.fromString(value as string)); - } - } - - get prizePeriodSeconds(): BigInt { - let value = this.get("prizePeriodSeconds"); - return value.toBigInt(); - } - - set prizePeriodSeconds(value: BigInt) { - this.set("prizePeriodSeconds", Value.fromBigInt(value)); - } - - get prizePeriodStartedAt(): BigInt { - let value = this.get("prizePeriodStartedAt"); - return value.toBigInt(); - } - - set prizePeriodStartedAt(value: BigInt) { - this.set("prizePeriodStartedAt", Value.fromBigInt(value)); - } - - get prizePeriodEndAt(): BigInt { - let value = this.get("prizePeriodEndAt"); - return value.toBigInt(); - } - - set prizePeriodEndAt(value: BigInt) { - this.set("prizePeriodEndAt", Value.fromBigInt(value)); - } - - get externalErc20Awards(): Array { - let value = this.get("externalErc20Awards"); - return value.toStringArray(); - } - - set externalErc20Awards(value: Array) { - this.set("externalErc20Awards", Value.fromStringArray(value)); - } - - get externalErc721Awards(): Array { - let value = this.get("externalErc721Awards"); - return value.toStringArray(); - } - - set externalErc721Awards(value: Array) { - this.set("externalErc721Awards", Value.fromStringArray(value)); - } -} - -export class Prize extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save Prize entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save Prize entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("Prize", id.toString(), this); - } - - static load(id: string): Prize | null { - return store.get("Prize", id) as Prize | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePool(): string { - let value = this.get("prizePool"); - return value.toString(); - } - - set prizePool(value: string) { - this.set("prizePool", Value.fromString(value)); - } - - get awardStartOperator(): Bytes | null { - let value = this.get("awardStartOperator"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set awardStartOperator(value: Bytes | null) { - if (value === null) { - this.unset("awardStartOperator"); - } else { - this.set("awardStartOperator", Value.fromBytes(value as Bytes)); - } - } - - get awardedOperator(): Bytes | null { - let value = this.get("awardedOperator"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set awardedOperator(value: Bytes | null) { - if (value === null) { - this.unset("awardedOperator"); - } else { - this.set("awardedOperator", Value.fromBytes(value as Bytes)); - } - } - - get prizePeriodStartedTimestamp(): BigInt | null { - let value = this.get("prizePeriodStartedTimestamp"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set prizePeriodStartedTimestamp(value: BigInt | null) { - if (value === null) { - this.unset("prizePeriodStartedTimestamp"); - } else { - this.set( - "prizePeriodStartedTimestamp", - Value.fromBigInt(value as BigInt) - ); - } - } - - get lockBlock(): BigInt | null { - let value = this.get("lockBlock"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set lockBlock(value: BigInt | null) { - if (value === null) { - this.unset("lockBlock"); - } else { - this.set("lockBlock", Value.fromBigInt(value as BigInt)); - } - } - - get awardedBlock(): BigInt | null { - let value = this.get("awardedBlock"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set awardedBlock(value: BigInt | null) { - if (value === null) { - this.unset("awardedBlock"); - } else { - this.set("awardedBlock", Value.fromBigInt(value as BigInt)); - } - } - - get awardedTimestamp(): BigInt | null { - let value = this.get("awardedTimestamp"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set awardedTimestamp(value: BigInt | null) { - if (value === null) { - this.unset("awardedTimestamp"); - } else { - this.set("awardedTimestamp", Value.fromBigInt(value as BigInt)); - } - } - - get rngRequestId(): BigInt | null { - let value = this.get("rngRequestId"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set rngRequestId(value: BigInt | null) { - if (value === null) { - this.unset("rngRequestId"); - } else { - this.set("rngRequestId", Value.fromBigInt(value as BigInt)); - } - } - - get randomNumber(): BigInt | null { - let value = this.get("randomNumber"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set randomNumber(value: BigInt | null) { - if (value === null) { - this.unset("randomNumber"); - } else { - this.set("randomNumber", Value.fromBigInt(value as BigInt)); - } - } - - get numberOfSubWinners(): BigInt | null { - let value = this.get("numberOfSubWinners"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set numberOfSubWinners(value: BigInt | null) { - if (value === null) { - this.unset("numberOfSubWinners"); - } else { - this.set("numberOfSubWinners", Value.fromBigInt(value as BigInt)); - } - } - - get totalTicketSupply(): BigInt | null { - let value = this.get("totalTicketSupply"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set totalTicketSupply(value: BigInt | null) { - if (value === null) { - this.unset("totalTicketSupply"); - } else { - this.set("totalTicketSupply", Value.fromBigInt(value as BigInt)); - } - } - - get awardedControlledTokens(): Array { - let value = this.get("awardedControlledTokens"); - return value.toStringArray(); - } - - set awardedControlledTokens(value: Array) { - this.set("awardedControlledTokens", Value.fromStringArray(value)); - } - - get awardedExternalErc20Tokens(): Array { - let value = this.get("awardedExternalErc20Tokens"); - return value.toStringArray(); - } - - set awardedExternalErc20Tokens(value: Array) { - this.set("awardedExternalErc20Tokens", Value.fromStringArray(value)); - } - - get awardedExternalErc721Nfts(): Array { - let value = this.get("awardedExternalErc721Nfts"); - return value.toStringArray(); - } - - set awardedExternalErc721Nfts(value: Array) { - this.set("awardedExternalErc721Nfts", Value.fromStringArray(value)); - } -} - -export class AwardedControlledToken extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save AwardedControlledToken entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save AwardedControlledToken entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("AwardedControlledToken", id.toString(), this); - } - - static load(id: string): AwardedControlledToken | null { - return store.get( - "AwardedControlledToken", - id - ) as AwardedControlledToken | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get winner(): Bytes { - let value = this.get("winner"); - return value.toBytes(); - } - - set winner(value: Bytes) { - this.set("winner", Value.fromBytes(value)); - } - - get amount(): BigInt { - let value = this.get("amount"); - return value.toBigInt(); - } - - set amount(value: BigInt) { - this.set("amount", Value.fromBigInt(value)); - } - - get token(): string { - let value = this.get("token"); - return value.toString(); - } - - set token(value: string) { - this.set("token", Value.fromString(value)); - } - - get prize(): string { - let value = this.get("prize"); - return value.toString(); - } - - set prize(value: string) { - this.set("prize", Value.fromString(value)); - } -} - -export class AwardedExternalErc20Token extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save AwardedExternalErc20Token entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save AwardedExternalErc20Token entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("AwardedExternalErc20Token", id.toString(), this); - } - - static load(id: string): AwardedExternalErc20Token | null { - return store.get( - "AwardedExternalErc20Token", - id - ) as AwardedExternalErc20Token | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get name(): string | null { - let value = this.get("name"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set name(value: string | null) { - if (value === null) { - this.unset("name"); - } else { - this.set("name", Value.fromString(value as string)); - } - } - - get symbol(): string | null { - let value = this.get("symbol"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set symbol(value: string | null) { - if (value === null) { - this.unset("symbol"); - } else { - this.set("symbol", Value.fromString(value as string)); - } - } - - get decimals(): BigInt | null { - let value = this.get("decimals"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set decimals(value: BigInt | null) { - if (value === null) { - this.unset("decimals"); - } else { - this.set("decimals", Value.fromBigInt(value as BigInt)); - } - } - - get balanceAwarded(): BigInt | null { - let value = this.get("balanceAwarded"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set balanceAwarded(value: BigInt | null) { - if (value === null) { - this.unset("balanceAwarded"); - } else { - this.set("balanceAwarded", Value.fromBigInt(value as BigInt)); - } - } - - get prize(): string { - let value = this.get("prize"); - return value.toString(); - } - - set prize(value: string) { - this.set("prize", Value.fromString(value)); - } - - get winner(): Bytes | null { - let value = this.get("winner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set winner(value: Bytes | null) { - if (value === null) { - this.unset("winner"); - } else { - this.set("winner", Value.fromBytes(value as Bytes)); - } - } -} - -export class AwardedExternalErc721Nft extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save AwardedExternalErc721Nft entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save AwardedExternalErc721Nft entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("AwardedExternalErc721Nft", id.toString(), this); - } - - static load(id: string): AwardedExternalErc721Nft | null { - return store.get( - "AwardedExternalErc721Nft", - id - ) as AwardedExternalErc721Nft | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get tokenIds(): Array | null { - let value = this.get("tokenIds"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigIntArray(); - } - } - - set tokenIds(value: Array | null) { - if (value === null) { - this.unset("tokenIds"); - } else { - this.set("tokenIds", Value.fromBigIntArray(value as Array)); - } - } - - get prize(): string | null { - let value = this.get("prize"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prize(value: string | null) { - if (value === null) { - this.unset("prize"); - } else { - this.set("prize", Value.fromString(value as string)); - } - } - - get winner(): Bytes | null { - let value = this.get("winner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set winner(value: Bytes | null) { - if (value === null) { - this.unset("winner"); - } else { - this.set("winner", Value.fromBytes(value as Bytes)); - } - } -} - -export class ControlledToken extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save ControlledToken entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save ControlledToken entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("ControlledToken", id.toString(), this); - } - - static load(id: string): ControlledToken | null { - return store.get("ControlledToken", id) as ControlledToken | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get name(): string { - let value = this.get("name"); - return value.toString(); - } - - set name(value: string) { - this.set("name", Value.fromString(value)); - } - - get symbol(): string { - let value = this.get("symbol"); - return value.toString(); - } - - set symbol(value: string) { - this.set("symbol", Value.fromString(value)); - } - - get decimals(): BigInt | null { - let value = this.get("decimals"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set decimals(value: BigInt | null) { - if (value === null) { - this.unset("decimals"); - } else { - this.set("decimals", Value.fromBigInt(value as BigInt)); - } - } - - get controller(): string | null { - let value = this.get("controller"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set controller(value: string | null) { - if (value === null) { - this.unset("controller"); - } else { - this.set("controller", Value.fromString(value as string)); - } - } - - get totalSupply(): BigInt { - let value = this.get("totalSupply"); - return value.toBigInt(); - } - - set totalSupply(value: BigInt) { - this.set("totalSupply", Value.fromBigInt(value)); - } - - get numberOfHolders(): BigInt { - let value = this.get("numberOfHolders"); - return value.toBigInt(); - } - - set numberOfHolders(value: BigInt) { - this.set("numberOfHolders", Value.fromBigInt(value)); - } - - get balances(): Array { - let value = this.get("balances"); - return value.toStringArray(); - } - - set balances(value: Array) { - this.set("balances", Value.fromStringArray(value)); - } -} - -export class ControlledTokenBalance extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save ControlledTokenBalance entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save ControlledTokenBalance entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("ControlledTokenBalance", id.toString(), this); - } - - static load(id: string): ControlledTokenBalance | null { - return store.get( - "ControlledTokenBalance", - id - ) as ControlledTokenBalance | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get account(): string { - let value = this.get("account"); - return value.toString(); - } - - set account(value: string) { - this.set("account", Value.fromString(value)); - } - - get controlledToken(): string { - let value = this.get("controlledToken"); - return value.toString(); - } - - set controlledToken(value: string) { - this.set("controlledToken", Value.fromString(value)); - } - - get balance(): BigInt | null { - let value = this.get("balance"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set balance(value: BigInt | null) { - if (value === null) { - this.unset("balance"); - } else { - this.set("balance", Value.fromBigInt(value as BigInt)); - } - } -} - -export class SingleRandomWinnerExternalErc20Award extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save SingleRandomWinnerExternalErc20Award entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save SingleRandomWinnerExternalErc20Award entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("SingleRandomWinnerExternalErc20Award", id.toString(), this); - } - - static load(id: string): SingleRandomWinnerExternalErc20Award | null { - return store.get( - "SingleRandomWinnerExternalErc20Award", - id - ) as SingleRandomWinnerExternalErc20Award | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get name(): string | null { - let value = this.get("name"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set name(value: string | null) { - if (value === null) { - this.unset("name"); - } else { - this.set("name", Value.fromString(value as string)); - } - } - - get symbol(): string | null { - let value = this.get("symbol"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set symbol(value: string | null) { - if (value === null) { - this.unset("symbol"); - } else { - this.set("symbol", Value.fromString(value as string)); - } - } - - get decimals(): BigInt | null { - let value = this.get("decimals"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set decimals(value: BigInt | null) { - if (value === null) { - this.unset("decimals"); - } else { - this.set("decimals", Value.fromBigInt(value as BigInt)); - } - } - - get prizeStrategy(): string | null { - let value = this.get("prizeStrategy"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizeStrategy(value: string | null) { - if (value === null) { - this.unset("prizeStrategy"); - } else { - this.set("prizeStrategy", Value.fromString(value as string)); - } - } -} - -export class SingleRandomWinnerExternalErc721Award extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save SingleRandomWinnerExternalErc721Award entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save SingleRandomWinnerExternalErc721Award entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("SingleRandomWinnerExternalErc721Award", id.toString(), this); - } - - static load(id: string): SingleRandomWinnerExternalErc721Award | null { - return store.get( - "SingleRandomWinnerExternalErc721Award", - id - ) as SingleRandomWinnerExternalErc721Award | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get tokenIds(): Array | null { - let value = this.get("tokenIds"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigIntArray(); - } - } - - set tokenIds(value: Array | null) { - if (value === null) { - this.unset("tokenIds"); - } else { - this.set("tokenIds", Value.fromBigIntArray(value as Array)); - } - } - - get prizeStrategy(): string | null { - let value = this.get("prizeStrategy"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizeStrategy(value: string | null) { - if (value === null) { - this.unset("prizeStrategy"); - } else { - this.set("prizeStrategy", Value.fromString(value as string)); - } - } -} - -export class PrizePoolAccount extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save PrizePoolAccount entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save PrizePoolAccount entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("PrizePoolAccount", id.toString(), this); - } - - static load(id: string): PrizePoolAccount | null { - return store.get("PrizePoolAccount", id) as PrizePoolAccount | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePool(): string { - let value = this.get("prizePool"); - return value.toString(); - } - - set prizePool(value: string) { - this.set("prizePool", Value.fromString(value)); - } - - get account(): string { - let value = this.get("account"); - return value.toString(); - } - - set account(value: string) { - this.set("account", Value.fromString(value)); - } - - get timelockedBalance(): BigInt { - let value = this.get("timelockedBalance"); - return value.toBigInt(); - } - - set timelockedBalance(value: BigInt) { - this.set("timelockedBalance", Value.fromBigInt(value)); - } - - get unlockTimestamp(): BigInt { - let value = this.get("unlockTimestamp"); - return value.toBigInt(); - } - - set unlockTimestamp(value: BigInt) { - this.set("unlockTimestamp", Value.fromBigInt(value)); - } -} - -export class Account extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save Account entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save Account entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("Account", id.toString(), this); - } - - static load(id: string): Account | null { - return store.get("Account", id) as Account | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePoolAccounts(): Array { - let value = this.get("prizePoolAccounts"); - return value.toStringArray(); - } - - set prizePoolAccounts(value: Array) { - this.set("prizePoolAccounts", Value.fromStringArray(value)); - } - - get controlledTokenBalances(): Array | null { - let value = this.get("controlledTokenBalances"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toStringArray(); - } - } - - set controlledTokenBalances(value: Array | null) { - if (value === null) { - this.unset("controlledTokenBalances"); - } else { - this.set( - "controlledTokenBalances", - Value.fromStringArray(value as Array) - ); - } - } -} - -export class CreditRate extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save CreditRate entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save CreditRate entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("CreditRate", id.toString(), this); - } - - static load(id: string): CreditRate | null { - return store.get("CreditRate", id) as CreditRate | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePool(): string { - let value = this.get("prizePool"); - return value.toString(); - } - - set prizePool(value: string) { - this.set("prizePool", Value.fromString(value)); - } - - get creditLimitMantissa(): BigInt { - let value = this.get("creditLimitMantissa"); - return value.toBigInt(); - } - - set creditLimitMantissa(value: BigInt) { - this.set("creditLimitMantissa", Value.fromBigInt(value)); - } - - get creditRateMantissa(): BigInt { - let value = this.get("creditRateMantissa"); - return value.toBigInt(); - } - - set creditRateMantissa(value: BigInt) { - this.set("creditRateMantissa", Value.fromBigInt(value)); - } -} - -export class CreditBalance extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save CreditBalance entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save CreditBalance entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("CreditBalance", id.toString(), this); - } - - static load(id: string): CreditBalance | null { - return store.get("CreditBalance", id) as CreditBalance | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get prizePool(): string { - let value = this.get("prizePool"); - return value.toString(); - } - - set prizePool(value: string) { - this.set("prizePool", Value.fromString(value)); - } - - get balance(): BigInt | null { - let value = this.get("balance"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set balance(value: BigInt | null) { - if (value === null) { - this.unset("balance"); - } else { - this.set("balance", Value.fromBigInt(value as BigInt)); - } - } - - get timestamp(): BigInt | null { - let value = this.get("timestamp"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set timestamp(value: BigInt | null) { - if (value === null) { - this.unset("timestamp"); - } else { - this.set("timestamp", Value.fromBigInt(value as BigInt)); - } - } - - get initialized(): boolean { - let value = this.get("initialized"); - return value.toBoolean(); - } - - set initialized(value: boolean) { - this.set("initialized", Value.fromBoolean(value)); - } -} - -export class DripTokenPlayer extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save DripTokenPlayer entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save DripTokenPlayer entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("DripTokenPlayer", id.toString(), this); - } - - static load(id: string): DripTokenPlayer | null { - return store.get("DripTokenPlayer", id) as DripTokenPlayer | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get comptroller(): string { - let value = this.get("comptroller"); - return value.toString(); - } - - set comptroller(value: string) { - this.set("comptroller", Value.fromString(value)); - } - - get dripToken(): Bytes { - let value = this.get("dripToken"); - return value.toBytes(); - } - - set dripToken(value: Bytes) { - this.set("dripToken", Value.fromBytes(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get balance(): BigInt { - let value = this.get("balance"); - return value.toBigInt(); - } - - set balance(value: BigInt) { - this.set("balance", Value.fromBigInt(value)); - } -} - -export class BalanceDripPlayer extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save BalanceDripPlayer entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save BalanceDripPlayer entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("BalanceDripPlayer", id.toString(), this); - } - - static load(id: string): BalanceDripPlayer | null { - return store.get("BalanceDripPlayer", id) as BalanceDripPlayer | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get balanceDrip(): string { - let value = this.get("balanceDrip"); - return value.toString(); - } - - set balanceDrip(value: string) { - this.set("balanceDrip", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } -} - -export class BalanceDrip extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save BalanceDrip entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save BalanceDrip entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("BalanceDrip", id.toString(), this); - } - - static load(id: string): BalanceDrip | null { - return store.get("BalanceDrip", id) as BalanceDrip | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get comptroller(): string { - let value = this.get("comptroller"); - return value.toString(); - } - - set comptroller(value: string) { - this.set("comptroller", Value.fromString(value)); - } - - get sourceAddress(): Bytes { - let value = this.get("sourceAddress"); - return value.toBytes(); - } - - set sourceAddress(value: Bytes) { - this.set("sourceAddress", Value.fromBytes(value)); - } - - get measureToken(): Bytes { - let value = this.get("measureToken"); - return value.toBytes(); - } - - set measureToken(value: Bytes) { - this.set("measureToken", Value.fromBytes(value)); - } - - get dripToken(): Bytes { - let value = this.get("dripToken"); - return value.toBytes(); - } - - set dripToken(value: Bytes) { - this.set("dripToken", Value.fromBytes(value)); - } - - get dripRatePerSecond(): BigInt | null { - let value = this.get("dripRatePerSecond"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set dripRatePerSecond(value: BigInt | null) { - if (value === null) { - this.unset("dripRatePerSecond"); - } else { - this.set("dripRatePerSecond", Value.fromBigInt(value as BigInt)); - } - } - - get exchangeRateMantissa(): BigInt | null { - let value = this.get("exchangeRateMantissa"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set exchangeRateMantissa(value: BigInt | null) { - if (value === null) { - this.unset("exchangeRateMantissa"); - } else { - this.set("exchangeRateMantissa", Value.fromBigInt(value as BigInt)); - } - } - - get timestamp(): BigInt | null { - let value = this.get("timestamp"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set timestamp(value: BigInt | null) { - if (value === null) { - this.unset("timestamp"); - } else { - this.set("timestamp", Value.fromBigInt(value as BigInt)); - } - } - - get players(): Array { - let value = this.get("players"); - return value.toStringArray(); - } - - set players(value: Array) { - this.set("players", Value.fromStringArray(value)); - } - - get deactivated(): boolean { - let value = this.get("deactivated"); - return value.toBoolean(); - } - - set deactivated(value: boolean) { - this.set("deactivated", Value.fromBoolean(value)); - } -} - -export class VolumeDripPlayer extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save VolumeDripPlayer entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save VolumeDripPlayer entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("VolumeDripPlayer", id.toString(), this); - } - - static load(id: string): VolumeDripPlayer | null { - return store.get("VolumeDripPlayer", id) as VolumeDripPlayer | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get volumeDrip(): string { - let value = this.get("volumeDrip"); - return value.toString(); - } - - set volumeDrip(value: string) { - this.set("volumeDrip", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get periodIndex(): BigInt { - let value = this.get("periodIndex"); - return value.toBigInt(); - } - - set periodIndex(value: BigInt) { - this.set("periodIndex", Value.fromBigInt(value)); - } - - get balance(): BigInt { - let value = this.get("balance"); - return value.toBigInt(); - } - - set balance(value: BigInt) { - this.set("balance", Value.fromBigInt(value)); - } -} - -export class VolumeDripPeriod extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save VolumeDripPeriod entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save VolumeDripPeriod entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("VolumeDripPeriod", id.toString(), this); - } - - static load(id: string): VolumeDripPeriod | null { - return store.get("VolumeDripPeriod", id) as VolumeDripPeriod | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get volumeDrip(): string { - let value = this.get("volumeDrip"); - return value.toString(); - } - - set volumeDrip(value: string) { - this.set("volumeDrip", Value.fromString(value)); - } - - get periodIndex(): BigInt { - let value = this.get("periodIndex"); - return value.toBigInt(); - } - - set periodIndex(value: BigInt) { - this.set("periodIndex", Value.fromBigInt(value)); - } - - get totalSupply(): BigInt | null { - let value = this.get("totalSupply"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set totalSupply(value: BigInt | null) { - if (value === null) { - this.unset("totalSupply"); - } else { - this.set("totalSupply", Value.fromBigInt(value as BigInt)); - } - } - - get dripAmount(): BigInt | null { - let value = this.get("dripAmount"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set dripAmount(value: BigInt | null) { - if (value === null) { - this.unset("dripAmount"); - } else { - this.set("dripAmount", Value.fromBigInt(value as BigInt)); - } - } - - get endTime(): BigInt | null { - let value = this.get("endTime"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set endTime(value: BigInt | null) { - if (value === null) { - this.unset("endTime"); - } else { - this.set("endTime", Value.fromBigInt(value as BigInt)); - } - } - - get isDripping(): boolean { - let value = this.get("isDripping"); - return value.toBoolean(); - } - - set isDripping(value: boolean) { - this.set("isDripping", Value.fromBoolean(value)); - } -} - -export class VolumeDrip extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save VolumeDrip entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save VolumeDrip entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("VolumeDrip", id.toString(), this); - } - - static load(id: string): VolumeDrip | null { - return store.get("VolumeDrip", id) as VolumeDrip | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get comptroller(): string { - let value = this.get("comptroller"); - return value.toString(); - } - - set comptroller(value: string) { - this.set("comptroller", Value.fromString(value)); - } - - get sourceAddress(): Bytes { - let value = this.get("sourceAddress"); - return value.toBytes(); - } - - set sourceAddress(value: Bytes) { - this.set("sourceAddress", Value.fromBytes(value)); - } - - get measureToken(): Bytes { - let value = this.get("measureToken"); - return value.toBytes(); - } - - set measureToken(value: Bytes) { - this.set("measureToken", Value.fromBytes(value)); - } - - get dripToken(): Bytes { - let value = this.get("dripToken"); - return value.toBytes(); - } - - set dripToken(value: Bytes) { - this.set("dripToken", Value.fromBytes(value)); - } - - get referral(): boolean { - let value = this.get("referral"); - return value.toBoolean(); - } - - set referral(value: boolean) { - this.set("referral", Value.fromBoolean(value)); - } - - get periodSeconds(): BigInt | null { - let value = this.get("periodSeconds"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set periodSeconds(value: BigInt | null) { - if (value === null) { - this.unset("periodSeconds"); - } else { - this.set("periodSeconds", Value.fromBigInt(value as BigInt)); - } - } - - get dripAmount(): BigInt | null { - let value = this.get("dripAmount"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set dripAmount(value: BigInt | null) { - if (value === null) { - this.unset("dripAmount"); - } else { - this.set("dripAmount", Value.fromBigInt(value as BigInt)); - } - } - - get periodCount(): BigInt | null { - let value = this.get("periodCount"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set periodCount(value: BigInt | null) { - if (value === null) { - this.unset("periodCount"); - } else { - this.set("periodCount", Value.fromBigInt(value as BigInt)); - } - } - - get deposits(): Array { - let value = this.get("deposits"); - return value.toStringArray(); - } - - set deposits(value: Array) { - this.set("deposits", Value.fromStringArray(value)); - } - - get periods(): Array { - let value = this.get("periods"); - return value.toStringArray(); - } - - set periods(value: Array) { - this.set("periods", Value.fromStringArray(value)); - } - - get deactivated(): boolean { - let value = this.get("deactivated"); - return value.toBoolean(); - } - - set deactivated(value: boolean) { - this.set("deactivated", Value.fromBoolean(value)); - } -} - -export class MultipleWinnersPrizeStrategy extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save MultipleWinnersPrizeStrategy entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save MultipleWinnersPrizeStrategy entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("MultipleWinnersPrizeStrategy", id.toString(), this); - } - - static load(id: string): MultipleWinnersPrizeStrategy | null { - return store.get( - "MultipleWinnersPrizeStrategy", - id - ) as MultipleWinnersPrizeStrategy | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get owner(): Bytes | null { - let value = this.get("owner"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set owner(value: Bytes | null) { - if (value === null) { - this.unset("owner"); - } else { - this.set("owner", Value.fromBytes(value as Bytes)); - } - } - - get numberOfWinners(): BigInt | null { - let value = this.get("numberOfWinners"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set numberOfWinners(value: BigInt | null) { - if (value === null) { - this.unset("numberOfWinners"); - } else { - this.set("numberOfWinners", Value.fromBigInt(value as BigInt)); - } - } - - get splitExternalERC20Awards(): boolean { - let value = this.get("splitExternalERC20Awards"); - return value.toBoolean(); - } - - set splitExternalERC20Awards(value: boolean) { - this.set("splitExternalERC20Awards", Value.fromBoolean(value)); - } - - get tokenListener(): Bytes | null { - let value = this.get("tokenListener"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set tokenListener(value: Bytes | null) { - if (value === null) { - this.unset("tokenListener"); - } else { - this.set("tokenListener", Value.fromBytes(value as Bytes)); - } - } - - get prizePool(): string | null { - let value = this.get("prizePool"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizePool(value: string | null) { - if (value === null) { - this.unset("prizePool"); - } else { - this.set("prizePool", Value.fromString(value as string)); - } - } - - get rng(): Bytes | null { - let value = this.get("rng"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBytes(); - } - } - - set rng(value: Bytes | null) { - if (value === null) { - this.unset("rng"); - } else { - this.set("rng", Value.fromBytes(value as Bytes)); - } - } - - get ticket(): string | null { - let value = this.get("ticket"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set ticket(value: string | null) { - if (value === null) { - this.unset("ticket"); - } else { - this.set("ticket", Value.fromString(value as string)); - } - } - - get sponsorship(): string | null { - let value = this.get("sponsorship"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set sponsorship(value: string | null) { - if (value === null) { - this.unset("sponsorship"); - } else { - this.set("sponsorship", Value.fromString(value as string)); - } - } - - get prizePeriodSeconds(): BigInt { - let value = this.get("prizePeriodSeconds"); - return value.toBigInt(); - } - - set prizePeriodSeconds(value: BigInt) { - this.set("prizePeriodSeconds", Value.fromBigInt(value)); - } - - get prizePeriodStartedAt(): BigInt { - let value = this.get("prizePeriodStartedAt"); - return value.toBigInt(); - } - - set prizePeriodStartedAt(value: BigInt) { - this.set("prizePeriodStartedAt", Value.fromBigInt(value)); - } - - get prizePeriodEndAt(): BigInt { - let value = this.get("prizePeriodEndAt"); - return value.toBigInt(); - } - - set prizePeriodEndAt(value: BigInt) { - this.set("prizePeriodEndAt", Value.fromBigInt(value)); - } - - get externalErc20Awards(): Array { - let value = this.get("externalErc20Awards"); - return value.toStringArray(); - } - - set externalErc20Awards(value: Array) { - this.set("externalErc20Awards", Value.fromStringArray(value)); - } - - get externalErc721Awards(): Array { - let value = this.get("externalErc721Awards"); - return value.toStringArray(); - } - - set externalErc721Awards(value: Array) { - this.set("externalErc721Awards", Value.fromStringArray(value)); - } -} - -export class MultipleWinnersExternalErc20Award extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save MultipleWinnersExternalErc20Award entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save MultipleWinnersExternalErc20Award entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("MultipleWinnersExternalErc20Award", id.toString(), this); - } - - static load(id: string): MultipleWinnersExternalErc20Award | null { - return store.get( - "MultipleWinnersExternalErc20Award", - id - ) as MultipleWinnersExternalErc20Award | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get name(): string | null { - let value = this.get("name"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set name(value: string | null) { - if (value === null) { - this.unset("name"); - } else { - this.set("name", Value.fromString(value as string)); - } - } - - get symbol(): string | null { - let value = this.get("symbol"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set symbol(value: string | null) { - if (value === null) { - this.unset("symbol"); - } else { - this.set("symbol", Value.fromString(value as string)); - } - } - - get decimals(): BigInt | null { - let value = this.get("decimals"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set decimals(value: BigInt | null) { - if (value === null) { - this.unset("decimals"); - } else { - this.set("decimals", Value.fromBigInt(value as BigInt)); - } - } - - get balanceAwarded(): BigInt | null { - let value = this.get("balanceAwarded"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigInt(); - } - } - - set balanceAwarded(value: BigInt | null) { - if (value === null) { - this.unset("balanceAwarded"); - } else { - this.set("balanceAwarded", Value.fromBigInt(value as BigInt)); - } - } - - get prizeStrategy(): string | null { - let value = this.get("prizeStrategy"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizeStrategy(value: string | null) { - if (value === null) { - this.unset("prizeStrategy"); - } else { - this.set("prizeStrategy", Value.fromString(value as string)); - } - } -} - -export class MultipleWinnersExternalErc721Award extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert( - id !== null, - "Cannot save MultipleWinnersExternalErc721Award entity without an ID" - ); - assert( - id.kind == ValueKind.STRING, - "Cannot save MultipleWinnersExternalErc721Award entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("MultipleWinnersExternalErc721Award", id.toString(), this); - } - - static load(id: string): MultipleWinnersExternalErc721Award | null { - return store.get( - "MultipleWinnersExternalErc721Award", - id - ) as MultipleWinnersExternalErc721Award | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get address(): Bytes { - let value = this.get("address"); - return value.toBytes(); - } - - set address(value: Bytes) { - this.set("address", Value.fromBytes(value)); - } - - get tokenIds(): Array | null { - let value = this.get("tokenIds"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toBigIntArray(); - } - } - - set tokenIds(value: Array | null) { - if (value === null) { - this.unset("tokenIds"); - } else { - this.set("tokenIds", Value.fromBigIntArray(value as Array)); - } - } - - get prizeStrategy(): string | null { - let value = this.get("prizeStrategy"); - if (value === null || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set prizeStrategy(value: string | null) { - if (value === null) { - this.unset("prizeStrategy"); - } else { - this.set("prizeStrategy", Value.fromString(value as string)); - } - } -} diff --git a/generated/templates.ts b/generated/templates.ts deleted file mode 100644 index f4d859d..0000000 --- a/generated/templates.ts +++ /dev/null @@ -1,133 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - Address, - DataSourceTemplate, - DataSourceContext -} from "@graphprotocol/graph-ts"; - -export class SingleRandomWinner extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("SingleRandomWinner", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "SingleRandomWinner", - [address.toHex()], - context - ); - } -} - -export class StakePrizePool extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("StakePrizePool", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "StakePrizePool", - [address.toHex()], - context - ); - } -} - -export class CompoundPrizePool extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("CompoundPrizePool", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "CompoundPrizePool", - [address.toHex()], - context - ); - } -} - -export class YieldSourcePrizePool extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("YieldSourcePrizePool", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "YieldSourcePrizePool", - [address.toHex()], - context - ); - } -} - -export class PrizePool_v3 extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("PrizePool_v3", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "PrizePool_v3", - [address.toHex()], - context - ); - } -} - -export class PrizePool_v3_1_0 extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("PrizePool_v3_1_0", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "PrizePool_v3_1_0", - [address.toHex()], - context - ); - } -} - -export class PrizePool_v3_0_1 extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("PrizePool_v3_0_1", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "PrizePool_v3_0_1", - [address.toHex()], - context - ); - } -} - -export class ControlledToken extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("ControlledToken", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "ControlledToken", - [address.toHex()], - context - ); - } -} - -export class MultipleWinners extends DataSourceTemplate { - static create(address: Address): void { - DataSourceTemplate.create("MultipleWinners", [address.toHex()]); - } - - static createWithContext(address: Address, context: DataSourceContext): void { - DataSourceTemplate.createWithContext( - "MultipleWinners", - [address.toHex()], - context - ); - } -} diff --git a/generated/templates/CompoundPrizePool/CompoundPrizePool.ts b/generated/templates/CompoundPrizePool/CompoundPrizePool.ts deleted file mode 100644 index e565a59..0000000 --- a/generated/templates/CompoundPrizePool/CompoundPrizePool.ts +++ /dev/null @@ -1,2189 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AwardCaptured extends ethereum.Event { - get params(): AwardCaptured__Params { - return new AwardCaptured__Params(this); - } -} - -export class AwardCaptured__Params { - _event: AwardCaptured; - - constructor(event: AwardCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class Awarded extends ethereum.Event { - get params(): Awarded__Params { - return new Awarded__Params(this); - } -} - -export class Awarded__Params { - _event: Awarded; - - constructor(event: Awarded) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC20 extends ethereum.Event { - get params(): AwardedExternalERC20__Params { - return new AwardedExternalERC20__Params(this); - } -} - -export class AwardedExternalERC20__Params { - _event: AwardedExternalERC20; - - constructor(event: AwardedExternalERC20) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC721 extends ethereum.Event { - get params(): AwardedExternalERC721__Params { - return new AwardedExternalERC721__Params(this); - } -} - -export class AwardedExternalERC721__Params { - _event: AwardedExternalERC721; - - constructor(event: AwardedExternalERC721) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._event.parameters[2].value.toBigIntArray(); - } -} - -export class CompoundPrizePoolInitialized extends ethereum.Event { - get params(): CompoundPrizePoolInitialized__Params { - return new CompoundPrizePoolInitialized__Params(this); - } -} - -export class CompoundPrizePoolInitialized__Params { - _event: CompoundPrizePoolInitialized; - - constructor(event: CompoundPrizePoolInitialized) { - this._event = event; - } - - get cToken(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ControlledTokenAdded extends ethereum.Event { - get params(): ControlledTokenAdded__Params { - return new ControlledTokenAdded__Params(this); - } -} - -export class ControlledTokenAdded__Params { - _event: ControlledTokenAdded; - - constructor(event: ControlledTokenAdded) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class CreditBurned extends ethereum.Event { - get params(): CreditBurned__Params { - return new CreditBurned__Params(this); - } -} - -export class CreditBurned__Params { - _event: CreditBurned; - - constructor(event: CreditBurned) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditMinted extends ethereum.Event { - get params(): CreditMinted__Params { - return new CreditMinted__Params(this); - } -} - -export class CreditMinted__Params { - _event: CreditMinted; - - constructor(event: CreditMinted) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditPlanSet extends ethereum.Event { - get params(): CreditPlanSet__Params { - return new CreditPlanSet__Params(this); - } -} - -export class CreditPlanSet__Params { - _event: CreditPlanSet; - - constructor(event: CreditPlanSet) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get creditLimitMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get creditRateMantissa(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Deposited extends ethereum.Event { - get params(): Deposited__Params { - return new Deposited__Params(this); - } -} - -export class Deposited__Params { - _event: Deposited; - - constructor(event: Deposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get referrer(): Address { - return this._event.parameters[4].value.toAddress(); - } -} - -export class Initialized extends ethereum.Event { - get params(): Initialized__Params { - return new Initialized__Params(this); - } -} - -export class Initialized__Params { - _event: Initialized; - - constructor(event: Initialized) { - this._event = event; - } - - get reserveRegistry(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get maxExitFeeMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get maxTimelockDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class InstantWithdrawal extends ethereum.Event { - get params(): InstantWithdrawal__Params { - return new InstantWithdrawal__Params(this); - } -} - -export class InstantWithdrawal__Params { - _event: InstantWithdrawal; - - constructor(event: InstantWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get exitFee(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class LiquidityCapSet extends ethereum.Event { - get params(): LiquidityCapSet__Params { - return new LiquidityCapSet__Params(this); - } -} - -export class LiquidityCapSet__Params { - _event: LiquidityCapSet; - - constructor(event: LiquidityCapSet) { - this._event = event; - } - - get liquidityCap(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class PrizeStrategySet extends ethereum.Event { - get params(): PrizeStrategySet__Params { - return new PrizeStrategySet__Params(this); - } -} - -export class PrizeStrategySet__Params { - _event: PrizeStrategySet; - - constructor(event: PrizeStrategySet) { - this._event = event; - } - - get prizeStrategy(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ReserveFeeCaptured extends ethereum.Event { - get params(): ReserveFeeCaptured__Params { - return new ReserveFeeCaptured__Params(this); - } -} - -export class ReserveFeeCaptured__Params { - _event: ReserveFeeCaptured; - - constructor(event: ReserveFeeCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ReserveWithdrawal extends ethereum.Event { - get params(): ReserveWithdrawal__Params { - return new ReserveWithdrawal__Params(this); - } -} - -export class ReserveWithdrawal__Params { - _event: ReserveWithdrawal; - - constructor(event: ReserveWithdrawal) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class TimelockDeposited extends ethereum.Event { - get params(): TimelockDeposited__Params { - return new TimelockDeposited__Params(this); - } -} - -export class TimelockDeposited__Params { - _event: TimelockDeposited; - - constructor(event: TimelockDeposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TimelockedWithdrawal extends ethereum.Event { - get params(): TimelockedWithdrawal__Params { - return new TimelockedWithdrawal__Params(this); - } -} - -export class TimelockedWithdrawal__Params { - _event: TimelockedWithdrawal; - - constructor(event: TimelockedWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get unlockTimestamp(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } -} - -export class TimelockedWithdrawalSwept extends ethereum.Event { - get params(): TimelockedWithdrawalSwept__Params { - return new TimelockedWithdrawalSwept__Params(this); - } -} - -export class TimelockedWithdrawalSwept__Params { - _event: TimelockedWithdrawalSwept; - - constructor(event: TimelockedWithdrawalSwept) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TransferredExternalERC20 extends ethereum.Event { - get params(): TransferredExternalERC20__Params { - return new TransferredExternalERC20__Params(this); - } -} - -export class TransferredExternalERC20__Params { - _event: TransferredExternalERC20; - - constructor(event: TransferredExternalERC20) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CompoundPrizePool__calculateEarlyExitFeeResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class CompoundPrizePool__calculateTimelockDurationResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class CompoundPrizePool__creditPlanOfResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class CompoundPrizePool extends ethereum.SmartContract { - static bind(address: Address): CompoundPrizePool { - return new CompoundPrizePool("CompoundPrizePool", address); - } - - accountedBalance(): BigInt { - let result = super.call( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_accountedBalance(): ethereum.CallResult { - let result = super.tryCall( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - awardBalance(): BigInt { - let result = super.call("awardBalance", "awardBalance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_awardBalance(): ethereum.CallResult { - let result = super.tryCall("awardBalance", "awardBalance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balance(): BigInt { - let result = super.call("balance", "balance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_balance(): ethereum.CallResult { - let result = super.tryCall("balance", "balance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balanceOfCredit(user: Address, controlledToken: Address): BigInt { - let result = super.call( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_balanceOfCredit( - user: Address, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - cToken(): Address { - let result = super.call("cToken", "cToken():(address)", []); - - return result[0].toAddress(); - } - - try_cToken(): ethereum.CallResult
{ - let result = super.tryCall("cToken", "cToken():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): CompoundPrizePool__calculateEarlyExitFeeResult { - let result = super.call( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new CompoundPrizePool__calculateEarlyExitFeeResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new CompoundPrizePool__calculateEarlyExitFeeResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - calculateReserveFee(amount: BigInt): BigInt { - let result = super.call( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - - return result[0].toBigInt(); - } - - try_calculateReserveFee(amount: BigInt): ethereum.CallResult { - let result = super.tryCall( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): CompoundPrizePool__calculateTimelockDurationResult { - let result = super.call( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new CompoundPrizePool__calculateTimelockDurationResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new CompoundPrizePool__calculateTimelockDurationResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - canAwardExternal(_externalToken: Address): boolean { - let result = super.call( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - - return result[0].toBoolean(); - } - - try_canAwardExternal(_externalToken: Address): ethereum.CallResult { - let result = super.tryCall( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - captureAwardBalance(): BigInt { - let result = super.call( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_captureAwardBalance(): ethereum.CallResult { - let result = super.tryCall( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - creditPlanOf( - controlledToken: Address - ): CompoundPrizePool__creditPlanOfResult { - let result = super.call( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - - return new CompoundPrizePool__creditPlanOfResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_creditPlanOf( - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new CompoundPrizePool__creditPlanOfResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): BigInt { - let result = super.call( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - - return result[0].toBigInt(); - } - - try_estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - liquidityCap(): BigInt { - let result = super.call("liquidityCap", "liquidityCap():(uint256)", []); - - return result[0].toBigInt(); - } - - try_liquidityCap(): ethereum.CallResult { - let result = super.tryCall("liquidityCap", "liquidityCap():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxExitFeeMantissa(): BigInt { - let result = super.call( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxExitFeeMantissa(): ethereum.CallResult { - let result = super.tryCall( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxTimelockDuration(): BigInt { - let result = super.call( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxTimelockDuration(): ethereum.CallResult { - let result = super.tryCall( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - prizeStrategy(): Address { - let result = super.call("prizeStrategy", "prizeStrategy():(address)", []); - - return result[0].toAddress(); - } - - try_prizeStrategy(): ethereum.CallResult
{ - let result = super.tryCall( - "prizeStrategy", - "prizeStrategy():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveRegistry(): Address { - let result = super.call( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_reserveRegistry(): ethereum.CallResult
{ - let result = super.tryCall( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveTotalSupply(): BigInt { - let result = super.call( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_reserveTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - sweepTimelockBalances(users: Array
): BigInt { - let result = super.call( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - - return result[0].toBigInt(); - } - - try_sweepTimelockBalances( - users: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceAvailableAt(user: Address): BigInt { - let result = super.call( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceAvailableAt(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceOf(user: Address): BigInt { - let result = super.call( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceOf(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockTotalSupply(): BigInt { - let result = super.call( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_timelockTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - token(): Address { - let result = super.call("token", "token():(address)", []); - - return result[0].toAddress(); - } - - try_token(): ethereum.CallResult
{ - let result = super.tryCall("token", "token():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - tokens(): Array
{ - let result = super.call("tokens", "tokens():(address[])", []); - - return result[0].toAddressArray(); - } - - try_tokens(): ethereum.CallResult> { - let result = super.tryCall("tokens", "tokens():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): BigInt { - let result = super.call( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawReserve(to: Address): BigInt { - let result = super.call( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - - return result[0].toBigInt(); - } - - try_withdrawReserve(to: Address): ethereum.CallResult { - let result = super.tryCall( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): BigInt { - let result = super.call( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } -} - -export class AddControlledTokenCall extends ethereum.Call { - get inputs(): AddControlledTokenCall__Inputs { - return new AddControlledTokenCall__Inputs(this); - } - - get outputs(): AddControlledTokenCall__Outputs { - return new AddControlledTokenCall__Outputs(this); - } -} - -export class AddControlledTokenCall__Inputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class AddControlledTokenCall__Outputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } -} - -export class AwardCall extends ethereum.Call { - get inputs(): AwardCall__Inputs { - return new AwardCall__Inputs(this); - } - - get outputs(): AwardCall__Outputs { - return new AwardCall__Outputs(this); - } -} - -export class AwardCall__Inputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class AwardCall__Outputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } -} - -export class AwardExternalERC20Call extends ethereum.Call { - get inputs(): AwardExternalERC20Call__Inputs { - return new AwardExternalERC20Call__Inputs(this); - } - - get outputs(): AwardExternalERC20Call__Outputs { - return new AwardExternalERC20Call__Outputs(this); - } -} - -export class AwardExternalERC20Call__Inputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class AwardExternalERC20Call__Outputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } -} - -export class AwardExternalERC721Call extends ethereum.Call { - get inputs(): AwardExternalERC721Call__Inputs { - return new AwardExternalERC721Call__Inputs(this); - } - - get outputs(): AwardExternalERC721Call__Outputs { - return new AwardExternalERC721Call__Outputs(this); - } -} - -export class AwardExternalERC721Call__Inputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._call.inputValues[2].value.toBigIntArray(); - } -} - -export class AwardExternalERC721Call__Outputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } -} - -export class BalanceCall extends ethereum.Call { - get inputs(): BalanceCall__Inputs { - return new BalanceCall__Inputs(this); - } - - get outputs(): BalanceCall__Outputs { - return new BalanceCall__Outputs(this); - } -} - -export class BalanceCall__Inputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } -} - -export class BalanceCall__Outputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BalanceOfCreditCall extends ethereum.Call { - get inputs(): BalanceOfCreditCall__Inputs { - return new BalanceOfCreditCall__Inputs(this); - } - - get outputs(): BalanceOfCreditCall__Outputs { - return new BalanceOfCreditCall__Outputs(this); - } -} - -export class BalanceOfCreditCall__Inputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class BalanceOfCreditCall__Outputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CalculateEarlyExitFeeCall extends ethereum.Call { - get inputs(): CalculateEarlyExitFeeCall__Inputs { - return new CalculateEarlyExitFeeCall__Inputs(this); - } - - get outputs(): CalculateEarlyExitFeeCall__Outputs { - return new CalculateEarlyExitFeeCall__Outputs(this); - } -} - -export class CalculateEarlyExitFeeCall__Inputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateEarlyExitFeeCall__Outputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get exitFee(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall extends ethereum.Call { - get inputs(): CalculateTimelockDurationCall__Inputs { - return new CalculateTimelockDurationCall__Inputs(this); - } - - get outputs(): CalculateTimelockDurationCall__Outputs { - return new CalculateTimelockDurationCall__Outputs(this); - } -} - -export class CalculateTimelockDurationCall__Inputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall__Outputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get durationSeconds(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CaptureAwardBalanceCall extends ethereum.Call { - get inputs(): CaptureAwardBalanceCall__Inputs { - return new CaptureAwardBalanceCall__Inputs(this); - } - - get outputs(): CaptureAwardBalanceCall__Outputs { - return new CaptureAwardBalanceCall__Outputs(this); - } -} - -export class CaptureAwardBalanceCall__Inputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } -} - -export class CaptureAwardBalanceCall__Outputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class DepositToCall extends ethereum.Call { - get inputs(): DepositToCall__Inputs { - return new DepositToCall__Inputs(this); - } - - get outputs(): DepositToCall__Outputs { - return new DepositToCall__Outputs(this); - } -} - -export class DepositToCall__Inputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class DepositToCall__Outputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _reserveRegistry(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _controlledTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _maxExitFeeMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _maxTimelockDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class Initialize1Call extends ethereum.Call { - get inputs(): Initialize1Call__Inputs { - return new Initialize1Call__Inputs(this); - } - - get outputs(): Initialize1Call__Outputs { - return new Initialize1Call__Outputs(this); - } -} - -export class Initialize1Call__Inputs { - _call: Initialize1Call; - - constructor(call: Initialize1Call) { - this._call = call; - } - - get _reserveRegistry(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _controlledTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _maxExitFeeMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _maxTimelockDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get _cToken(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class Initialize1Call__Outputs { - _call: Initialize1Call; - - constructor(call: Initialize1Call) { - this._call = call; - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetCreditPlanOfCall extends ethereum.Call { - get inputs(): SetCreditPlanOfCall__Inputs { - return new SetCreditPlanOfCall__Inputs(this); - } - - get outputs(): SetCreditPlanOfCall__Outputs { - return new SetCreditPlanOfCall__Outputs(this); - } -} - -export class SetCreditPlanOfCall__Inputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _creditRateMantissa(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _creditLimitMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetCreditPlanOfCall__Outputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } -} - -export class SetLiquidityCapCall extends ethereum.Call { - get inputs(): SetLiquidityCapCall__Inputs { - return new SetLiquidityCapCall__Inputs(this); - } - - get outputs(): SetLiquidityCapCall__Outputs { - return new SetLiquidityCapCall__Outputs(this); - } -} - -export class SetLiquidityCapCall__Inputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } - - get _liquidityCap(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetLiquidityCapCall__Outputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } -} - -export class SetPrizeStrategyCall extends ethereum.Call { - get inputs(): SetPrizeStrategyCall__Inputs { - return new SetPrizeStrategyCall__Inputs(this); - } - - get outputs(): SetPrizeStrategyCall__Outputs { - return new SetPrizeStrategyCall__Outputs(this); - } -} - -export class SetPrizeStrategyCall__Inputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } - - get _prizeStrategy(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetPrizeStrategyCall__Outputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } -} - -export class SweepTimelockBalancesCall extends ethereum.Call { - get inputs(): SweepTimelockBalancesCall__Inputs { - return new SweepTimelockBalancesCall__Inputs(this); - } - - get outputs(): SweepTimelockBalancesCall__Outputs { - return new SweepTimelockBalancesCall__Outputs(this); - } -} - -export class SweepTimelockBalancesCall__Inputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get users(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class SweepTimelockBalancesCall__Outputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class TimelockDepositToCall extends ethereum.Call { - get inputs(): TimelockDepositToCall__Inputs { - return new TimelockDepositToCall__Inputs(this); - } - - get outputs(): TimelockDepositToCall__Outputs { - return new TimelockDepositToCall__Outputs(this); - } -} - -export class TimelockDepositToCall__Inputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class TimelockDepositToCall__Outputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } -} - -export class TransferExternalERC20Call extends ethereum.Call { - get inputs(): TransferExternalERC20Call__Inputs { - return new TransferExternalERC20Call__Inputs(this); - } - - get outputs(): TransferExternalERC20Call__Outputs { - return new TransferExternalERC20Call__Outputs(this); - } -} - -export class TransferExternalERC20Call__Inputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferExternalERC20Call__Outputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} - -export class WithdrawInstantlyFromCall extends ethereum.Call { - get inputs(): WithdrawInstantlyFromCall__Inputs { - return new WithdrawInstantlyFromCall__Inputs(this); - } - - get outputs(): WithdrawInstantlyFromCall__Outputs { - return new WithdrawInstantlyFromCall__Outputs(this); - } -} - -export class WithdrawInstantlyFromCall__Inputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get maximumExitFee(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class WithdrawInstantlyFromCall__Outputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawReserveCall extends ethereum.Call { - get inputs(): WithdrawReserveCall__Inputs { - return new WithdrawReserveCall__Inputs(this); - } - - get outputs(): WithdrawReserveCall__Outputs { - return new WithdrawReserveCall__Outputs(this); - } -} - -export class WithdrawReserveCall__Inputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class WithdrawReserveCall__Outputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawWithTimelockFromCall extends ethereum.Call { - get inputs(): WithdrawWithTimelockFromCall__Inputs { - return new WithdrawWithTimelockFromCall__Inputs(this); - } - - get outputs(): WithdrawWithTimelockFromCall__Outputs { - return new WithdrawWithTimelockFromCall__Outputs(this); - } -} - -export class WithdrawWithTimelockFromCall__Inputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class WithdrawWithTimelockFromCall__Outputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} diff --git a/generated/templates/CompoundPrizePool/ControlledToken.ts b/generated/templates/CompoundPrizePool/ControlledToken.ts deleted file mode 100644 index 91686f3..0000000 --- a/generated/templates/CompoundPrizePool/ControlledToken.ts +++ /dev/null @@ -1,672 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class Approval extends ethereum.Event { - get params(): Approval__Params { - return new Approval__Params(this); - } -} - -export class Approval__Params { - _event: Approval; - - constructor(event: Approval) { - this._event = event; - } - - get owner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get spender(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Transfer extends ethereum.Event { - get params(): Transfer__Params { - return new Transfer__Params(this); - } -} - -export class Transfer__Params { - _event: Transfer; - - constructor(event: Transfer) { - this._event = event; - } - - get from(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ControlledToken extends ethereum.SmartContract { - static bind(address: Address): ControlledToken { - return new ControlledToken("ControlledToken", address); - } - - allowance(owner: Address, spender: Address): BigInt { - let result = super.call( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - - return result[0].toBigInt(); - } - - try_allowance(owner: Address, spender: Address): ethereum.CallResult { - let result = super.tryCall( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - approve(spender: Address, amount: BigInt): boolean { - let result = super.call("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_approve(spender: Address, amount: BigInt): ethereum.CallResult { - let result = super.tryCall("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - balanceOf(account: Address): BigInt { - let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - - return result[0].toBigInt(); - } - - try_balanceOf(account: Address): ethereum.CallResult { - let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - controller(): Address { - let result = super.call("controller", "controller():(address)", []); - - return result[0].toAddress(); - } - - try_controller(): ethereum.CallResult
{ - let result = super.tryCall("controller", "controller():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - decimals(): i32 { - let result = super.call("decimals", "decimals():(uint8)", []); - - return result[0].toI32(); - } - - try_decimals(): ethereum.CallResult { - let result = super.tryCall("decimals", "decimals():(uint8)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - decreaseAllowance(spender: Address, subtractedValue: BigInt): boolean { - let result = super.call( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_decreaseAllowance( - spender: Address, - subtractedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - increaseAllowance(spender: Address, addedValue: BigInt): boolean { - let result = super.call( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_increaseAllowance( - spender: Address, - addedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - name(): string { - let result = super.call("name", "name():(string)", []); - - return result[0].toString(); - } - - try_name(): ethereum.CallResult { - let result = super.tryCall("name", "name():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - symbol(): string { - let result = super.call("symbol", "symbol():(string)", []); - - return result[0].toString(); - } - - try_symbol(): ethereum.CallResult { - let result = super.tryCall("symbol", "symbol():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - totalSupply(): BigInt { - let result = super.call("totalSupply", "totalSupply():(uint256)", []); - - return result[0].toBigInt(); - } - - try_totalSupply(): ethereum.CallResult { - let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - transfer(recipient: Address, amount: BigInt): boolean { - let result = super.call("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_transfer( - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - transferFrom(sender: Address, recipient: Address, amount: BigInt): boolean { - let result = super.call( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return result[0].toBoolean(); - } - - try_transferFrom( - sender: Address, - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } -} - -export class ApproveCall extends ethereum.Call { - get inputs(): ApproveCall__Inputs { - return new ApproveCall__Inputs(this); - } - - get outputs(): ApproveCall__Outputs { - return new ApproveCall__Outputs(this); - } -} - -export class ApproveCall__Inputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ApproveCall__Outputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class ControllerBurnCall extends ethereum.Call { - get inputs(): ControllerBurnCall__Inputs { - return new ControllerBurnCall__Inputs(this); - } - - get outputs(): ControllerBurnCall__Outputs { - return new ControllerBurnCall__Outputs(this); - } -} - -export class ControllerBurnCall__Inputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerBurnCall__Outputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } -} - -export class ControllerBurnFromCall extends ethereum.Call { - get inputs(): ControllerBurnFromCall__Inputs { - return new ControllerBurnFromCall__Inputs(this); - } - - get outputs(): ControllerBurnFromCall__Outputs { - return new ControllerBurnFromCall__Outputs(this); - } -} - -export class ControllerBurnFromCall__Inputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } - - get _operator(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ControllerBurnFromCall__Outputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } -} - -export class ControllerMintCall extends ethereum.Call { - get inputs(): ControllerMintCall__Inputs { - return new ControllerMintCall__Inputs(this); - } - - get outputs(): ControllerMintCall__Outputs { - return new ControllerMintCall__Outputs(this); - } -} - -export class ControllerMintCall__Inputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerMintCall__Outputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } -} - -export class DecreaseAllowanceCall extends ethereum.Call { - get inputs(): DecreaseAllowanceCall__Inputs { - return new DecreaseAllowanceCall__Inputs(this); - } - - get outputs(): DecreaseAllowanceCall__Outputs { - return new DecreaseAllowanceCall__Outputs(this); - } -} - -export class DecreaseAllowanceCall__Inputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get subtractedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class DecreaseAllowanceCall__Outputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class IncreaseAllowanceCall extends ethereum.Call { - get inputs(): IncreaseAllowanceCall__Inputs { - return new IncreaseAllowanceCall__Inputs(this); - } - - get outputs(): IncreaseAllowanceCall__Outputs { - return new IncreaseAllowanceCall__Outputs(this); - } -} - -export class IncreaseAllowanceCall__Inputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get addedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class IncreaseAllowanceCall__Outputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _name(): string { - return this._call.inputValues[0].value.toString(); - } - - get _symbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get _decimals(): i32 { - return this._call.inputValues[2].value.toI32(); - } - - get _controller(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class TransferCall extends ethereum.Call { - get inputs(): TransferCall__Inputs { - return new TransferCall__Inputs(this); - } - - get outputs(): TransferCall__Outputs { - return new TransferCall__Outputs(this); - } -} - -export class TransferCall__Inputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get recipient(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class TransferCall__Outputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class TransferFromCall extends ethereum.Call { - get inputs(): TransferFromCall__Inputs { - return new TransferFromCall__Inputs(this); - } - - get outputs(): TransferFromCall__Outputs { - return new TransferFromCall__Outputs(this); - } -} - -export class TransferFromCall__Inputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get sender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get recipient(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferFromCall__Outputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} diff --git a/generated/templates/CompoundPrizePool/PrizePool.ts b/generated/templates/CompoundPrizePool/PrizePool.ts deleted file mode 100644 index 8aabba9..0000000 --- a/generated/templates/CompoundPrizePool/PrizePool.ts +++ /dev/null @@ -1,2108 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AwardCaptured extends ethereum.Event { - get params(): AwardCaptured__Params { - return new AwardCaptured__Params(this); - } -} - -export class AwardCaptured__Params { - _event: AwardCaptured; - - constructor(event: AwardCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class Awarded extends ethereum.Event { - get params(): Awarded__Params { - return new Awarded__Params(this); - } -} - -export class Awarded__Params { - _event: Awarded; - - constructor(event: Awarded) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC20 extends ethereum.Event { - get params(): AwardedExternalERC20__Params { - return new AwardedExternalERC20__Params(this); - } -} - -export class AwardedExternalERC20__Params { - _event: AwardedExternalERC20; - - constructor(event: AwardedExternalERC20) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC721 extends ethereum.Event { - get params(): AwardedExternalERC721__Params { - return new AwardedExternalERC721__Params(this); - } -} - -export class AwardedExternalERC721__Params { - _event: AwardedExternalERC721; - - constructor(event: AwardedExternalERC721) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._event.parameters[2].value.toBigIntArray(); - } -} - -export class ControlledTokenAdded extends ethereum.Event { - get params(): ControlledTokenAdded__Params { - return new ControlledTokenAdded__Params(this); - } -} - -export class ControlledTokenAdded__Params { - _event: ControlledTokenAdded; - - constructor(event: ControlledTokenAdded) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class CreditBurned extends ethereum.Event { - get params(): CreditBurned__Params { - return new CreditBurned__Params(this); - } -} - -export class CreditBurned__Params { - _event: CreditBurned; - - constructor(event: CreditBurned) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditMinted extends ethereum.Event { - get params(): CreditMinted__Params { - return new CreditMinted__Params(this); - } -} - -export class CreditMinted__Params { - _event: CreditMinted; - - constructor(event: CreditMinted) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditPlanSet extends ethereum.Event { - get params(): CreditPlanSet__Params { - return new CreditPlanSet__Params(this); - } -} - -export class CreditPlanSet__Params { - _event: CreditPlanSet; - - constructor(event: CreditPlanSet) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get creditLimitMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get creditRateMantissa(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Deposited extends ethereum.Event { - get params(): Deposited__Params { - return new Deposited__Params(this); - } -} - -export class Deposited__Params { - _event: Deposited; - - constructor(event: Deposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get referrer(): Address { - return this._event.parameters[4].value.toAddress(); - } -} - -export class Initialized extends ethereum.Event { - get params(): Initialized__Params { - return new Initialized__Params(this); - } -} - -export class Initialized__Params { - _event: Initialized; - - constructor(event: Initialized) { - this._event = event; - } - - get reserveRegistry(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get maxExitFeeMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get maxTimelockDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class InstantWithdrawal extends ethereum.Event { - get params(): InstantWithdrawal__Params { - return new InstantWithdrawal__Params(this); - } -} - -export class InstantWithdrawal__Params { - _event: InstantWithdrawal; - - constructor(event: InstantWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get exitFee(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class LiquidityCapSet extends ethereum.Event { - get params(): LiquidityCapSet__Params { - return new LiquidityCapSet__Params(this); - } -} - -export class LiquidityCapSet__Params { - _event: LiquidityCapSet; - - constructor(event: LiquidityCapSet) { - this._event = event; - } - - get liquidityCap(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class PrizeStrategySet extends ethereum.Event { - get params(): PrizeStrategySet__Params { - return new PrizeStrategySet__Params(this); - } -} - -export class PrizeStrategySet__Params { - _event: PrizeStrategySet; - - constructor(event: PrizeStrategySet) { - this._event = event; - } - - get prizeStrategy(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ReserveFeeCaptured extends ethereum.Event { - get params(): ReserveFeeCaptured__Params { - return new ReserveFeeCaptured__Params(this); - } -} - -export class ReserveFeeCaptured__Params { - _event: ReserveFeeCaptured; - - constructor(event: ReserveFeeCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ReserveWithdrawal extends ethereum.Event { - get params(): ReserveWithdrawal__Params { - return new ReserveWithdrawal__Params(this); - } -} - -export class ReserveWithdrawal__Params { - _event: ReserveWithdrawal; - - constructor(event: ReserveWithdrawal) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class TimelockDeposited extends ethereum.Event { - get params(): TimelockDeposited__Params { - return new TimelockDeposited__Params(this); - } -} - -export class TimelockDeposited__Params { - _event: TimelockDeposited; - - constructor(event: TimelockDeposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TimelockedWithdrawal extends ethereum.Event { - get params(): TimelockedWithdrawal__Params { - return new TimelockedWithdrawal__Params(this); - } -} - -export class TimelockedWithdrawal__Params { - _event: TimelockedWithdrawal; - - constructor(event: TimelockedWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get unlockTimestamp(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } -} - -export class TimelockedWithdrawalSwept extends ethereum.Event { - get params(): TimelockedWithdrawalSwept__Params { - return new TimelockedWithdrawalSwept__Params(this); - } -} - -export class TimelockedWithdrawalSwept__Params { - _event: TimelockedWithdrawalSwept; - - constructor(event: TimelockedWithdrawalSwept) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TransferredExternalERC20 extends ethereum.Event { - get params(): TransferredExternalERC20__Params { - return new TransferredExternalERC20__Params(this); - } -} - -export class TransferredExternalERC20__Params { - _event: TransferredExternalERC20; - - constructor(event: TransferredExternalERC20) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class PrizePool__calculateEarlyExitFeeResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool__calculateTimelockDurationResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool__creditPlanOfResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool extends ethereum.SmartContract { - static bind(address: Address): PrizePool { - return new PrizePool("PrizePool", address); - } - - accountedBalance(): BigInt { - let result = super.call( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_accountedBalance(): ethereum.CallResult { - let result = super.tryCall( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - awardBalance(): BigInt { - let result = super.call("awardBalance", "awardBalance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_awardBalance(): ethereum.CallResult { - let result = super.tryCall("awardBalance", "awardBalance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balance(): BigInt { - let result = super.call("balance", "balance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_balance(): ethereum.CallResult { - let result = super.tryCall("balance", "balance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balanceOfCredit(user: Address, controlledToken: Address): BigInt { - let result = super.call( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_balanceOfCredit( - user: Address, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): PrizePool__calculateEarlyExitFeeResult { - let result = super.call( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new PrizePool__calculateEarlyExitFeeResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__calculateEarlyExitFeeResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - calculateReserveFee(amount: BigInt): BigInt { - let result = super.call( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - - return result[0].toBigInt(); - } - - try_calculateReserveFee(amount: BigInt): ethereum.CallResult { - let result = super.tryCall( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): PrizePool__calculateTimelockDurationResult { - let result = super.call( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new PrizePool__calculateTimelockDurationResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__calculateTimelockDurationResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - canAwardExternal(_externalToken: Address): boolean { - let result = super.call( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - - return result[0].toBoolean(); - } - - try_canAwardExternal(_externalToken: Address): ethereum.CallResult { - let result = super.tryCall( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - captureAwardBalance(): BigInt { - let result = super.call( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_captureAwardBalance(): ethereum.CallResult { - let result = super.tryCall( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - creditPlanOf(controlledToken: Address): PrizePool__creditPlanOfResult { - let result = super.call( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - - return new PrizePool__creditPlanOfResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_creditPlanOf( - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__creditPlanOfResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): BigInt { - let result = super.call( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - - return result[0].toBigInt(); - } - - try_estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - liquidityCap(): BigInt { - let result = super.call("liquidityCap", "liquidityCap():(uint256)", []); - - return result[0].toBigInt(); - } - - try_liquidityCap(): ethereum.CallResult { - let result = super.tryCall("liquidityCap", "liquidityCap():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxExitFeeMantissa(): BigInt { - let result = super.call( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxExitFeeMantissa(): ethereum.CallResult { - let result = super.tryCall( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxTimelockDuration(): BigInt { - let result = super.call( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxTimelockDuration(): ethereum.CallResult { - let result = super.tryCall( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - prizeStrategy(): Address { - let result = super.call("prizeStrategy", "prizeStrategy():(address)", []); - - return result[0].toAddress(); - } - - try_prizeStrategy(): ethereum.CallResult
{ - let result = super.tryCall( - "prizeStrategy", - "prizeStrategy():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveRegistry(): Address { - let result = super.call( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_reserveRegistry(): ethereum.CallResult
{ - let result = super.tryCall( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveTotalSupply(): BigInt { - let result = super.call( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_reserveTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - sweepTimelockBalances(users: Array
): BigInt { - let result = super.call( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - - return result[0].toBigInt(); - } - - try_sweepTimelockBalances( - users: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceAvailableAt(user: Address): BigInt { - let result = super.call( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceAvailableAt(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceOf(user: Address): BigInt { - let result = super.call( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceOf(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockTotalSupply(): BigInt { - let result = super.call( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_timelockTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - token(): Address { - let result = super.call("token", "token():(address)", []); - - return result[0].toAddress(); - } - - try_token(): ethereum.CallResult
{ - let result = super.tryCall("token", "token():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - tokens(): Array
{ - let result = super.call("tokens", "tokens():(address[])", []); - - return result[0].toAddressArray(); - } - - try_tokens(): ethereum.CallResult> { - let result = super.tryCall("tokens", "tokens():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): BigInt { - let result = super.call( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawReserve(to: Address): BigInt { - let result = super.call( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - - return result[0].toBigInt(); - } - - try_withdrawReserve(to: Address): ethereum.CallResult { - let result = super.tryCall( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): BigInt { - let result = super.call( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } -} - -export class AddControlledTokenCall extends ethereum.Call { - get inputs(): AddControlledTokenCall__Inputs { - return new AddControlledTokenCall__Inputs(this); - } - - get outputs(): AddControlledTokenCall__Outputs { - return new AddControlledTokenCall__Outputs(this); - } -} - -export class AddControlledTokenCall__Inputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class AddControlledTokenCall__Outputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } -} - -export class AwardCall extends ethereum.Call { - get inputs(): AwardCall__Inputs { - return new AwardCall__Inputs(this); - } - - get outputs(): AwardCall__Outputs { - return new AwardCall__Outputs(this); - } -} - -export class AwardCall__Inputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class AwardCall__Outputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } -} - -export class AwardExternalERC20Call extends ethereum.Call { - get inputs(): AwardExternalERC20Call__Inputs { - return new AwardExternalERC20Call__Inputs(this); - } - - get outputs(): AwardExternalERC20Call__Outputs { - return new AwardExternalERC20Call__Outputs(this); - } -} - -export class AwardExternalERC20Call__Inputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class AwardExternalERC20Call__Outputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } -} - -export class AwardExternalERC721Call extends ethereum.Call { - get inputs(): AwardExternalERC721Call__Inputs { - return new AwardExternalERC721Call__Inputs(this); - } - - get outputs(): AwardExternalERC721Call__Outputs { - return new AwardExternalERC721Call__Outputs(this); - } -} - -export class AwardExternalERC721Call__Inputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._call.inputValues[2].value.toBigIntArray(); - } -} - -export class AwardExternalERC721Call__Outputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } -} - -export class BalanceCall extends ethereum.Call { - get inputs(): BalanceCall__Inputs { - return new BalanceCall__Inputs(this); - } - - get outputs(): BalanceCall__Outputs { - return new BalanceCall__Outputs(this); - } -} - -export class BalanceCall__Inputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } -} - -export class BalanceCall__Outputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BalanceOfCreditCall extends ethereum.Call { - get inputs(): BalanceOfCreditCall__Inputs { - return new BalanceOfCreditCall__Inputs(this); - } - - get outputs(): BalanceOfCreditCall__Outputs { - return new BalanceOfCreditCall__Outputs(this); - } -} - -export class BalanceOfCreditCall__Inputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class BalanceOfCreditCall__Outputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CalculateEarlyExitFeeCall extends ethereum.Call { - get inputs(): CalculateEarlyExitFeeCall__Inputs { - return new CalculateEarlyExitFeeCall__Inputs(this); - } - - get outputs(): CalculateEarlyExitFeeCall__Outputs { - return new CalculateEarlyExitFeeCall__Outputs(this); - } -} - -export class CalculateEarlyExitFeeCall__Inputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateEarlyExitFeeCall__Outputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get exitFee(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall extends ethereum.Call { - get inputs(): CalculateTimelockDurationCall__Inputs { - return new CalculateTimelockDurationCall__Inputs(this); - } - - get outputs(): CalculateTimelockDurationCall__Outputs { - return new CalculateTimelockDurationCall__Outputs(this); - } -} - -export class CalculateTimelockDurationCall__Inputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall__Outputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get durationSeconds(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CaptureAwardBalanceCall extends ethereum.Call { - get inputs(): CaptureAwardBalanceCall__Inputs { - return new CaptureAwardBalanceCall__Inputs(this); - } - - get outputs(): CaptureAwardBalanceCall__Outputs { - return new CaptureAwardBalanceCall__Outputs(this); - } -} - -export class CaptureAwardBalanceCall__Inputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } -} - -export class CaptureAwardBalanceCall__Outputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class DepositToCall extends ethereum.Call { - get inputs(): DepositToCall__Inputs { - return new DepositToCall__Inputs(this); - } - - get outputs(): DepositToCall__Outputs { - return new DepositToCall__Outputs(this); - } -} - -export class DepositToCall__Inputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class DepositToCall__Outputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _reserveRegistry(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _controlledTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _maxExitFeeMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _maxTimelockDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetCreditPlanOfCall extends ethereum.Call { - get inputs(): SetCreditPlanOfCall__Inputs { - return new SetCreditPlanOfCall__Inputs(this); - } - - get outputs(): SetCreditPlanOfCall__Outputs { - return new SetCreditPlanOfCall__Outputs(this); - } -} - -export class SetCreditPlanOfCall__Inputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _creditRateMantissa(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _creditLimitMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetCreditPlanOfCall__Outputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } -} - -export class SetLiquidityCapCall extends ethereum.Call { - get inputs(): SetLiquidityCapCall__Inputs { - return new SetLiquidityCapCall__Inputs(this); - } - - get outputs(): SetLiquidityCapCall__Outputs { - return new SetLiquidityCapCall__Outputs(this); - } -} - -export class SetLiquidityCapCall__Inputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } - - get _liquidityCap(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetLiquidityCapCall__Outputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } -} - -export class SetPrizeStrategyCall extends ethereum.Call { - get inputs(): SetPrizeStrategyCall__Inputs { - return new SetPrizeStrategyCall__Inputs(this); - } - - get outputs(): SetPrizeStrategyCall__Outputs { - return new SetPrizeStrategyCall__Outputs(this); - } -} - -export class SetPrizeStrategyCall__Inputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } - - get _prizeStrategy(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetPrizeStrategyCall__Outputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } -} - -export class SweepTimelockBalancesCall extends ethereum.Call { - get inputs(): SweepTimelockBalancesCall__Inputs { - return new SweepTimelockBalancesCall__Inputs(this); - } - - get outputs(): SweepTimelockBalancesCall__Outputs { - return new SweepTimelockBalancesCall__Outputs(this); - } -} - -export class SweepTimelockBalancesCall__Inputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get users(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class SweepTimelockBalancesCall__Outputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class TimelockDepositToCall extends ethereum.Call { - get inputs(): TimelockDepositToCall__Inputs { - return new TimelockDepositToCall__Inputs(this); - } - - get outputs(): TimelockDepositToCall__Outputs { - return new TimelockDepositToCall__Outputs(this); - } -} - -export class TimelockDepositToCall__Inputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class TimelockDepositToCall__Outputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } -} - -export class TransferExternalERC20Call extends ethereum.Call { - get inputs(): TransferExternalERC20Call__Inputs { - return new TransferExternalERC20Call__Inputs(this); - } - - get outputs(): TransferExternalERC20Call__Outputs { - return new TransferExternalERC20Call__Outputs(this); - } -} - -export class TransferExternalERC20Call__Inputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferExternalERC20Call__Outputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} - -export class WithdrawInstantlyFromCall extends ethereum.Call { - get inputs(): WithdrawInstantlyFromCall__Inputs { - return new WithdrawInstantlyFromCall__Inputs(this); - } - - get outputs(): WithdrawInstantlyFromCall__Outputs { - return new WithdrawInstantlyFromCall__Outputs(this); - } -} - -export class WithdrawInstantlyFromCall__Inputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get maximumExitFee(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class WithdrawInstantlyFromCall__Outputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawReserveCall extends ethereum.Call { - get inputs(): WithdrawReserveCall__Inputs { - return new WithdrawReserveCall__Inputs(this); - } - - get outputs(): WithdrawReserveCall__Outputs { - return new WithdrawReserveCall__Outputs(this); - } -} - -export class WithdrawReserveCall__Inputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class WithdrawReserveCall__Outputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawWithTimelockFromCall extends ethereum.Call { - get inputs(): WithdrawWithTimelockFromCall__Inputs { - return new WithdrawWithTimelockFromCall__Inputs(this); - } - - get outputs(): WithdrawWithTimelockFromCall__Outputs { - return new WithdrawWithTimelockFromCall__Outputs(this); - } -} - -export class WithdrawWithTimelockFromCall__Inputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class WithdrawWithTimelockFromCall__Outputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} diff --git a/generated/templates/ControlledToken/ControlledToken.ts b/generated/templates/ControlledToken/ControlledToken.ts deleted file mode 100644 index 91686f3..0000000 --- a/generated/templates/ControlledToken/ControlledToken.ts +++ /dev/null @@ -1,672 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class Approval extends ethereum.Event { - get params(): Approval__Params { - return new Approval__Params(this); - } -} - -export class Approval__Params { - _event: Approval; - - constructor(event: Approval) { - this._event = event; - } - - get owner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get spender(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Transfer extends ethereum.Event { - get params(): Transfer__Params { - return new Transfer__Params(this); - } -} - -export class Transfer__Params { - _event: Transfer; - - constructor(event: Transfer) { - this._event = event; - } - - get from(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ControlledToken extends ethereum.SmartContract { - static bind(address: Address): ControlledToken { - return new ControlledToken("ControlledToken", address); - } - - allowance(owner: Address, spender: Address): BigInt { - let result = super.call( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - - return result[0].toBigInt(); - } - - try_allowance(owner: Address, spender: Address): ethereum.CallResult { - let result = super.tryCall( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - approve(spender: Address, amount: BigInt): boolean { - let result = super.call("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_approve(spender: Address, amount: BigInt): ethereum.CallResult { - let result = super.tryCall("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - balanceOf(account: Address): BigInt { - let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - - return result[0].toBigInt(); - } - - try_balanceOf(account: Address): ethereum.CallResult { - let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - controller(): Address { - let result = super.call("controller", "controller():(address)", []); - - return result[0].toAddress(); - } - - try_controller(): ethereum.CallResult
{ - let result = super.tryCall("controller", "controller():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - decimals(): i32 { - let result = super.call("decimals", "decimals():(uint8)", []); - - return result[0].toI32(); - } - - try_decimals(): ethereum.CallResult { - let result = super.tryCall("decimals", "decimals():(uint8)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - decreaseAllowance(spender: Address, subtractedValue: BigInt): boolean { - let result = super.call( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_decreaseAllowance( - spender: Address, - subtractedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - increaseAllowance(spender: Address, addedValue: BigInt): boolean { - let result = super.call( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_increaseAllowance( - spender: Address, - addedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - name(): string { - let result = super.call("name", "name():(string)", []); - - return result[0].toString(); - } - - try_name(): ethereum.CallResult { - let result = super.tryCall("name", "name():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - symbol(): string { - let result = super.call("symbol", "symbol():(string)", []); - - return result[0].toString(); - } - - try_symbol(): ethereum.CallResult { - let result = super.tryCall("symbol", "symbol():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - totalSupply(): BigInt { - let result = super.call("totalSupply", "totalSupply():(uint256)", []); - - return result[0].toBigInt(); - } - - try_totalSupply(): ethereum.CallResult { - let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - transfer(recipient: Address, amount: BigInt): boolean { - let result = super.call("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_transfer( - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - transferFrom(sender: Address, recipient: Address, amount: BigInt): boolean { - let result = super.call( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return result[0].toBoolean(); - } - - try_transferFrom( - sender: Address, - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } -} - -export class ApproveCall extends ethereum.Call { - get inputs(): ApproveCall__Inputs { - return new ApproveCall__Inputs(this); - } - - get outputs(): ApproveCall__Outputs { - return new ApproveCall__Outputs(this); - } -} - -export class ApproveCall__Inputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ApproveCall__Outputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class ControllerBurnCall extends ethereum.Call { - get inputs(): ControllerBurnCall__Inputs { - return new ControllerBurnCall__Inputs(this); - } - - get outputs(): ControllerBurnCall__Outputs { - return new ControllerBurnCall__Outputs(this); - } -} - -export class ControllerBurnCall__Inputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerBurnCall__Outputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } -} - -export class ControllerBurnFromCall extends ethereum.Call { - get inputs(): ControllerBurnFromCall__Inputs { - return new ControllerBurnFromCall__Inputs(this); - } - - get outputs(): ControllerBurnFromCall__Outputs { - return new ControllerBurnFromCall__Outputs(this); - } -} - -export class ControllerBurnFromCall__Inputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } - - get _operator(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ControllerBurnFromCall__Outputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } -} - -export class ControllerMintCall extends ethereum.Call { - get inputs(): ControllerMintCall__Inputs { - return new ControllerMintCall__Inputs(this); - } - - get outputs(): ControllerMintCall__Outputs { - return new ControllerMintCall__Outputs(this); - } -} - -export class ControllerMintCall__Inputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerMintCall__Outputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } -} - -export class DecreaseAllowanceCall extends ethereum.Call { - get inputs(): DecreaseAllowanceCall__Inputs { - return new DecreaseAllowanceCall__Inputs(this); - } - - get outputs(): DecreaseAllowanceCall__Outputs { - return new DecreaseAllowanceCall__Outputs(this); - } -} - -export class DecreaseAllowanceCall__Inputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get subtractedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class DecreaseAllowanceCall__Outputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class IncreaseAllowanceCall extends ethereum.Call { - get inputs(): IncreaseAllowanceCall__Inputs { - return new IncreaseAllowanceCall__Inputs(this); - } - - get outputs(): IncreaseAllowanceCall__Outputs { - return new IncreaseAllowanceCall__Outputs(this); - } -} - -export class IncreaseAllowanceCall__Inputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get addedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class IncreaseAllowanceCall__Outputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _name(): string { - return this._call.inputValues[0].value.toString(); - } - - get _symbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get _decimals(): i32 { - return this._call.inputValues[2].value.toI32(); - } - - get _controller(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class TransferCall extends ethereum.Call { - get inputs(): TransferCall__Inputs { - return new TransferCall__Inputs(this); - } - - get outputs(): TransferCall__Outputs { - return new TransferCall__Outputs(this); - } -} - -export class TransferCall__Inputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get recipient(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class TransferCall__Outputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class TransferFromCall extends ethereum.Call { - get inputs(): TransferFromCall__Inputs { - return new TransferFromCall__Inputs(this); - } - - get outputs(): TransferFromCall__Outputs { - return new TransferFromCall__Outputs(this); - } -} - -export class TransferFromCall__Inputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get sender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get recipient(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferFromCall__Outputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} diff --git a/generated/templates/SingleRandomWinner/Comptroller.ts b/generated/templates/SingleRandomWinner/Comptroller.ts deleted file mode 100644 index 391003b..0000000 --- a/generated/templates/SingleRandomWinner/Comptroller.ts +++ /dev/null @@ -1,1914 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class BalanceDripActivated extends ethereum.Event { - get params(): BalanceDripActivated__Params { - return new BalanceDripActivated__Params(this); - } -} - -export class BalanceDripActivated__Params { - _event: BalanceDripActivated; - - constructor(event: BalanceDripActivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class BalanceDripDeactivated extends ethereum.Event { - get params(): BalanceDripDeactivated__Params { - return new BalanceDripDeactivated__Params(this); - } -} - -export class BalanceDripDeactivated__Params { - _event: BalanceDripDeactivated; - - constructor(event: BalanceDripDeactivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } -} - -export class BalanceDripDripped extends ethereum.Event { - get params(): BalanceDripDripped__Params { - return new BalanceDripDripped__Params(this); - } -} - -export class BalanceDripDripped__Params { - _event: BalanceDripDripped; - - constructor(event: BalanceDripDripped) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[3].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } -} - -export class BalanceDripRateSet extends ethereum.Event { - get params(): BalanceDripRateSet__Params { - return new BalanceDripRateSet__Params(this); - } -} - -export class BalanceDripRateSet__Params { - _event: BalanceDripRateSet; - - constructor(event: BalanceDripRateSet) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class DripTokenClaimed extends ethereum.Event { - get params(): DripTokenClaimed__Params { - return new DripTokenClaimed__Params(this); - } -} - -export class DripTokenClaimed__Params { - _event: DripTokenClaimed; - - constructor(event: DripTokenClaimed) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class DripTokenDripped extends ethereum.Event { - get params(): DripTokenDripped__Params { - return new DripTokenDripped__Params(this); - } -} - -export class DripTokenDripped__Params { - _event: DripTokenDripped; - - constructor(event: DripTokenDripped) { - this._event = event; - } - - get dripToken(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get user(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class TransferredOut extends ethereum.Event { - get params(): TransferredOut__Params { - return new TransferredOut__Params(this); - } -} - -export class TransferredOut__Params { - _event: TransferredOut; - - constructor(event: TransferredOut) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class VolumeDripActivated extends ethereum.Event { - get params(): VolumeDripActivated__Params { - return new VolumeDripActivated__Params(this); - } -} - -export class VolumeDripActivated__Params { - _event: VolumeDripActivated; - - constructor(event: VolumeDripActivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class VolumeDripDeactivated extends ethereum.Event { - get params(): VolumeDripDeactivated__Params { - return new VolumeDripDeactivated__Params(this); - } -} - -export class VolumeDripDeactivated__Params { - _event: VolumeDripDeactivated; - - constructor(event: VolumeDripDeactivated) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } -} - -export class VolumeDripDripped extends ethereum.Event { - get params(): VolumeDripDripped__Params { - return new VolumeDripDripped__Params(this); - } -} - -export class VolumeDripDripped__Params { - _event: VolumeDripDripped; - - constructor(event: VolumeDripDripped) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get user(): Address { - return this._event.parameters[4].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class VolumeDripPeriodEnded extends ethereum.Event { - get params(): VolumeDripPeriodEnded__Params { - return new VolumeDripPeriodEnded__Params(this); - } -} - -export class VolumeDripPeriodEnded__Params { - _event: VolumeDripPeriodEnded; - - constructor(event: VolumeDripPeriodEnded) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get period(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get totalSupply(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } - - get drippedTokens(): BigInt { - return this._event.parameters[6].value.toBigInt(); - } -} - -export class VolumeDripPeriodStarted extends ethereum.Event { - get params(): VolumeDripPeriodStarted__Params { - return new VolumeDripPeriodStarted__Params(this); - } -} - -export class VolumeDripPeriodStarted__Params { - _event: VolumeDripPeriodStarted; - - constructor(event: VolumeDripPeriodStarted) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get period(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } - - get endTime(): BigInt { - return this._event.parameters[6].value.toBigInt(); - } -} - -export class VolumeDripSet extends ethereum.Event { - get params(): VolumeDripSet__Params { - return new VolumeDripSet__Params(this); - } -} - -export class VolumeDripSet__Params { - _event: VolumeDripSet; - - constructor(event: VolumeDripSet) { - this._event = event; - } - - get source(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get measure(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get dripToken(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._event.parameters[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class Comptroller__balanceOfClaimsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__getBalanceDripResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__getVolumeDripResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__getVolumeDripPeriodResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } -} - -export class Comptroller__updateAndClaimDripsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__updateAndClaimDripsInputPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class Comptroller__updateDripsResultValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class Comptroller__updateDripsInputPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class Comptroller extends ethereum.SmartContract { - static bind(address: Address): Comptroller { - return new Comptroller("Comptroller", address); - } - - balanceOfClaims( - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "balanceOfClaims", - "balanceOfClaims(address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray< - Comptroller__balanceOfClaimsResultValue0Struct - >(); - } - - try_balanceOfClaims( - user: Address, - dripTokens: Array
- ): ethereum.CallResult< - Array - > { - let result = super.tryCall( - "balanceOfClaims", - "balanceOfClaims(address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray() - ); - } - - balanceOfDrip(user: Address, dripToken: Address): BigInt { - let result = super.call( - "balanceOfDrip", - "balanceOfDrip(address,address):(uint256)", - [ethereum.Value.fromAddress(user), ethereum.Value.fromAddress(dripToken)] - ); - - return result[0].toBigInt(); - } - - try_balanceOfDrip( - user: Address, - dripToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "balanceOfDrip", - "balanceOfDrip(address,address):(uint256)", - [ethereum.Value.fromAddress(user), ethereum.Value.fromAddress(dripToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getActiveBalanceDripTokens( - source: Address, - measure: Address - ): Array
{ - let result = super.call( - "getActiveBalanceDripTokens", - "getActiveBalanceDripTokens(address,address):(address[])", - [ethereum.Value.fromAddress(source), ethereum.Value.fromAddress(measure)] - ); - - return result[0].toAddressArray(); - } - - try_getActiveBalanceDripTokens( - source: Address, - measure: Address - ): ethereum.CallResult> { - let result = super.tryCall( - "getActiveBalanceDripTokens", - "getActiveBalanceDripTokens(address,address):(address[])", - [ethereum.Value.fromAddress(source), ethereum.Value.fromAddress(measure)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getActiveVolumeDripTokens( - source: Address, - measure: Address, - isReferral: boolean - ): Array
{ - let result = super.call( - "getActiveVolumeDripTokens", - "getActiveVolumeDripTokens(address,address,bool):(address[])", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return result[0].toAddressArray(); - } - - try_getActiveVolumeDripTokens( - source: Address, - measure: Address, - isReferral: boolean - ): ethereum.CallResult> { - let result = super.tryCall( - "getActiveVolumeDripTokens", - "getActiveVolumeDripTokens(address,address,bool):(address[])", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBalanceDrip( - source: Address, - measure: Address, - dripToken: Address - ): Comptroller__getBalanceDripResult { - let result = super.call( - "getBalanceDrip", - "getBalanceDrip(address,address,address):(uint256,uint128,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken) - ] - ); - - return new Comptroller__getBalanceDripResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getBalanceDrip( - source: Address, - measure: Address, - dripToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getBalanceDrip", - "getBalanceDrip(address,address,address):(uint256,uint128,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getBalanceDripResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getVolumeDrip( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): Comptroller__getVolumeDripResult { - let result = super.call( - "getVolumeDrip", - "getVolumeDrip(address,address,address,bool):(uint256,uint256,uint256)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return new Comptroller__getVolumeDripResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getVolumeDrip( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): ethereum.CallResult { - let result = super.tryCall( - "getVolumeDrip", - "getVolumeDrip(address,address,address,bool):(uint256,uint256,uint256)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getVolumeDripResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getVolumeDripPeriod( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean, - period: i32 - ): Comptroller__getVolumeDripPeriodResult { - let result = super.call( - "getVolumeDripPeriod", - "getVolumeDripPeriod(address,address,address,bool,uint16):(uint112,uint112,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(period)) - ] - ); - - return new Comptroller__getVolumeDripPeriodResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getVolumeDripPeriod( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean, - period: i32 - ): ethereum.CallResult { - let result = super.tryCall( - "getVolumeDripPeriod", - "getVolumeDripPeriod(address,address,address,bool,uint16):(uint112,uint112,uint32)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(period)) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Comptroller__getVolumeDripPeriodResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - isVolumeDripActive( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): boolean { - let result = super.call( - "isVolumeDripActive", - "isVolumeDripActive(address,address,address,bool):(bool)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - - return result[0].toBoolean(); - } - - try_isVolumeDripActive( - source: Address, - measure: Address, - dripToken: Address, - isReferral: boolean - ): ethereum.CallResult { - let result = super.tryCall( - "isVolumeDripActive", - "isVolumeDripActive(address,address,address,bool):(bool)", - [ - ethereum.Value.fromAddress(source), - ethereum.Value.fromAddress(measure), - ethereum.Value.fromAddress(dripToken), - ethereum.Value.fromBoolean(isReferral) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - supportsInterface(interfaceId: Bytes): boolean { - let result = super.call( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - - return result[0].toBoolean(); - } - - try_supportsInterface(interfaceId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - updateAndClaimDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "updateAndClaimDrips", - "updateAndClaimDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray< - Comptroller__updateAndClaimDripsResultValue0Struct - >(); - } - - try_updateAndClaimDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): ethereum.CallResult< - Array - > { - let result = super.tryCall( - "updateAndClaimDrips", - "updateAndClaimDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray< - Comptroller__updateAndClaimDripsResultValue0Struct - >() - ); - } - - updateDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): Array { - let result = super.call( - "updateDrips", - "updateDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - - return result[0].toTupleArray(); - } - - try_updateDrips( - pairs: Array, - user: Address, - dripTokens: Array
- ): ethereum.CallResult> { - let result = super.tryCall( - "updateDrips", - "updateDrips((address,address)[],address,address[]):((address,uint256)[])", - [ - ethereum.Value.fromTupleArray(pairs), - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddressArray(dripTokens) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - value[0].toTupleArray() - ); - } -} - -export class ConstructorCall extends ethereum.Call { - get inputs(): ConstructorCall__Inputs { - return new ConstructorCall__Inputs(this); - } - - get outputs(): ConstructorCall__Outputs { - return new ConstructorCall__Outputs(this); - } -} - -export class ConstructorCall__Inputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class ConstructorCall__Outputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class ActivateBalanceDripCall extends ethereum.Call { - get inputs(): ActivateBalanceDripCall__Inputs { - return new ActivateBalanceDripCall__Inputs(this); - } - - get outputs(): ActivateBalanceDripCall__Outputs { - return new ActivateBalanceDripCall__Outputs(this); - } -} - -export class ActivateBalanceDripCall__Inputs { - _call: ActivateBalanceDripCall; - - constructor(call: ActivateBalanceDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class ActivateBalanceDripCall__Outputs { - _call: ActivateBalanceDripCall; - - constructor(call: ActivateBalanceDripCall) { - this._call = call; - } -} - -export class ActivateVolumeDripCall extends ethereum.Call { - get inputs(): ActivateVolumeDripCall__Inputs { - return new ActivateVolumeDripCall__Inputs(this); - } - - get outputs(): ActivateVolumeDripCall__Outputs { - return new ActivateVolumeDripCall__Outputs(this); - } -} - -export class ActivateVolumeDripCall__Inputs { - _call: ActivateVolumeDripCall; - - constructor(call: ActivateVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get endTime(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } -} - -export class ActivateVolumeDripCall__Outputs { - _call: ActivateVolumeDripCall; - - constructor(call: ActivateVolumeDripCall) { - this._call = call; - } -} - -export class BeforeTokenMintCall extends ethereum.Call { - get inputs(): BeforeTokenMintCall__Inputs { - return new BeforeTokenMintCall__Inputs(this); - } - - get outputs(): BeforeTokenMintCall__Outputs { - return new BeforeTokenMintCall__Outputs(this); - } -} - -export class BeforeTokenMintCall__Inputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get measure(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenMintCall__Outputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get value2(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get measure(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall extends ethereum.Call { - get inputs(): CaptureClaimsForBalanceDripsForPairsCall__Inputs { - return new CaptureClaimsForBalanceDripsForPairsCall__Inputs(this); - } - - get outputs(): CaptureClaimsForBalanceDripsForPairsCall__Outputs { - return new CaptureClaimsForBalanceDripsForPairsCall__Outputs(this); - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall__Inputs { - _call: CaptureClaimsForBalanceDripsForPairsCall; - - constructor(call: CaptureClaimsForBalanceDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - CaptureClaimsForBalanceDripsForPairsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class CaptureClaimsForBalanceDripsForPairsCall__Outputs { - _call: CaptureClaimsForBalanceDripsForPairsCall; - - constructor(call: CaptureClaimsForBalanceDripsForPairsCall) { - this._call = call; - } -} - -export class CaptureClaimsForBalanceDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class ClaimDripCall extends ethereum.Call { - get inputs(): ClaimDripCall__Inputs { - return new ClaimDripCall__Inputs(this); - } - - get outputs(): ClaimDripCall__Outputs { - return new ClaimDripCall__Outputs(this); - } -} - -export class ClaimDripCall__Inputs { - _call: ClaimDripCall; - - constructor(call: ClaimDripCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ClaimDripCall__Outputs { - _call: ClaimDripCall; - - constructor(call: ClaimDripCall) { - this._call = call; - } -} - -export class ClaimDripsCall extends ethereum.Call { - get inputs(): ClaimDripsCall__Inputs { - return new ClaimDripsCall__Inputs(this); - } - - get outputs(): ClaimDripsCall__Outputs { - return new ClaimDripsCall__Outputs(this); - } -} - -export class ClaimDripsCall__Inputs { - _call: ClaimDripsCall; - - constructor(call: ClaimDripsCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } -} - -export class ClaimDripsCall__Outputs { - _call: ClaimDripsCall; - - constructor(call: ClaimDripsCall) { - this._call = call; - } -} - -export class DeactivateBalanceDripCall extends ethereum.Call { - get inputs(): DeactivateBalanceDripCall__Inputs { - return new DeactivateBalanceDripCall__Inputs(this); - } - - get outputs(): DeactivateBalanceDripCall__Outputs { - return new DeactivateBalanceDripCall__Outputs(this); - } -} - -export class DeactivateBalanceDripCall__Inputs { - _call: DeactivateBalanceDripCall; - - constructor(call: DeactivateBalanceDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get prevDripToken(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class DeactivateBalanceDripCall__Outputs { - _call: DeactivateBalanceDripCall; - - constructor(call: DeactivateBalanceDripCall) { - this._call = call; - } -} - -export class DeactivateVolumeDripCall extends ethereum.Call { - get inputs(): DeactivateVolumeDripCall__Inputs { - return new DeactivateVolumeDripCall__Inputs(this); - } - - get outputs(): DeactivateVolumeDripCall__Outputs { - return new DeactivateVolumeDripCall__Outputs(this); - } -} - -export class DeactivateVolumeDripCall__Inputs { - _call: DeactivateVolumeDripCall; - - constructor(call: DeactivateVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get prevDripToken(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class DeactivateVolumeDripCall__Outputs { - _call: DeactivateVolumeDripCall; - - constructor(call: DeactivateVolumeDripCall) { - this._call = call; - } -} - -export class MintAndCaptureVolumeDripsForPairsCall extends ethereum.Call { - get inputs(): MintAndCaptureVolumeDripsForPairsCall__Inputs { - return new MintAndCaptureVolumeDripsForPairsCall__Inputs(this); - } - - get outputs(): MintAndCaptureVolumeDripsForPairsCall__Outputs { - return new MintAndCaptureVolumeDripsForPairsCall__Outputs(this); - } -} - -export class MintAndCaptureVolumeDripsForPairsCall__Inputs { - _call: MintAndCaptureVolumeDripsForPairsCall; - - constructor(call: MintAndCaptureVolumeDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - MintAndCaptureVolumeDripsForPairsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class MintAndCaptureVolumeDripsForPairsCall__Outputs { - _call: MintAndCaptureVolumeDripsForPairsCall; - - constructor(call: MintAndCaptureVolumeDripsForPairsCall) { - this._call = call; - } -} - -export class MintAndCaptureVolumeDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetBalanceDripRateCall extends ethereum.Call { - get inputs(): SetBalanceDripRateCall__Inputs { - return new SetBalanceDripRateCall__Inputs(this); - } - - get outputs(): SetBalanceDripRateCall__Outputs { - return new SetBalanceDripRateCall__Outputs(this); - } -} - -export class SetBalanceDripRateCall__Inputs { - _call: SetBalanceDripRateCall; - - constructor(call: SetBalanceDripRateCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get dripRatePerSecond(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class SetBalanceDripRateCall__Outputs { - _call: SetBalanceDripRateCall; - - constructor(call: SetBalanceDripRateCall) { - this._call = call; - } -} - -export class SetVolumeDripCall extends ethereum.Call { - get inputs(): SetVolumeDripCall__Inputs { - return new SetVolumeDripCall__Inputs(this); - } - - get outputs(): SetVolumeDripCall__Outputs { - return new SetVolumeDripCall__Outputs(this); - } -} - -export class SetVolumeDripCall__Inputs { - _call: SetVolumeDripCall; - - constructor(call: SetVolumeDripCall) { - this._call = call; - } - - get source(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get measure(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get isReferral(): boolean { - return this._call.inputValues[3].value.toBoolean(); - } - - get periodSeconds(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get dripAmount(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetVolumeDripCall__Outputs { - _call: SetVolumeDripCall; - - constructor(call: SetVolumeDripCall) { - this._call = call; - } -} - -export class TransferOutCall extends ethereum.Call { - get inputs(): TransferOutCall__Inputs { - return new TransferOutCall__Inputs(this); - } - - get outputs(): TransferOutCall__Outputs { - return new TransferOutCall__Outputs(this); - } -} - -export class TransferOutCall__Inputs { - _call: TransferOutCall; - - constructor(call: TransferOutCall) { - this._call = call; - } - - get token(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferOutCall__Outputs { - _call: TransferOutCall; - - constructor(call: TransferOutCall) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} - -export class UpdateActiveBalanceDripsForPairsCall extends ethereum.Call { - get inputs(): UpdateActiveBalanceDripsForPairsCall__Inputs { - return new UpdateActiveBalanceDripsForPairsCall__Inputs(this); - } - - get outputs(): UpdateActiveBalanceDripsForPairsCall__Outputs { - return new UpdateActiveBalanceDripsForPairsCall__Outputs(this); - } -} - -export class UpdateActiveBalanceDripsForPairsCall__Inputs { - _call: UpdateActiveBalanceDripsForPairsCall; - - constructor(call: UpdateActiveBalanceDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateActiveBalanceDripsForPairsCallPairsStruct - >(); - } -} - -export class UpdateActiveBalanceDripsForPairsCall__Outputs { - _call: UpdateActiveBalanceDripsForPairsCall; - - constructor(call: UpdateActiveBalanceDripsForPairsCall) { - this._call = call; - } -} - -export class UpdateActiveBalanceDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateActiveVolumeDripsForPairsCall extends ethereum.Call { - get inputs(): UpdateActiveVolumeDripsForPairsCall__Inputs { - return new UpdateActiveVolumeDripsForPairsCall__Inputs(this); - } - - get outputs(): UpdateActiveVolumeDripsForPairsCall__Outputs { - return new UpdateActiveVolumeDripsForPairsCall__Outputs(this); - } -} - -export class UpdateActiveVolumeDripsForPairsCall__Inputs { - _call: UpdateActiveVolumeDripsForPairsCall; - - constructor(call: UpdateActiveVolumeDripsForPairsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateActiveVolumeDripsForPairsCallPairsStruct - >(); - } -} - -export class UpdateActiveVolumeDripsForPairsCall__Outputs { - _call: UpdateActiveVolumeDripsForPairsCall; - - constructor(call: UpdateActiveVolumeDripsForPairsCall) { - this._call = call; - } -} - -export class UpdateActiveVolumeDripsForPairsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateAndClaimDripsCall extends ethereum.Call { - get inputs(): UpdateAndClaimDripsCall__Inputs { - return new UpdateAndClaimDripsCall__Inputs(this); - } - - get outputs(): UpdateAndClaimDripsCall__Outputs { - return new UpdateAndClaimDripsCall__Outputs(this); - } -} - -export class UpdateAndClaimDripsCall__Inputs { - _call: UpdateAndClaimDripsCall; - - constructor(call: UpdateAndClaimDripsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateAndClaimDripsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class UpdateAndClaimDripsCall__Outputs { - _call: UpdateAndClaimDripsCall; - - constructor(call: UpdateAndClaimDripsCall) { - this._call = call; - } - - get value0(): Array { - return this._call.outputValues[0].value.toTupleArray< - UpdateAndClaimDripsCallValue0Struct - >(); - } -} - -export class UpdateAndClaimDripsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateAndClaimDripsCallValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} - -export class UpdateDripsCall extends ethereum.Call { - get inputs(): UpdateDripsCall__Inputs { - return new UpdateDripsCall__Inputs(this); - } - - get outputs(): UpdateDripsCall__Outputs { - return new UpdateDripsCall__Outputs(this); - } -} - -export class UpdateDripsCall__Inputs { - _call: UpdateDripsCall; - - constructor(call: UpdateDripsCall) { - this._call = call; - } - - get pairs(): Array { - return this._call.inputValues[0].value.toTupleArray< - UpdateDripsCallPairsStruct - >(); - } - - get user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get dripTokens(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class UpdateDripsCall__Outputs { - _call: UpdateDripsCall; - - constructor(call: UpdateDripsCall) { - this._call = call; - } - - get value0(): Array { - return this._call.outputValues[0].value.toTupleArray< - UpdateDripsCallValue0Struct - >(); - } -} - -export class UpdateDripsCallPairsStruct extends ethereum.Tuple { - get source(): Address { - return this[0].toAddress(); - } - - get measure(): Address { - return this[1].toAddress(); - } -} - -export class UpdateDripsCallValue0Struct extends ethereum.Tuple { - get dripToken(): Address { - return this[0].toAddress(); - } - - get balance(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/generated/templates/SingleRandomWinner/ControlledToken.ts b/generated/templates/SingleRandomWinner/ControlledToken.ts deleted file mode 100644 index 91686f3..0000000 --- a/generated/templates/SingleRandomWinner/ControlledToken.ts +++ /dev/null @@ -1,672 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class Approval extends ethereum.Event { - get params(): Approval__Params { - return new Approval__Params(this); - } -} - -export class Approval__Params { - _event: Approval; - - constructor(event: Approval) { - this._event = event; - } - - get owner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get spender(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Transfer extends ethereum.Event { - get params(): Transfer__Params { - return new Transfer__Params(this); - } -} - -export class Transfer__Params { - _event: Transfer; - - constructor(event: Transfer) { - this._event = event; - } - - get from(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ControlledToken extends ethereum.SmartContract { - static bind(address: Address): ControlledToken { - return new ControlledToken("ControlledToken", address); - } - - allowance(owner: Address, spender: Address): BigInt { - let result = super.call( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - - return result[0].toBigInt(); - } - - try_allowance(owner: Address, spender: Address): ethereum.CallResult { - let result = super.tryCall( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - approve(spender: Address, amount: BigInt): boolean { - let result = super.call("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_approve(spender: Address, amount: BigInt): ethereum.CallResult { - let result = super.tryCall("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - balanceOf(account: Address): BigInt { - let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - - return result[0].toBigInt(); - } - - try_balanceOf(account: Address): ethereum.CallResult { - let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(account) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - controller(): Address { - let result = super.call("controller", "controller():(address)", []); - - return result[0].toAddress(); - } - - try_controller(): ethereum.CallResult
{ - let result = super.tryCall("controller", "controller():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - decimals(): i32 { - let result = super.call("decimals", "decimals():(uint8)", []); - - return result[0].toI32(); - } - - try_decimals(): ethereum.CallResult { - let result = super.tryCall("decimals", "decimals():(uint8)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - decreaseAllowance(spender: Address, subtractedValue: BigInt): boolean { - let result = super.call( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_decreaseAllowance( - spender: Address, - subtractedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - increaseAllowance(spender: Address, addedValue: BigInt): boolean { - let result = super.call( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_increaseAllowance( - spender: Address, - addedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - name(): string { - let result = super.call("name", "name():(string)", []); - - return result[0].toString(); - } - - try_name(): ethereum.CallResult { - let result = super.tryCall("name", "name():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - symbol(): string { - let result = super.call("symbol", "symbol():(string)", []); - - return result[0].toString(); - } - - try_symbol(): ethereum.CallResult { - let result = super.tryCall("symbol", "symbol():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - totalSupply(): BigInt { - let result = super.call("totalSupply", "totalSupply():(uint256)", []); - - return result[0].toBigInt(); - } - - try_totalSupply(): ethereum.CallResult { - let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - transfer(recipient: Address, amount: BigInt): boolean { - let result = super.call("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - - return result[0].toBoolean(); - } - - try_transfer( - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - transferFrom(sender: Address, recipient: Address, amount: BigInt): boolean { - let result = super.call( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return result[0].toBoolean(); - } - - try_transferFrom( - sender: Address, - recipient: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(sender), - ethereum.Value.fromAddress(recipient), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } -} - -export class ApproveCall extends ethereum.Call { - get inputs(): ApproveCall__Inputs { - return new ApproveCall__Inputs(this); - } - - get outputs(): ApproveCall__Outputs { - return new ApproveCall__Outputs(this); - } -} - -export class ApproveCall__Inputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ApproveCall__Outputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class ControllerBurnCall extends ethereum.Call { - get inputs(): ControllerBurnCall__Inputs { - return new ControllerBurnCall__Inputs(this); - } - - get outputs(): ControllerBurnCall__Outputs { - return new ControllerBurnCall__Outputs(this); - } -} - -export class ControllerBurnCall__Inputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerBurnCall__Outputs { - _call: ControllerBurnCall; - - constructor(call: ControllerBurnCall) { - this._call = call; - } -} - -export class ControllerBurnFromCall extends ethereum.Call { - get inputs(): ControllerBurnFromCall__Inputs { - return new ControllerBurnFromCall__Inputs(this); - } - - get outputs(): ControllerBurnFromCall__Outputs { - return new ControllerBurnFromCall__Outputs(this); - } -} - -export class ControllerBurnFromCall__Inputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } - - get _operator(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _user(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ControllerBurnFromCall__Outputs { - _call: ControllerBurnFromCall; - - constructor(call: ControllerBurnFromCall) { - this._call = call; - } -} - -export class ControllerMintCall extends ethereum.Call { - get inputs(): ControllerMintCall__Inputs { - return new ControllerMintCall__Inputs(this); - } - - get outputs(): ControllerMintCall__Outputs { - return new ControllerMintCall__Outputs(this); - } -} - -export class ControllerMintCall__Inputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } - - get _user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ControllerMintCall__Outputs { - _call: ControllerMintCall; - - constructor(call: ControllerMintCall) { - this._call = call; - } -} - -export class DecreaseAllowanceCall extends ethereum.Call { - get inputs(): DecreaseAllowanceCall__Inputs { - return new DecreaseAllowanceCall__Inputs(this); - } - - get outputs(): DecreaseAllowanceCall__Outputs { - return new DecreaseAllowanceCall__Outputs(this); - } -} - -export class DecreaseAllowanceCall__Inputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get subtractedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class DecreaseAllowanceCall__Outputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class IncreaseAllowanceCall extends ethereum.Call { - get inputs(): IncreaseAllowanceCall__Inputs { - return new IncreaseAllowanceCall__Inputs(this); - } - - get outputs(): IncreaseAllowanceCall__Outputs { - return new IncreaseAllowanceCall__Outputs(this); - } -} - -export class IncreaseAllowanceCall__Inputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get addedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class IncreaseAllowanceCall__Outputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _name(): string { - return this._call.inputValues[0].value.toString(); - } - - get _symbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get _decimals(): i32 { - return this._call.inputValues[2].value.toI32(); - } - - get _controller(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class TransferCall extends ethereum.Call { - get inputs(): TransferCall__Inputs { - return new TransferCall__Inputs(this); - } - - get outputs(): TransferCall__Outputs { - return new TransferCall__Outputs(this); - } -} - -export class TransferCall__Inputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get recipient(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class TransferCall__Outputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class TransferFromCall extends ethereum.Call { - get inputs(): TransferFromCall__Inputs { - return new TransferFromCall__Inputs(this); - } - - get outputs(): TransferFromCall__Outputs { - return new TransferFromCall__Outputs(this); - } -} - -export class TransferFromCall__Inputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get sender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get recipient(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferFromCall__Outputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} diff --git a/generated/templates/SingleRandomWinner/ERC20.ts b/generated/templates/SingleRandomWinner/ERC20.ts deleted file mode 100644 index b0551bc..0000000 --- a/generated/templates/SingleRandomWinner/ERC20.ts +++ /dev/null @@ -1,706 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class MinterAdded extends ethereum.Event { - get params(): MinterAdded__Params { - return new MinterAdded__Params(this); - } -} - -export class MinterAdded__Params { - _event: MinterAdded; - - constructor(event: MinterAdded) { - this._event = event; - } - - get account(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class MinterRemoved extends ethereum.Event { - get params(): MinterRemoved__Params { - return new MinterRemoved__Params(this); - } -} - -export class MinterRemoved__Params { - _event: MinterRemoved; - - constructor(event: MinterRemoved) { - this._event = event; - } - - get account(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Transfer extends ethereum.Event { - get params(): Transfer__Params { - return new Transfer__Params(this); - } -} - -export class Transfer__Params { - _event: Transfer; - - constructor(event: Transfer) { - this._event = event; - } - - get from(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Approval extends ethereum.Event { - get params(): Approval__Params { - return new Approval__Params(this); - } -} - -export class Approval__Params { - _event: Approval; - - constructor(event: Approval) { - this._event = event; - } - - get owner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get spender(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get value(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ERC20 extends ethereum.SmartContract { - static bind(address: Address): ERC20 { - return new ERC20("ERC20", address); - } - - name(): string { - let result = super.call("name", "name():(string)", []); - - return result[0].toString(); - } - - try_name(): ethereum.CallResult { - let result = super.tryCall("name", "name():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - approve(spender: Address, value: BigInt): boolean { - let result = super.call("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(value) - ]); - - return result[0].toBoolean(); - } - - try_approve(spender: Address, value: BigInt): ethereum.CallResult { - let result = super.tryCall("approve", "approve(address,uint256):(bool)", [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(value) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - totalSupply(): BigInt { - let result = super.call("totalSupply", "totalSupply():(uint256)", []); - - return result[0].toBigInt(); - } - - try_totalSupply(): ethereum.CallResult { - let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - transferFrom(from: Address, to: Address, value: BigInt): boolean { - let result = super.call( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ] - ); - - return result[0].toBoolean(); - } - - try_transferFrom( - from: Address, - to: Address, - value: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "transferFrom", - "transferFrom(address,address,uint256):(bool)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - decimals(): i32 { - let result = super.call("decimals", "decimals():(uint8)", []); - - return result[0].toI32(); - } - - try_decimals(): ethereum.CallResult { - let result = super.tryCall("decimals", "decimals():(uint8)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - increaseAllowance(spender: Address, addedValue: BigInt): boolean { - let result = super.call( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_increaseAllowance( - spender: Address, - addedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "increaseAllowance", - "increaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(addedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - mint(to: Address, value: BigInt): boolean { - let result = super.call("mint", "mint(address,uint256):(bool)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ]); - - return result[0].toBoolean(); - } - - try_mint(to: Address, value: BigInt): ethereum.CallResult { - let result = super.tryCall("mint", "mint(address,uint256):(bool)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - balanceOf(owner: Address): BigInt { - let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(owner) - ]); - - return result[0].toBigInt(); - } - - try_balanceOf(owner: Address): ethereum.CallResult { - let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ - ethereum.Value.fromAddress(owner) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - symbol(): string { - let result = super.call("symbol", "symbol():(string)", []); - - return result[0].toString(); - } - - try_symbol(): ethereum.CallResult { - let result = super.tryCall("symbol", "symbol():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } - - decreaseAllowance(spender: Address, subtractedValue: BigInt): boolean { - let result = super.call( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - - return result[0].toBoolean(); - } - - try_decreaseAllowance( - spender: Address, - subtractedValue: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "decreaseAllowance", - "decreaseAllowance(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(spender), - ethereum.Value.fromUnsignedBigInt(subtractedValue) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - transfer(to: Address, value: BigInt): boolean { - let result = super.call("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ]); - - return result[0].toBoolean(); - } - - try_transfer(to: Address, value: BigInt): ethereum.CallResult { - let result = super.tryCall("transfer", "transfer(address,uint256):(bool)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromUnsignedBigInt(value) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isMinter(account: Address): boolean { - let result = super.call("isMinter", "isMinter(address):(bool)", [ - ethereum.Value.fromAddress(account) - ]); - - return result[0].toBoolean(); - } - - try_isMinter(account: Address): ethereum.CallResult { - let result = super.tryCall("isMinter", "isMinter(address):(bool)", [ - ethereum.Value.fromAddress(account) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - allowance(owner: Address, spender: Address): BigInt { - let result = super.call( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - - return result[0].toBigInt(); - } - - try_allowance(owner: Address, spender: Address): ethereum.CallResult { - let result = super.tryCall( - "allowance", - "allowance(address,address):(uint256)", - [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(spender)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } -} - -export class ApproveCall extends ethereum.Call { - get inputs(): ApproveCall__Inputs { - return new ApproveCall__Inputs(this); - } - - get outputs(): ApproveCall__Outputs { - return new ApproveCall__Outputs(this); - } -} - -export class ApproveCall__Inputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get value(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ApproveCall__Outputs { - _call: ApproveCall; - - constructor(call: ApproveCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class TransferFromCall extends ethereum.Call { - get inputs(): TransferFromCall__Inputs { - return new TransferFromCall__Inputs(this); - } - - get outputs(): TransferFromCall__Outputs { - return new TransferFromCall__Outputs(this); - } -} - -export class TransferFromCall__Inputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get value(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferFromCall__Outputs { - _call: TransferFromCall; - - constructor(call: TransferFromCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class IncreaseAllowanceCall extends ethereum.Call { - get inputs(): IncreaseAllowanceCall__Inputs { - return new IncreaseAllowanceCall__Inputs(this); - } - - get outputs(): IncreaseAllowanceCall__Outputs { - return new IncreaseAllowanceCall__Outputs(this); - } -} - -export class IncreaseAllowanceCall__Inputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get addedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class IncreaseAllowanceCall__Outputs { - _call: IncreaseAllowanceCall; - - constructor(call: IncreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class MintCall extends ethereum.Call { - get inputs(): MintCall__Inputs { - return new MintCall__Inputs(this); - } - - get outputs(): MintCall__Outputs { - return new MintCall__Outputs(this); - } -} - -export class MintCall__Inputs { - _call: MintCall; - - constructor(call: MintCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get value(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class MintCall__Outputs { - _call: MintCall; - - constructor(call: MintCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class AddMinterCall extends ethereum.Call { - get inputs(): AddMinterCall__Inputs { - return new AddMinterCall__Inputs(this); - } - - get outputs(): AddMinterCall__Outputs { - return new AddMinterCall__Outputs(this); - } -} - -export class AddMinterCall__Inputs { - _call: AddMinterCall; - - constructor(call: AddMinterCall) { - this._call = call; - } - - get account(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class AddMinterCall__Outputs { - _call: AddMinterCall; - - constructor(call: AddMinterCall) { - this._call = call; - } -} - -export class RenounceMinterCall extends ethereum.Call { - get inputs(): RenounceMinterCall__Inputs { - return new RenounceMinterCall__Inputs(this); - } - - get outputs(): RenounceMinterCall__Outputs { - return new RenounceMinterCall__Outputs(this); - } -} - -export class RenounceMinterCall__Inputs { - _call: RenounceMinterCall; - - constructor(call: RenounceMinterCall) { - this._call = call; - } -} - -export class RenounceMinterCall__Outputs { - _call: RenounceMinterCall; - - constructor(call: RenounceMinterCall) { - this._call = call; - } -} - -export class DecreaseAllowanceCall extends ethereum.Call { - get inputs(): DecreaseAllowanceCall__Inputs { - return new DecreaseAllowanceCall__Inputs(this); - } - - get outputs(): DecreaseAllowanceCall__Outputs { - return new DecreaseAllowanceCall__Outputs(this); - } -} - -export class DecreaseAllowanceCall__Inputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get spender(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get subtractedValue(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class DecreaseAllowanceCall__Outputs { - _call: DecreaseAllowanceCall; - - constructor(call: DecreaseAllowanceCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class TransferCall extends ethereum.Call { - get inputs(): TransferCall__Inputs { - return new TransferCall__Inputs(this); - } - - get outputs(): TransferCall__Outputs { - return new TransferCall__Outputs(this); - } -} - -export class TransferCall__Inputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get value(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class TransferCall__Outputs { - _call: TransferCall; - - constructor(call: TransferCall) { - this._call = call; - } - - get value0(): boolean { - return this._call.outputValues[0].value.toBoolean(); - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get sender(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} diff --git a/generated/templates/SingleRandomWinner/PrizePool.ts b/generated/templates/SingleRandomWinner/PrizePool.ts deleted file mode 100644 index 8aabba9..0000000 --- a/generated/templates/SingleRandomWinner/PrizePool.ts +++ /dev/null @@ -1,2108 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AwardCaptured extends ethereum.Event { - get params(): AwardCaptured__Params { - return new AwardCaptured__Params(this); - } -} - -export class AwardCaptured__Params { - _event: AwardCaptured; - - constructor(event: AwardCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class Awarded extends ethereum.Event { - get params(): Awarded__Params { - return new Awarded__Params(this); - } -} - -export class Awarded__Params { - _event: Awarded; - - constructor(event: Awarded) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC20 extends ethereum.Event { - get params(): AwardedExternalERC20__Params { - return new AwardedExternalERC20__Params(this); - } -} - -export class AwardedExternalERC20__Params { - _event: AwardedExternalERC20; - - constructor(event: AwardedExternalERC20) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class AwardedExternalERC721 extends ethereum.Event { - get params(): AwardedExternalERC721__Params { - return new AwardedExternalERC721__Params(this); - } -} - -export class AwardedExternalERC721__Params { - _event: AwardedExternalERC721; - - constructor(event: AwardedExternalERC721) { - this._event = event; - } - - get winner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._event.parameters[2].value.toBigIntArray(); - } -} - -export class ControlledTokenAdded extends ethereum.Event { - get params(): ControlledTokenAdded__Params { - return new ControlledTokenAdded__Params(this); - } -} - -export class ControlledTokenAdded__Params { - _event: ControlledTokenAdded; - - constructor(event: ControlledTokenAdded) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class CreditBurned extends ethereum.Event { - get params(): CreditBurned__Params { - return new CreditBurned__Params(this); - } -} - -export class CreditBurned__Params { - _event: CreditBurned; - - constructor(event: CreditBurned) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditMinted extends ethereum.Event { - get params(): CreditMinted__Params { - return new CreditMinted__Params(this); - } -} - -export class CreditMinted__Params { - _event: CreditMinted; - - constructor(event: CreditMinted) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class CreditPlanSet extends ethereum.Event { - get params(): CreditPlanSet__Params { - return new CreditPlanSet__Params(this); - } -} - -export class CreditPlanSet__Params { - _event: CreditPlanSet; - - constructor(event: CreditPlanSet) { - this._event = event; - } - - get token(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get creditLimitMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get creditRateMantissa(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class Deposited extends ethereum.Event { - get params(): Deposited__Params { - return new Deposited__Params(this); - } -} - -export class Deposited__Params { - _event: Deposited; - - constructor(event: Deposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get referrer(): Address { - return this._event.parameters[4].value.toAddress(); - } -} - -export class Initialized extends ethereum.Event { - get params(): Initialized__Params { - return new Initialized__Params(this); - } -} - -export class Initialized__Params { - _event: Initialized; - - constructor(event: Initialized) { - this._event = event; - } - - get reserveRegistry(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get maxExitFeeMantissa(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get maxTimelockDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class InstantWithdrawal extends ethereum.Event { - get params(): InstantWithdrawal__Params { - return new InstantWithdrawal__Params(this); - } -} - -export class InstantWithdrawal__Params { - _event: InstantWithdrawal; - - constructor(event: InstantWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } - - get exitFee(): BigInt { - return this._event.parameters[5].value.toBigInt(); - } -} - -export class LiquidityCapSet extends ethereum.Event { - get params(): LiquidityCapSet__Params { - return new LiquidityCapSet__Params(this); - } -} - -export class LiquidityCapSet__Params { - _event: LiquidityCapSet; - - constructor(event: LiquidityCapSet) { - this._event = event; - } - - get liquidityCap(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class PrizeStrategySet extends ethereum.Event { - get params(): PrizeStrategySet__Params { - return new PrizeStrategySet__Params(this); - } -} - -export class PrizeStrategySet__Params { - _event: PrizeStrategySet; - - constructor(event: PrizeStrategySet) { - this._event = event; - } - - get prizeStrategy(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ReserveFeeCaptured extends ethereum.Event { - get params(): ReserveFeeCaptured__Params { - return new ReserveFeeCaptured__Params(this); - } -} - -export class ReserveFeeCaptured__Params { - _event: ReserveFeeCaptured; - - constructor(event: ReserveFeeCaptured) { - this._event = event; - } - - get amount(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ReserveWithdrawal extends ethereum.Event { - get params(): ReserveWithdrawal__Params { - return new ReserveWithdrawal__Params(this); - } -} - -export class ReserveWithdrawal__Params { - _event: ReserveWithdrawal; - - constructor(event: ReserveWithdrawal) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class TimelockDeposited extends ethereum.Event { - get params(): TimelockDeposited__Params { - return new TimelockDeposited__Params(this); - } -} - -export class TimelockDeposited__Params { - _event: TimelockDeposited; - - constructor(event: TimelockDeposited) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get to(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TimelockedWithdrawal extends ethereum.Event { - get params(): TimelockedWithdrawal__Params { - return new TimelockedWithdrawal__Params(this); - } -} - -export class TimelockedWithdrawal__Params { - _event: TimelockedWithdrawal; - - constructor(event: TimelockedWithdrawal) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get unlockTimestamp(): BigInt { - return this._event.parameters[4].value.toBigInt(); - } -} - -export class TimelockedWithdrawalSwept extends ethereum.Event { - get params(): TimelockedWithdrawalSwept__Params { - return new TimelockedWithdrawalSwept__Params(this); - } -} - -export class TimelockedWithdrawalSwept__Params { - _event: TimelockedWithdrawalSwept; - - constructor(event: TimelockedWithdrawalSwept) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get from(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get redeemed(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TransferredExternalERC20 extends ethereum.Event { - get params(): TransferredExternalERC20__Params { - return new TransferredExternalERC20__Params(this); - } -} - -export class TransferredExternalERC20__Params { - _event: TransferredExternalERC20; - - constructor(event: TransferredExternalERC20) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get token(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class PrizePool__calculateEarlyExitFeeResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool__calculateTimelockDurationResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool__creditPlanOfResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class PrizePool extends ethereum.SmartContract { - static bind(address: Address): PrizePool { - return new PrizePool("PrizePool", address); - } - - accountedBalance(): BigInt { - let result = super.call( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_accountedBalance(): ethereum.CallResult { - let result = super.tryCall( - "accountedBalance", - "accountedBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - awardBalance(): BigInt { - let result = super.call("awardBalance", "awardBalance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_awardBalance(): ethereum.CallResult { - let result = super.tryCall("awardBalance", "awardBalance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balance(): BigInt { - let result = super.call("balance", "balance():(uint256)", []); - - return result[0].toBigInt(); - } - - try_balance(): ethereum.CallResult { - let result = super.tryCall("balance", "balance():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - balanceOfCredit(user: Address, controlledToken: Address): BigInt { - let result = super.call( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_balanceOfCredit( - user: Address, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "balanceOfCredit", - "balanceOfCredit(address,address):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): PrizePool__calculateEarlyExitFeeResult { - let result = super.call( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new PrizePool__calculateEarlyExitFeeResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateEarlyExitFee( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateEarlyExitFee", - "calculateEarlyExitFee(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__calculateEarlyExitFeeResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - calculateReserveFee(amount: BigInt): BigInt { - let result = super.call( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - - return result[0].toBigInt(); - } - - try_calculateReserveFee(amount: BigInt): ethereum.CallResult { - let result = super.tryCall( - "calculateReserveFee", - "calculateReserveFee(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(amount)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): PrizePool__calculateTimelockDurationResult { - let result = super.call( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - - return new PrizePool__calculateTimelockDurationResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_calculateTimelockDuration( - from: Address, - controlledToken: Address, - amount: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateTimelockDuration", - "calculateTimelockDuration(address,address,uint256):(uint256,uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(amount) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__calculateTimelockDurationResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - canAwardExternal(_externalToken: Address): boolean { - let result = super.call( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - - return result[0].toBoolean(); - } - - try_canAwardExternal(_externalToken: Address): ethereum.CallResult { - let result = super.tryCall( - "canAwardExternal", - "canAwardExternal(address):(bool)", - [ethereum.Value.fromAddress(_externalToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - captureAwardBalance(): BigInt { - let result = super.call( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_captureAwardBalance(): ethereum.CallResult { - let result = super.tryCall( - "captureAwardBalance", - "captureAwardBalance():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - creditPlanOf(controlledToken: Address): PrizePool__creditPlanOfResult { - let result = super.call( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - - return new PrizePool__creditPlanOfResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_creditPlanOf( - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "creditPlanOf", - "creditPlanOf(address):(uint128,uint128)", - [ethereum.Value.fromAddress(controlledToken)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new PrizePool__creditPlanOfResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): BigInt { - let result = super.call( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - - return result[0].toBigInt(); - } - - try_estimateCreditAccrualTime( - _controlledToken: Address, - _principal: BigInt, - _interest: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "estimateCreditAccrualTime", - "estimateCreditAccrualTime(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(_controlledToken), - ethereum.Value.fromUnsignedBigInt(_principal), - ethereum.Value.fromUnsignedBigInt(_interest) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - liquidityCap(): BigInt { - let result = super.call("liquidityCap", "liquidityCap():(uint256)", []); - - return result[0].toBigInt(); - } - - try_liquidityCap(): ethereum.CallResult { - let result = super.tryCall("liquidityCap", "liquidityCap():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxExitFeeMantissa(): BigInt { - let result = super.call( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxExitFeeMantissa(): ethereum.CallResult { - let result = super.tryCall( - "maxExitFeeMantissa", - "maxExitFeeMantissa():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - maxTimelockDuration(): BigInt { - let result = super.call( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_maxTimelockDuration(): ethereum.CallResult { - let result = super.tryCall( - "maxTimelockDuration", - "maxTimelockDuration():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - prizeStrategy(): Address { - let result = super.call("prizeStrategy", "prizeStrategy():(address)", []); - - return result[0].toAddress(); - } - - try_prizeStrategy(): ethereum.CallResult
{ - let result = super.tryCall( - "prizeStrategy", - "prizeStrategy():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveRegistry(): Address { - let result = super.call( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_reserveRegistry(): ethereum.CallResult
{ - let result = super.tryCall( - "reserveRegistry", - "reserveRegistry():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - reserveTotalSupply(): BigInt { - let result = super.call( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_reserveTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "reserveTotalSupply", - "reserveTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - sweepTimelockBalances(users: Array
): BigInt { - let result = super.call( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - - return result[0].toBigInt(); - } - - try_sweepTimelockBalances( - users: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "sweepTimelockBalances", - "sweepTimelockBalances(address[]):(uint256)", - [ethereum.Value.fromAddressArray(users)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceAvailableAt(user: Address): BigInt { - let result = super.call( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceAvailableAt(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceAvailableAt", - "timelockBalanceAvailableAt(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockBalanceOf(user: Address): BigInt { - let result = super.call( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_timelockBalanceOf(user: Address): ethereum.CallResult { - let result = super.tryCall( - "timelockBalanceOf", - "timelockBalanceOf(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - timelockTotalSupply(): BigInt { - let result = super.call( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_timelockTotalSupply(): ethereum.CallResult { - let result = super.tryCall( - "timelockTotalSupply", - "timelockTotalSupply():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - token(): Address { - let result = super.call("token", "token():(address)", []); - - return result[0].toAddress(); - } - - try_token(): ethereum.CallResult
{ - let result = super.tryCall("token", "token():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - tokens(): Array
{ - let result = super.call("tokens", "tokens():(address[])", []); - - return result[0].toAddressArray(); - } - - try_tokens(): ethereum.CallResult> { - let result = super.tryCall("tokens", "tokens():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): BigInt { - let result = super.call( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawInstantlyFrom( - from: Address, - amount: BigInt, - controlledToken: Address, - maximumExitFee: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawInstantlyFrom", - "withdrawInstantlyFrom(address,uint256,address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken), - ethereum.Value.fromUnsignedBigInt(maximumExitFee) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawReserve(to: Address): BigInt { - let result = super.call( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - - return result[0].toBigInt(); - } - - try_withdrawReserve(to: Address): ethereum.CallResult { - let result = super.tryCall( - "withdrawReserve", - "withdrawReserve(address):(uint256)", - [ethereum.Value.fromAddress(to)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): BigInt { - let result = super.call( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - - return result[0].toBigInt(); - } - - try_withdrawWithTimelockFrom( - from: Address, - amount: BigInt, - controlledToken: Address - ): ethereum.CallResult { - let result = super.tryCall( - "withdrawWithTimelockFrom", - "withdrawWithTimelockFrom(address,uint256,address):(uint256)", - [ - ethereum.Value.fromAddress(from), - ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromAddress(controlledToken) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } -} - -export class AddControlledTokenCall extends ethereum.Call { - get inputs(): AddControlledTokenCall__Inputs { - return new AddControlledTokenCall__Inputs(this); - } - - get outputs(): AddControlledTokenCall__Outputs { - return new AddControlledTokenCall__Outputs(this); - } -} - -export class AddControlledTokenCall__Inputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class AddControlledTokenCall__Outputs { - _call: AddControlledTokenCall; - - constructor(call: AddControlledTokenCall) { - this._call = call; - } -} - -export class AwardCall extends ethereum.Call { - get inputs(): AwardCall__Inputs { - return new AwardCall__Inputs(this); - } - - get outputs(): AwardCall__Outputs { - return new AwardCall__Outputs(this); - } -} - -export class AwardCall__Inputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class AwardCall__Outputs { - _call: AwardCall; - - constructor(call: AwardCall) { - this._call = call; - } -} - -export class AwardExternalERC20Call extends ethereum.Call { - get inputs(): AwardExternalERC20Call__Inputs { - return new AwardExternalERC20Call__Inputs(this); - } - - get outputs(): AwardExternalERC20Call__Outputs { - return new AwardExternalERC20Call__Outputs(this); - } -} - -export class AwardExternalERC20Call__Inputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class AwardExternalERC20Call__Outputs { - _call: AwardExternalERC20Call; - - constructor(call: AwardExternalERC20Call) { - this._call = call; - } -} - -export class AwardExternalERC721Call extends ethereum.Call { - get inputs(): AwardExternalERC721Call__Inputs { - return new AwardExternalERC721Call__Inputs(this); - } - - get outputs(): AwardExternalERC721Call__Outputs { - return new AwardExternalERC721Call__Outputs(this); - } -} - -export class AwardExternalERC721Call__Inputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get tokenIds(): Array { - return this._call.inputValues[2].value.toBigIntArray(); - } -} - -export class AwardExternalERC721Call__Outputs { - _call: AwardExternalERC721Call; - - constructor(call: AwardExternalERC721Call) { - this._call = call; - } -} - -export class BalanceCall extends ethereum.Call { - get inputs(): BalanceCall__Inputs { - return new BalanceCall__Inputs(this); - } - - get outputs(): BalanceCall__Outputs { - return new BalanceCall__Outputs(this); - } -} - -export class BalanceCall__Inputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } -} - -export class BalanceCall__Outputs { - _call: BalanceCall; - - constructor(call: BalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BalanceOfCreditCall extends ethereum.Call { - get inputs(): BalanceOfCreditCall__Inputs { - return new BalanceOfCreditCall__Inputs(this); - } - - get outputs(): BalanceOfCreditCall__Outputs { - return new BalanceOfCreditCall__Outputs(this); - } -} - -export class BalanceOfCreditCall__Inputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class BalanceOfCreditCall__Outputs { - _call: BalanceOfCreditCall; - - constructor(call: BalanceOfCreditCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CalculateEarlyExitFeeCall extends ethereum.Call { - get inputs(): CalculateEarlyExitFeeCall__Inputs { - return new CalculateEarlyExitFeeCall__Inputs(this); - } - - get outputs(): CalculateEarlyExitFeeCall__Outputs { - return new CalculateEarlyExitFeeCall__Outputs(this); - } -} - -export class CalculateEarlyExitFeeCall__Inputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateEarlyExitFeeCall__Outputs { - _call: CalculateEarlyExitFeeCall; - - constructor(call: CalculateEarlyExitFeeCall) { - this._call = call; - } - - get exitFee(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall extends ethereum.Call { - get inputs(): CalculateTimelockDurationCall__Inputs { - return new CalculateTimelockDurationCall__Inputs(this); - } - - get outputs(): CalculateTimelockDurationCall__Outputs { - return new CalculateTimelockDurationCall__Outputs(this); - } -} - -export class CalculateTimelockDurationCall__Inputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get controlledToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class CalculateTimelockDurationCall__Outputs { - _call: CalculateTimelockDurationCall; - - constructor(call: CalculateTimelockDurationCall) { - this._call = call; - } - - get durationSeconds(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get burnedCredit(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} - -export class CaptureAwardBalanceCall extends ethereum.Call { - get inputs(): CaptureAwardBalanceCall__Inputs { - return new CaptureAwardBalanceCall__Inputs(this); - } - - get outputs(): CaptureAwardBalanceCall__Outputs { - return new CaptureAwardBalanceCall__Outputs(this); - } -} - -export class CaptureAwardBalanceCall__Inputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } -} - -export class CaptureAwardBalanceCall__Outputs { - _call: CaptureAwardBalanceCall; - - constructor(call: CaptureAwardBalanceCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class DepositToCall extends ethereum.Call { - get inputs(): DepositToCall__Inputs { - return new DepositToCall__Inputs(this); - } - - get outputs(): DepositToCall__Outputs { - return new DepositToCall__Outputs(this); - } -} - -export class DepositToCall__Inputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class DepositToCall__Outputs { - _call: DepositToCall; - - constructor(call: DepositToCall) { - this._call = call; - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _reserveRegistry(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _controlledTokens(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _maxExitFeeMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _maxTimelockDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetCreditPlanOfCall extends ethereum.Call { - get inputs(): SetCreditPlanOfCall__Inputs { - return new SetCreditPlanOfCall__Inputs(this); - } - - get outputs(): SetCreditPlanOfCall__Outputs { - return new SetCreditPlanOfCall__Outputs(this); - } -} - -export class SetCreditPlanOfCall__Inputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } - - get _controlledToken(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _creditRateMantissa(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _creditLimitMantissa(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetCreditPlanOfCall__Outputs { - _call: SetCreditPlanOfCall; - - constructor(call: SetCreditPlanOfCall) { - this._call = call; - } -} - -export class SetLiquidityCapCall extends ethereum.Call { - get inputs(): SetLiquidityCapCall__Inputs { - return new SetLiquidityCapCall__Inputs(this); - } - - get outputs(): SetLiquidityCapCall__Outputs { - return new SetLiquidityCapCall__Outputs(this); - } -} - -export class SetLiquidityCapCall__Inputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } - - get _liquidityCap(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetLiquidityCapCall__Outputs { - _call: SetLiquidityCapCall; - - constructor(call: SetLiquidityCapCall) { - this._call = call; - } -} - -export class SetPrizeStrategyCall extends ethereum.Call { - get inputs(): SetPrizeStrategyCall__Inputs { - return new SetPrizeStrategyCall__Inputs(this); - } - - get outputs(): SetPrizeStrategyCall__Outputs { - return new SetPrizeStrategyCall__Outputs(this); - } -} - -export class SetPrizeStrategyCall__Inputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } - - get _prizeStrategy(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetPrizeStrategyCall__Outputs { - _call: SetPrizeStrategyCall; - - constructor(call: SetPrizeStrategyCall) { - this._call = call; - } -} - -export class SweepTimelockBalancesCall extends ethereum.Call { - get inputs(): SweepTimelockBalancesCall__Inputs { - return new SweepTimelockBalancesCall__Inputs(this); - } - - get outputs(): SweepTimelockBalancesCall__Outputs { - return new SweepTimelockBalancesCall__Outputs(this); - } -} - -export class SweepTimelockBalancesCall__Inputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get users(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class SweepTimelockBalancesCall__Outputs { - _call: SweepTimelockBalancesCall; - - constructor(call: SweepTimelockBalancesCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class TimelockDepositToCall extends ethereum.Call { - get inputs(): TimelockDepositToCall__Inputs { - return new TimelockDepositToCall__Inputs(this); - } - - get outputs(): TimelockDepositToCall__Outputs { - return new TimelockDepositToCall__Outputs(this); - } -} - -export class TimelockDepositToCall__Inputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class TimelockDepositToCall__Outputs { - _call: TimelockDepositToCall; - - constructor(call: TimelockDepositToCall) { - this._call = call; - } -} - -export class TransferExternalERC20Call extends ethereum.Call { - get inputs(): TransferExternalERC20Call__Inputs { - return new TransferExternalERC20Call__Inputs(this); - } - - get outputs(): TransferExternalERC20Call__Outputs { - return new TransferExternalERC20Call__Outputs(this); - } -} - -export class TransferExternalERC20Call__Inputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferExternalERC20Call__Outputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} - -export class WithdrawInstantlyFromCall extends ethereum.Call { - get inputs(): WithdrawInstantlyFromCall__Inputs { - return new WithdrawInstantlyFromCall__Inputs(this); - } - - get outputs(): WithdrawInstantlyFromCall__Outputs { - return new WithdrawInstantlyFromCall__Outputs(this); - } -} - -export class WithdrawInstantlyFromCall__Inputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get maximumExitFee(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class WithdrawInstantlyFromCall__Outputs { - _call: WithdrawInstantlyFromCall; - - constructor(call: WithdrawInstantlyFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawReserveCall extends ethereum.Call { - get inputs(): WithdrawReserveCall__Inputs { - return new WithdrawReserveCall__Inputs(this); - } - - get outputs(): WithdrawReserveCall__Outputs { - return new WithdrawReserveCall__Outputs(this); - } -} - -export class WithdrawReserveCall__Inputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class WithdrawReserveCall__Outputs { - _call: WithdrawReserveCall; - - constructor(call: WithdrawReserveCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class WithdrawWithTimelockFromCall extends ethereum.Call { - get inputs(): WithdrawWithTimelockFromCall__Inputs { - return new WithdrawWithTimelockFromCall__Inputs(this); - } - - get outputs(): WithdrawWithTimelockFromCall__Outputs { - return new WithdrawWithTimelockFromCall__Outputs(this); - } -} - -export class WithdrawWithTimelockFromCall__Inputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } -} - -export class WithdrawWithTimelockFromCall__Outputs { - _call: WithdrawWithTimelockFromCall; - - constructor(call: WithdrawWithTimelockFromCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} diff --git a/generated/templates/SingleRandomWinner/RNGInterface.ts b/generated/templates/SingleRandomWinner/RNGInterface.ts deleted file mode 100644 index 2d04335..0000000 --- a/generated/templates/SingleRandomWinner/RNGInterface.ts +++ /dev/null @@ -1,294 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class RandomNumberCompleted extends ethereum.Event { - get params(): RandomNumberCompleted__Params { - return new RandomNumberCompleted__Params(this); - } -} - -export class RandomNumberCompleted__Params { - _event: RandomNumberCompleted; - - constructor(event: RandomNumberCompleted) { - this._event = event; - } - - get requestId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get randomNumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class RandomNumberRequested extends ethereum.Event { - get params(): RandomNumberRequested__Params { - return new RandomNumberRequested__Params(this); - } -} - -export class RandomNumberRequested__Params { - _event: RandomNumberRequested; - - constructor(event: RandomNumberRequested) { - this._event = event; - } - - get requestId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get sender(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class RNGInterface__getRequestFeeResult { - value0: Address; - value1: BigInt; - - constructor(value0: Address, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class RNGInterface__requestRandomNumberResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class RNGInterface extends ethereum.SmartContract { - static bind(address: Address): RNGInterface { - return new RNGInterface("RNGInterface", address); - } - - getLastRequestId(): BigInt { - let result = super.call( - "getLastRequestId", - "getLastRequestId():(uint32)", - [] - ); - - return result[0].toBigInt(); - } - - try_getLastRequestId(): ethereum.CallResult { - let result = super.tryCall( - "getLastRequestId", - "getLastRequestId():(uint32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getRequestFee(): RNGInterface__getRequestFeeResult { - let result = super.call( - "getRequestFee", - "getRequestFee():(address,uint256)", - [] - ); - - return new RNGInterface__getRequestFeeResult( - result[0].toAddress(), - result[1].toBigInt() - ); - } - - try_getRequestFee(): ethereum.CallResult { - let result = super.tryCall( - "getRequestFee", - "getRequestFee():(address,uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new RNGInterface__getRequestFeeResult( - value[0].toAddress(), - value[1].toBigInt() - ) - ); - } - - isRequestComplete(requestId: BigInt): boolean { - let result = super.call( - "isRequestComplete", - "isRequestComplete(uint32):(bool)", - [ethereum.Value.fromUnsignedBigInt(requestId)] - ); - - return result[0].toBoolean(); - } - - try_isRequestComplete(requestId: BigInt): ethereum.CallResult { - let result = super.tryCall( - "isRequestComplete", - "isRequestComplete(uint32):(bool)", - [ethereum.Value.fromUnsignedBigInt(requestId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - randomNumber(requestId: BigInt): BigInt { - let result = super.call("randomNumber", "randomNumber(uint32):(uint256)", [ - ethereum.Value.fromUnsignedBigInt(requestId) - ]); - - return result[0].toBigInt(); - } - - try_randomNumber(requestId: BigInt): ethereum.CallResult { - let result = super.tryCall( - "randomNumber", - "randomNumber(uint32):(uint256)", - [ethereum.Value.fromUnsignedBigInt(requestId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - requestRandomNumber(): RNGInterface__requestRandomNumberResult { - let result = super.call( - "requestRandomNumber", - "requestRandomNumber():(uint32,uint32)", - [] - ); - - return new RNGInterface__requestRandomNumberResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_requestRandomNumber(): ethereum.CallResult< - RNGInterface__requestRandomNumberResult - > { - let result = super.tryCall( - "requestRandomNumber", - "requestRandomNumber():(uint32,uint32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new RNGInterface__requestRandomNumberResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } -} - -export class RandomNumberCall extends ethereum.Call { - get inputs(): RandomNumberCall__Inputs { - return new RandomNumberCall__Inputs(this); - } - - get outputs(): RandomNumberCall__Outputs { - return new RandomNumberCall__Outputs(this); - } -} - -export class RandomNumberCall__Inputs { - _call: RandomNumberCall; - - constructor(call: RandomNumberCall) { - this._call = call; - } - - get requestId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class RandomNumberCall__Outputs { - _call: RandomNumberCall; - - constructor(call: RandomNumberCall) { - this._call = call; - } - - get randomNum(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class RequestRandomNumberCall extends ethereum.Call { - get inputs(): RequestRandomNumberCall__Inputs { - return new RequestRandomNumberCall__Inputs(this); - } - - get outputs(): RequestRandomNumberCall__Outputs { - return new RequestRandomNumberCall__Outputs(this); - } -} - -export class RequestRandomNumberCall__Inputs { - _call: RequestRandomNumberCall; - - constructor(call: RequestRandomNumberCall) { - this._call = call; - } -} - -export class RequestRandomNumberCall__Outputs { - _call: RequestRandomNumberCall; - - constructor(call: RequestRandomNumberCall) { - this._call = call; - } - - get requestId(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } - - get lockBlock(): BigInt { - return this._call.outputValues[1].value.toBigInt(); - } -} diff --git a/generated/templates/SingleRandomWinner/SingleRandomWinner.ts b/generated/templates/SingleRandomWinner/SingleRandomWinner.ts deleted file mode 100644 index 40d95e0..0000000 --- a/generated/templates/SingleRandomWinner/SingleRandomWinner.ts +++ /dev/null @@ -1,1496 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class ExternalErc20AwardAdded extends ethereum.Event { - get params(): ExternalErc20AwardAdded__Params { - return new ExternalErc20AwardAdded__Params(this); - } -} - -export class ExternalErc20AwardAdded__Params { - _event: ExternalErc20AwardAdded; - - constructor(event: ExternalErc20AwardAdded) { - this._event = event; - } - - get externalErc20(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ExternalErc20AwardRemoved extends ethereum.Event { - get params(): ExternalErc20AwardRemoved__Params { - return new ExternalErc20AwardRemoved__Params(this); - } -} - -export class ExternalErc20AwardRemoved__Params { - _event: ExternalErc20AwardRemoved; - - constructor(event: ExternalErc20AwardRemoved) { - this._event = event; - } - - get externalErc20Award(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ExternalErc721AwardAdded extends ethereum.Event { - get params(): ExternalErc721AwardAdded__Params { - return new ExternalErc721AwardAdded__Params(this); - } -} - -export class ExternalErc721AwardAdded__Params { - _event: ExternalErc721AwardAdded; - - constructor(event: ExternalErc721AwardAdded) { - this._event = event; - } - - get externalErc721(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get tokenIds(): Array { - return this._event.parameters[1].value.toBigIntArray(); - } -} - -export class ExternalErc721AwardRemoved extends ethereum.Event { - get params(): ExternalErc721AwardRemoved__Params { - return new ExternalErc721AwardRemoved__Params(this); - } -} - -export class ExternalErc721AwardRemoved__Params { - _event: ExternalErc721AwardRemoved; - - constructor(event: ExternalErc721AwardRemoved) { - this._event = event; - } - - get externalErc721Award(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Initialized extends ethereum.Event { - get params(): Initialized__Params { - return new Initialized__Params(this); - } -} - -export class Initialized__Params { - _event: Initialized; - - constructor(event: Initialized) { - this._event = event; - } - - get prizePeriodStart(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get prizePeriodSeconds(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get prizePool(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get ticket(): Address { - return this._event.parameters[3].value.toAddress(); - } - - get sponsorship(): Address { - return this._event.parameters[4].value.toAddress(); - } - - get rng(): Address { - return this._event.parameters[5].value.toAddress(); - } - - get externalErc20Awards(): Array
{ - return this._event.parameters[6].value.toAddressArray(); - } -} - -export class NoWinner extends ethereum.Event { - get params(): NoWinner__Params { - return new NoWinner__Params(this); - } -} - -export class NoWinner__Params { - _event: NoWinner; - - constructor(event: NoWinner) { - this._event = event; - } -} - -export class OwnershipTransferred extends ethereum.Event { - get params(): OwnershipTransferred__Params { - return new OwnershipTransferred__Params(this); - } -} - -export class OwnershipTransferred__Params { - _event: OwnershipTransferred; - - constructor(event: OwnershipTransferred) { - this._event = event; - } - - get previousOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class PeriodicPrizeStrategyListenerSet extends ethereum.Event { - get params(): PeriodicPrizeStrategyListenerSet__Params { - return new PeriodicPrizeStrategyListenerSet__Params(this); - } -} - -export class PeriodicPrizeStrategyListenerSet__Params { - _event: PeriodicPrizeStrategyListenerSet; - - constructor(event: PeriodicPrizeStrategyListenerSet) { - this._event = event; - } - - get periodicPrizeStrategyListener(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class PrizePoolAwardCancelled extends ethereum.Event { - get params(): PrizePoolAwardCancelled__Params { - return new PrizePoolAwardCancelled__Params(this); - } -} - -export class PrizePoolAwardCancelled__Params { - _event: PrizePoolAwardCancelled; - - constructor(event: PrizePoolAwardCancelled) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get prizePool(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get rngRequestId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get rngLockBlock(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class PrizePoolAwardStarted extends ethereum.Event { - get params(): PrizePoolAwardStarted__Params { - return new PrizePoolAwardStarted__Params(this); - } -} - -export class PrizePoolAwardStarted__Params { - _event: PrizePoolAwardStarted; - - constructor(event: PrizePoolAwardStarted) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get prizePool(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get rngRequestId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get rngLockBlock(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class PrizePoolAwarded extends ethereum.Event { - get params(): PrizePoolAwarded__Params { - return new PrizePoolAwarded__Params(this); - } -} - -export class PrizePoolAwarded__Params { - _event: PrizePoolAwarded; - - constructor(event: PrizePoolAwarded) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get randomNumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class PrizePoolOpened extends ethereum.Event { - get params(): PrizePoolOpened__Params { - return new PrizePoolOpened__Params(this); - } -} - -export class PrizePoolOpened__Params { - _event: PrizePoolOpened; - - constructor(event: PrizePoolOpened) { - this._event = event; - } - - get operator(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get prizePeriodStartedAt(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class RngRequestFailed extends ethereum.Event { - get params(): RngRequestFailed__Params { - return new RngRequestFailed__Params(this); - } -} - -export class RngRequestFailed__Params { - _event: RngRequestFailed; - - constructor(event: RngRequestFailed) { - this._event = event; - } -} - -export class RngRequestTimeoutSet extends ethereum.Event { - get params(): RngRequestTimeoutSet__Params { - return new RngRequestTimeoutSet__Params(this); - } -} - -export class RngRequestTimeoutSet__Params { - _event: RngRequestTimeoutSet; - - constructor(event: RngRequestTimeoutSet) { - this._event = event; - } - - get rngRequestTimeout(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class RngServiceUpdated extends ethereum.Event { - get params(): RngServiceUpdated__Params { - return new RngServiceUpdated__Params(this); - } -} - -export class RngServiceUpdated__Params { - _event: RngServiceUpdated; - - constructor(event: RngServiceUpdated) { - this._event = event; - } - - get rngService(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class TokenListenerUpdated extends ethereum.Event { - get params(): TokenListenerUpdated__Params { - return new TokenListenerUpdated__Params(this); - } -} - -export class TokenListenerUpdated__Params { - _event: TokenListenerUpdated; - - constructor(event: TokenListenerUpdated) { - this._event = event; - } - - get tokenListener(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class SingleRandomWinner extends ethereum.SmartContract { - static bind(address: Address): SingleRandomWinner { - return new SingleRandomWinner("SingleRandomWinner", address); - } - - calculateNextPrizePeriodStartTime(currentTime: BigInt): BigInt { - let result = super.call( - "calculateNextPrizePeriodStartTime", - "calculateNextPrizePeriodStartTime(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(currentTime)] - ); - - return result[0].toBigInt(); - } - - try_calculateNextPrizePeriodStartTime( - currentTime: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "calculateNextPrizePeriodStartTime", - "calculateNextPrizePeriodStartTime(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(currentTime)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - canCompleteAward(): boolean { - let result = super.call( - "canCompleteAward", - "canCompleteAward():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_canCompleteAward(): ethereum.CallResult { - let result = super.tryCall( - "canCompleteAward", - "canCompleteAward():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - canStartAward(): boolean { - let result = super.call("canStartAward", "canStartAward():(bool)", []); - - return result[0].toBoolean(); - } - - try_canStartAward(): ethereum.CallResult { - let result = super.tryCall("canStartAward", "canStartAward():(bool)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - currentPrize(): BigInt { - let result = super.call("currentPrize", "currentPrize():(uint256)", []); - - return result[0].toBigInt(); - } - - try_currentPrize(): ethereum.CallResult { - let result = super.tryCall("currentPrize", "currentPrize():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - estimateRemainingBlocksToPrize(secondsPerBlockMantissa: BigInt): BigInt { - let result = super.call( - "estimateRemainingBlocksToPrize", - "estimateRemainingBlocksToPrize(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(secondsPerBlockMantissa)] - ); - - return result[0].toBigInt(); - } - - try_estimateRemainingBlocksToPrize( - secondsPerBlockMantissa: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "estimateRemainingBlocksToPrize", - "estimateRemainingBlocksToPrize(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(secondsPerBlockMantissa)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getExternalErc20Awards(): Array
{ - let result = super.call( - "getExternalErc20Awards", - "getExternalErc20Awards():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getExternalErc20Awards(): ethereum.CallResult> { - let result = super.tryCall( - "getExternalErc20Awards", - "getExternalErc20Awards():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getExternalErc721AwardTokenIds(_externalErc721: Address): Array { - let result = super.call( - "getExternalErc721AwardTokenIds", - "getExternalErc721AwardTokenIds(address):(uint256[])", - [ethereum.Value.fromAddress(_externalErc721)] - ); - - return result[0].toBigIntArray(); - } - - try_getExternalErc721AwardTokenIds( - _externalErc721: Address - ): ethereum.CallResult> { - let result = super.tryCall( - "getExternalErc721AwardTokenIds", - "getExternalErc721AwardTokenIds(address):(uint256[])", - [ethereum.Value.fromAddress(_externalErc721)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigIntArray()); - } - - getExternalErc721Awards(): Array
{ - let result = super.call( - "getExternalErc721Awards", - "getExternalErc721Awards():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getExternalErc721Awards(): ethereum.CallResult> { - let result = super.tryCall( - "getExternalErc721Awards", - "getExternalErc721Awards():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getLastRngLockBlock(): BigInt { - let result = super.call( - "getLastRngLockBlock", - "getLastRngLockBlock():(uint32)", - [] - ); - - return result[0].toBigInt(); - } - - try_getLastRngLockBlock(): ethereum.CallResult { - let result = super.tryCall( - "getLastRngLockBlock", - "getLastRngLockBlock():(uint32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getLastRngRequestId(): BigInt { - let result = super.call( - "getLastRngRequestId", - "getLastRngRequestId():(uint32)", - [] - ); - - return result[0].toBigInt(); - } - - try_getLastRngRequestId(): ethereum.CallResult { - let result = super.tryCall( - "getLastRngRequestId", - "getLastRngRequestId():(uint32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - isPrizePeriodOver(): boolean { - let result = super.call( - "isPrizePeriodOver", - "isPrizePeriodOver():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isPrizePeriodOver(): ethereum.CallResult { - let result = super.tryCall( - "isPrizePeriodOver", - "isPrizePeriodOver():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isRngCompleted(): boolean { - let result = super.call("isRngCompleted", "isRngCompleted():(bool)", []); - - return result[0].toBoolean(); - } - - try_isRngCompleted(): ethereum.CallResult { - let result = super.tryCall("isRngCompleted", "isRngCompleted():(bool)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isRngRequested(): boolean { - let result = super.call("isRngRequested", "isRngRequested():(bool)", []); - - return result[0].toBoolean(); - } - - try_isRngRequested(): ethereum.CallResult { - let result = super.tryCall("isRngRequested", "isRngRequested():(bool)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isRngTimedOut(): boolean { - let result = super.call("isRngTimedOut", "isRngTimedOut():(bool)", []); - - return result[0].toBoolean(); - } - - try_isRngTimedOut(): ethereum.CallResult { - let result = super.tryCall("isRngTimedOut", "isRngTimedOut():(bool)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - periodicPrizeStrategyListener(): Address { - let result = super.call( - "periodicPrizeStrategyListener", - "periodicPrizeStrategyListener():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_periodicPrizeStrategyListener(): ethereum.CallResult
{ - let result = super.tryCall( - "periodicPrizeStrategyListener", - "periodicPrizeStrategyListener():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - prizePeriodEndAt(): BigInt { - let result = super.call( - "prizePeriodEndAt", - "prizePeriodEndAt():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_prizePeriodEndAt(): ethereum.CallResult { - let result = super.tryCall( - "prizePeriodEndAt", - "prizePeriodEndAt():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prizePeriodRemainingSeconds(): BigInt { - let result = super.call( - "prizePeriodRemainingSeconds", - "prizePeriodRemainingSeconds():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_prizePeriodRemainingSeconds(): ethereum.CallResult { - let result = super.tryCall( - "prizePeriodRemainingSeconds", - "prizePeriodRemainingSeconds():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prizePeriodSeconds(): BigInt { - let result = super.call( - "prizePeriodSeconds", - "prizePeriodSeconds():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_prizePeriodSeconds(): ethereum.CallResult { - let result = super.tryCall( - "prizePeriodSeconds", - "prizePeriodSeconds():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prizePeriodStartedAt(): BigInt { - let result = super.call( - "prizePeriodStartedAt", - "prizePeriodStartedAt():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_prizePeriodStartedAt(): ethereum.CallResult { - let result = super.tryCall( - "prizePeriodStartedAt", - "prizePeriodStartedAt():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prizePool(): Address { - let result = super.call("prizePool", "prizePool():(address)", []); - - return result[0].toAddress(); - } - - try_prizePool(): ethereum.CallResult
{ - let result = super.tryCall("prizePool", "prizePool():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - rng(): Address { - let result = super.call("rng", "rng():(address)", []); - - return result[0].toAddress(); - } - - try_rng(): ethereum.CallResult
{ - let result = super.tryCall("rng", "rng():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - rngRequestTimeout(): BigInt { - let result = super.call( - "rngRequestTimeout", - "rngRequestTimeout():(uint32)", - [] - ); - - return result[0].toBigInt(); - } - - try_rngRequestTimeout(): ethereum.CallResult { - let result = super.tryCall( - "rngRequestTimeout", - "rngRequestTimeout():(uint32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - sponsorship(): Address { - let result = super.call("sponsorship", "sponsorship():(address)", []); - - return result[0].toAddress(); - } - - try_sponsorship(): ethereum.CallResult
{ - let result = super.tryCall("sponsorship", "sponsorship():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - supportsInterface(interfaceId: Bytes): boolean { - let result = super.call( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - - return result[0].toBoolean(); - } - - try_supportsInterface(interfaceId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "supportsInterface", - "supportsInterface(bytes4):(bool)", - [ethereum.Value.fromFixedBytes(interfaceId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - ticket(): Address { - let result = super.call("ticket", "ticket():(address)", []); - - return result[0].toAddress(); - } - - try_ticket(): ethereum.CallResult
{ - let result = super.tryCall("ticket", "ticket():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - tokenListener(): Address { - let result = super.call("tokenListener", "tokenListener():(address)", []); - - return result[0].toAddress(); - } - - try_tokenListener(): ethereum.CallResult
{ - let result = super.tryCall( - "tokenListener", - "tokenListener():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class AddExternalErc20AwardCall extends ethereum.Call { - get inputs(): AddExternalErc20AwardCall__Inputs { - return new AddExternalErc20AwardCall__Inputs(this); - } - - get outputs(): AddExternalErc20AwardCall__Outputs { - return new AddExternalErc20AwardCall__Outputs(this); - } -} - -export class AddExternalErc20AwardCall__Inputs { - _call: AddExternalErc20AwardCall; - - constructor(call: AddExternalErc20AwardCall) { - this._call = call; - } - - get _externalErc20(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class AddExternalErc20AwardCall__Outputs { - _call: AddExternalErc20AwardCall; - - constructor(call: AddExternalErc20AwardCall) { - this._call = call; - } -} - -export class AddExternalErc20AwardsCall extends ethereum.Call { - get inputs(): AddExternalErc20AwardsCall__Inputs { - return new AddExternalErc20AwardsCall__Inputs(this); - } - - get outputs(): AddExternalErc20AwardsCall__Outputs { - return new AddExternalErc20AwardsCall__Outputs(this); - } -} - -export class AddExternalErc20AwardsCall__Inputs { - _call: AddExternalErc20AwardsCall; - - constructor(call: AddExternalErc20AwardsCall) { - this._call = call; - } - - get _externalErc20s(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class AddExternalErc20AwardsCall__Outputs { - _call: AddExternalErc20AwardsCall; - - constructor(call: AddExternalErc20AwardsCall) { - this._call = call; - } -} - -export class AddExternalErc721AwardCall extends ethereum.Call { - get inputs(): AddExternalErc721AwardCall__Inputs { - return new AddExternalErc721AwardCall__Inputs(this); - } - - get outputs(): AddExternalErc721AwardCall__Outputs { - return new AddExternalErc721AwardCall__Outputs(this); - } -} - -export class AddExternalErc721AwardCall__Inputs { - _call: AddExternalErc721AwardCall; - - constructor(call: AddExternalErc721AwardCall) { - this._call = call; - } - - get _externalErc721(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _tokenIds(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class AddExternalErc721AwardCall__Outputs { - _call: AddExternalErc721AwardCall; - - constructor(call: AddExternalErc721AwardCall) { - this._call = call; - } -} - -export class BeforeTokenMintCall extends ethereum.Call { - get inputs(): BeforeTokenMintCall__Inputs { - return new BeforeTokenMintCall__Inputs(this); - } - - get outputs(): BeforeTokenMintCall__Outputs { - return new BeforeTokenMintCall__Outputs(this); - } -} - -export class BeforeTokenMintCall__Inputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get referrer(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenMintCall__Outputs { - _call: BeforeTokenMintCall; - - constructor(call: BeforeTokenMintCall) { - this._call = call; - } -} - -export class BeforeTokenTransferCall extends ethereum.Call { - get inputs(): BeforeTokenTransferCall__Inputs { - return new BeforeTokenTransferCall__Inputs(this); - } - - get outputs(): BeforeTokenTransferCall__Outputs { - return new BeforeTokenTransferCall__Outputs(this); - } -} - -export class BeforeTokenTransferCall__Inputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } - - get from(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get to(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get controlledToken(): Address { - return this._call.inputValues[3].value.toAddress(); - } -} - -export class BeforeTokenTransferCall__Outputs { - _call: BeforeTokenTransferCall; - - constructor(call: BeforeTokenTransferCall) { - this._call = call; - } -} - -export class CancelAwardCall extends ethereum.Call { - get inputs(): CancelAwardCall__Inputs { - return new CancelAwardCall__Inputs(this); - } - - get outputs(): CancelAwardCall__Outputs { - return new CancelAwardCall__Outputs(this); - } -} - -export class CancelAwardCall__Inputs { - _call: CancelAwardCall; - - constructor(call: CancelAwardCall) { - this._call = call; - } -} - -export class CancelAwardCall__Outputs { - _call: CancelAwardCall; - - constructor(call: CancelAwardCall) { - this._call = call; - } -} - -export class CompleteAwardCall extends ethereum.Call { - get inputs(): CompleteAwardCall__Inputs { - return new CompleteAwardCall__Inputs(this); - } - - get outputs(): CompleteAwardCall__Outputs { - return new CompleteAwardCall__Outputs(this); - } -} - -export class CompleteAwardCall__Inputs { - _call: CompleteAwardCall; - - constructor(call: CompleteAwardCall) { - this._call = call; - } -} - -export class CompleteAwardCall__Outputs { - _call: CompleteAwardCall; - - constructor(call: CompleteAwardCall) { - this._call = call; - } -} - -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _prizePeriodStart(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _prizePeriodSeconds(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _prizePool(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get _ticket(): Address { - return this._call.inputValues[3].value.toAddress(); - } - - get _sponsorship(): Address { - return this._call.inputValues[4].value.toAddress(); - } - - get _rng(): Address { - return this._call.inputValues[5].value.toAddress(); - } - - get externalErc20Awards(): Array
{ - return this._call.inputValues[6].value.toAddressArray(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - -export class RemoveExternalErc20AwardCall extends ethereum.Call { - get inputs(): RemoveExternalErc20AwardCall__Inputs { - return new RemoveExternalErc20AwardCall__Inputs(this); - } - - get outputs(): RemoveExternalErc20AwardCall__Outputs { - return new RemoveExternalErc20AwardCall__Outputs(this); - } -} - -export class RemoveExternalErc20AwardCall__Inputs { - _call: RemoveExternalErc20AwardCall; - - constructor(call: RemoveExternalErc20AwardCall) { - this._call = call; - } - - get _externalErc20(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _prevExternalErc20(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RemoveExternalErc20AwardCall__Outputs { - _call: RemoveExternalErc20AwardCall; - - constructor(call: RemoveExternalErc20AwardCall) { - this._call = call; - } -} - -export class RemoveExternalErc721AwardCall extends ethereum.Call { - get inputs(): RemoveExternalErc721AwardCall__Inputs { - return new RemoveExternalErc721AwardCall__Inputs(this); - } - - get outputs(): RemoveExternalErc721AwardCall__Outputs { - return new RemoveExternalErc721AwardCall__Outputs(this); - } -} - -export class RemoveExternalErc721AwardCall__Inputs { - _call: RemoveExternalErc721AwardCall; - - constructor(call: RemoveExternalErc721AwardCall) { - this._call = call; - } - - get _externalErc721(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _prevExternalErc721(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RemoveExternalErc721AwardCall__Outputs { - _call: RemoveExternalErc721AwardCall; - - constructor(call: RemoveExternalErc721AwardCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall extends ethereum.Call { - get inputs(): RenounceOwnershipCall__Inputs { - return new RenounceOwnershipCall__Inputs(this); - } - - get outputs(): RenounceOwnershipCall__Outputs { - return new RenounceOwnershipCall__Outputs(this); - } -} - -export class RenounceOwnershipCall__Inputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class RenounceOwnershipCall__Outputs { - _call: RenounceOwnershipCall; - - constructor(call: RenounceOwnershipCall) { - this._call = call; - } -} - -export class SetPeriodicPrizeStrategyListenerCall extends ethereum.Call { - get inputs(): SetPeriodicPrizeStrategyListenerCall__Inputs { - return new SetPeriodicPrizeStrategyListenerCall__Inputs(this); - } - - get outputs(): SetPeriodicPrizeStrategyListenerCall__Outputs { - return new SetPeriodicPrizeStrategyListenerCall__Outputs(this); - } -} - -export class SetPeriodicPrizeStrategyListenerCall__Inputs { - _call: SetPeriodicPrizeStrategyListenerCall; - - constructor(call: SetPeriodicPrizeStrategyListenerCall) { - this._call = call; - } - - get _periodicPrizeStrategyListener(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetPeriodicPrizeStrategyListenerCall__Outputs { - _call: SetPeriodicPrizeStrategyListenerCall; - - constructor(call: SetPeriodicPrizeStrategyListenerCall) { - this._call = call; - } -} - -export class SetRngRequestTimeoutCall extends ethereum.Call { - get inputs(): SetRngRequestTimeoutCall__Inputs { - return new SetRngRequestTimeoutCall__Inputs(this); - } - - get outputs(): SetRngRequestTimeoutCall__Outputs { - return new SetRngRequestTimeoutCall__Outputs(this); - } -} - -export class SetRngRequestTimeoutCall__Inputs { - _call: SetRngRequestTimeoutCall; - - constructor(call: SetRngRequestTimeoutCall) { - this._call = call; - } - - get _rngRequestTimeout(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetRngRequestTimeoutCall__Outputs { - _call: SetRngRequestTimeoutCall; - - constructor(call: SetRngRequestTimeoutCall) { - this._call = call; - } -} - -export class SetRngServiceCall extends ethereum.Call { - get inputs(): SetRngServiceCall__Inputs { - return new SetRngServiceCall__Inputs(this); - } - - get outputs(): SetRngServiceCall__Outputs { - return new SetRngServiceCall__Outputs(this); - } -} - -export class SetRngServiceCall__Inputs { - _call: SetRngServiceCall; - - constructor(call: SetRngServiceCall) { - this._call = call; - } - - get rngService(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetRngServiceCall__Outputs { - _call: SetRngServiceCall; - - constructor(call: SetRngServiceCall) { - this._call = call; - } -} - -export class SetTokenListenerCall extends ethereum.Call { - get inputs(): SetTokenListenerCall__Inputs { - return new SetTokenListenerCall__Inputs(this); - } - - get outputs(): SetTokenListenerCall__Outputs { - return new SetTokenListenerCall__Outputs(this); - } -} - -export class SetTokenListenerCall__Inputs { - _call: SetTokenListenerCall; - - constructor(call: SetTokenListenerCall) { - this._call = call; - } - - get _tokenListener(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetTokenListenerCall__Outputs { - _call: SetTokenListenerCall; - - constructor(call: SetTokenListenerCall) { - this._call = call; - } -} - -export class StartAwardCall extends ethereum.Call { - get inputs(): StartAwardCall__Inputs { - return new StartAwardCall__Inputs(this); - } - - get outputs(): StartAwardCall__Outputs { - return new StartAwardCall__Outputs(this); - } -} - -export class StartAwardCall__Inputs { - _call: StartAwardCall; - - constructor(call: StartAwardCall) { - this._call = call; - } -} - -export class StartAwardCall__Outputs { - _call: StartAwardCall; - - constructor(call: StartAwardCall) { - this._call = call; - } -} - -export class TransferExternalERC20Call extends ethereum.Call { - get inputs(): TransferExternalERC20Call__Inputs { - return new TransferExternalERC20Call__Inputs(this); - } - - get outputs(): TransferExternalERC20Call__Outputs { - return new TransferExternalERC20Call__Outputs(this); - } -} - -export class TransferExternalERC20Call__Inputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } - - get to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get externalToken(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get amount(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TransferExternalERC20Call__Outputs { - _call: TransferExternalERC20Call; - - constructor(call: TransferExternalERC20Call) { - this._call = call; - } -} - -export class TransferOwnershipCall extends ethereum.Call { - get inputs(): TransferOwnershipCall__Inputs { - return new TransferOwnershipCall__Inputs(this); - } - - get outputs(): TransferOwnershipCall__Outputs { - return new TransferOwnershipCall__Outputs(this); - } -} - -export class TransferOwnershipCall__Inputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } - - get newOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TransferOwnershipCall__Outputs { - _call: TransferOwnershipCall; - - constructor(call: TransferOwnershipCall) { - this._call = call; - } -} diff --git a/networks/local.json b/networks/local.json deleted file mode 100644 index 5c3a9b2..0000000 --- a/networks/local.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "network": "mainnet", - "compoundPrizePoolProxyFactory": { - "address": "0x4DC0a534b596a8c91B91769c2A09315E9Bb6288B", - "startBlock": "1" - }, - "singleRandomWinnerProxyFactory": { - "address": "0x1d00e7c992490a839574a05788F7391A9911f7c7", - "startBlock": "1" - }, - "comptroller": { - "address": "0x3Aa2b03Bf8B5744f45F867F55c6A143D6A72A8Cf", - "startBlock": "1" - }, - "multipleWinnersProxyFactory": { - "address": "0xBA42f54497E428b3d41280C39A94ca01830bEA57", - "startBlock": "1" - }, - "controlledTokenProxyFactory": { - "address": "", - "startBlock": "1" - }, - "stakePrizePoolProxyFactory_v3_1_0": { - "address": "", - "startBlock": "" - } -} \ No newline at end of file diff --git a/networks/mainnet.json b/networks/mainnet.json deleted file mode 100644 index 25e2429..0000000 --- a/networks/mainnet.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "network": "mainnet", - "compoundPrizePoolProxyFactory_v3_0_1": { - "address": "0x17CfE08818E8260FAe3a19761668EBc27B24d72A", - "startBlock": "11101023" - }, - "compoundPrizePoolProxyFactory_v3_1_0": { - "address": "0x4e972abb057495635718F416E5836ac516bD2618", - "startBlock": "11428997" - }, - "compoundPrizePoolProxyFactory_v3_2_0": { - "address": "0x4e972abb057495635718f416e5836ac516bd2618", - "startBlock": "11428997" - }, - "compoundPrizePoolProxyFactory_v3_3_2": { - "address": "0x454f5AcbBE96162C0B56c74a37ACf79C65D883AC", - "startBlock": "11968248" - }, - "singleRandomWinnerProxyFactory_v3_0_1": { - "address": "0xc79B5D46f010c88f738A00B3bed7757d04dd2a37", - "startBlock": "11101039" - }, - "singleRandomWinnerProxyFactory_v3_1_0": { - "address": "0xBa49B45Bc5f7e3F23B5d994082038c836895AdfD", - "startBlock": "11429018" - }, - "comptroller": { - "address": "0x4027dE966127af5F015Ea1cfd6293a3583892668", - "startBlock": "11101017" - }, - "controlledTokenProxyFactory_v3_0_1": { - "address": "0xdd8f31f7B9C6026311464bc07aE5DB2F99F3892e", - "startBlock": "11101028" - }, - "controlledTokenProxyFactory_v3_1_0": { - "address": "0xfB932b0BcFA5208D536600ab23C13Ac55CD69Ba1", - "startBlock": "11429010" - }, - "controlledTokenProxyFactory_v3_2_0": { - "address": "0xf5FF8c8d23b70Dcaa8EEA48C9D1A6E0d64aD59Cc", - "startBlock": "11429020" - }, - "controlledTokenProxyFactory_v3_3_2": { - "address": "0xA743f8A9d7c2d7e56e6983d0b60FF19EBc0cE727", - "startBlock": "11968253" - }, - "multipleWinnersProxyFactory_v3_1_0": { - "address": "0x734E677AC3699f63f47c2bAE7a8F3c16aFf5aE70", - "startBlock": "11429015" - }, - "multipleWinnersProxyFactory_v3_2_0": { - "address": "0x734E677AC3699f63f47c2bAE7a8F3c16aFf5aE70", - "startBlock": "11429015" - }, - "multipleWinnersProxyFactory_v3_3_2": { - "address": "0xF273EfaED59fED4F41cb9E693EefD9B1191f1522", - "startBlock": "11968262" - }, - "ticketProxyFactory_v3_0_1": { - "address": "0x59b34c5BC94e2d5b9DcB97Ec935c94C353E5Eb94", - "startBlock": "11101030" - }, - "ticketProxyFactory_v3_1_0": { - "address": "0xa7d0d3C4f96BB896e0878ef4b83e5cA79700aCB9", - "startBlock": "11429012" - }, - "ticketProxyFactory_v3_3_2": { - "address": "0x8Bb5Af6F10391CdbFb4C6f141a8B31a55b3411b5", - "startBlock": "11968255" - }, - "stakePrizePoolProxyFactory_v3_1_0": { - "address": "0x3b694ce9d12F0bF032bF002b3b0473Cb58bbe3F0", - "startBlock": "11429013" - }, - "stakePrizePoolProxyFactory_v3_2_0": { - "address": "0x3b694ce9d12F0bF032bF002b3b0473Cb58bbe3F0", - "startBlock": "11429013" - }, - "stakePrizePoolProxyFactory_v3_3_2": { - "address": "0x5Ae75894EFcC1f8340b58d0efb3d59Bf366b6A4E", - "startBlock": "11968258" - }, - "yieldSourcePrizePoolProxyFactory_v3_3_2": { - "address": "0x692F55051Dc060d94227467EE4fbDE72d370728C", - "startBlock": "11968252" - }, - "sablierManager":{ - "address": "0x17CBf69d3dE5c7221AE07CFF6296F661Bb44122b", - "startBlock": "11968246" - } -} diff --git a/networks/mumbai.json b/networks/mumbai.json new file mode 100644 index 0000000..dc45ef1 --- /dev/null +++ b/networks/mumbai.json @@ -0,0 +1,31 @@ +{ + "network": "mumbai", + "compoundPrizePoolProxyFactory": { + "address": "0xdd8f31f7B9C6026311464bc07aE5DB2F99F3892e", + "startBlock": "11194160" + }, + "comptroller": { + "address": "0xdb8E47BEFe4646fCc62BE61EEE5DF350404c124F", + "startBlock": "11194150" + }, + "controlledTokenProxyFactory": { + "address": "0x259d46F1559e4d41FAf61d858b4b439D3962fC57", + "startBlock": "11194163" + }, + "multipleWinnersProxyFactory": { + "address": "0xCB876f60399897db24058b2d58D0B9f713175eeF", + "startBlock": "11194170" + }, + "ticketProxyFactory": { + "address": "0x03e75AeEB92adD6f3b168412671360eB94f0dBf7", + "startBlock": "11194164" + }, + "stakePrizePoolProxyFactory": { + "address": "0xc79B5D46f010c88f738A00B3bed7757d04dd2a37", + "startBlock": "11194166" + }, + "yieldSourcePrizePoolProxyFactory": { + "address": "0x41122Ca50202d13c809dfE88F60Da212A1525Ed7", + "startBlock": "11713809" + } +} diff --git a/networks/polygon.json b/networks/polygon.json new file mode 100644 index 0000000..403ff73 --- /dev/null +++ b/networks/polygon.json @@ -0,0 +1,31 @@ +{ + "network": "matic", + "compoundPrizePoolProxyFactory": { + "address": "0x44C585E76A5DA580f59B0a3ADd7ca0C96bF4fE2a", + "startBlock": "11606870" + }, + "comptroller": { + "address": "0x4027dE966127af5F015Ea1cfd6293a3583892668", + "startBlock": "11606852" + }, + "controlledTokenProxyFactory": { + "address": "0x59b34c5BC94e2d5b9DcB97Ec935c94C353E5Eb94", + "startBlock": "11606877" + }, + "multipleWinnersProxyFactory": { + "address": "0xa6358441F68eD4707E1c4366a0D2E2233bB4841D", + "startBlock": "11606891" + }, + "ticketProxyFactory": { + "address": "0x259d46F1559e4d41FAf61d858b4b439D3962fC57", + "startBlock": "11606880" + }, + "stakePrizePoolProxyFactory": { + "address": "0x03e75AeEB92adD6f3b168412671360eB94f0dBf7", + "startBlock": "11606884" + }, + "yieldSourcePrizePoolProxyFactory": { + "address": "0xE1d06d492107F14AE024c357005c5c692158B13D", + "startBlock": "12175288" + } +} diff --git a/networks/rinkeby.json b/networks/rinkeby.json deleted file mode 100644 index c929e77..0000000 --- a/networks/rinkeby.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "network": "rinkeby", - "compoundPrizePoolProxyFactory_v3_1_0": { - "address": "0xE83F80D1f2D447A9845C597fc465AF5FBee73698", - "startBlock": "7687002" - }, - "compoundPrizePoolProxyFactory_v3_0_1": { - "address": "0x2d22175E01eE6Db5A6512bc8D572a6da13754688", - "startBlock": "7399763" - }, - "compoundPrizePoolProxyFactory_v3_2_0": { - "address": "0x75cd7d61d1E1E4272e7C0Ee0ba1BC442657A3e6B", - "startBlock": "8062640" - }, - "compoundPrizePoolProxyFactory_v3_3_2": { - "address": "0x4bc27Ce56A98cbA03F6dd374f7a50eA993B69381", - "startBlock": "8172247" - }, - "singleRandomWinnerProxyFactory_v3_1_0": { - "address": "0x89bf5AdfCdA6e13EDd50bA03E7277d9940f16dBd", - "startBlock": "7687011" - }, - "singleRandomWinnerProxyFactory_v3_0_1": { - "address": "0x380E7De5433b9281251fabbEA72f659B9Fc28786", - "startBlock": "7399771" - }, - "comptroller": { - "address": "0xaF00636E7D943a62CCb87E8153c1C97bF657F11D", - "startBlock": "7686974" - }, - "multipleWinnersProxyFactory_v3_1_0": { - "address": "0x836C94Dcb8776C679b480b38A66524f34712981a", - "startBlock": "7687010" - }, - "multipleWinnersProxyFactory_v3_2_0": { - "address": "0x3efa7793735330a882a33ae029fa30101ef138cd", - "startBlock": "8062646" - }, - "multipleWinnersProxyFactory_v3_3_2": { - "address": "0x86C6A7De658Bd339Bd29843De5286D2B57FE3304", - "startBlock": "8172253" - }, - "controlledTokenProxyFactory_v3_0_1": { - "address": "0x0Bf382c908693033370BEEff8500De4e5F40b7c6", - "startBlock": "7399765" - }, - "controlledTokenProxyFactory_v3_1_0": { - "address": "0xF8D06e34Df36fB32Bb69D575AF4d17f83FE4B884", - "startBlock": "7687005" - }, - "controlledTokenProxyFactory_v3_2_0": { - "address": "0x057Db7C55ffa0E5Eddf1d30F33d1320F5335A2CB", - "startBlock": "8062648" - }, - "controlledTokenProxyFactory_v3_3_2": { - "address": "0xe16e1a7Ae85F1E4d0F63E855a17Fb1665603c54B", - "startBlock": "8172249" - }, - "ticketProxyFactory_v3_0_1": { - "address": "0x1E15De9d0b3f3a6B17FA54f8a16C631Ed4e14DD8", - "startBlock": "7399766" - }, - "ticketProxyFactory_v3_1_0": { - "address": "0xccad64BB6Bb69c7D31458D8e10e246bA3cC8FED4", - "startBlock": "7687005" - }, - "ticketProxyFactory_v3_3_2": { - "address": "0x863cb3fe0f23bd62d91c1923799d6a14f87a2db8", - "startBlock": "8172250" - }, - "stakePrizePoolProxyFactory_v3_1_0": { - "address": "0x69193dcD04366860CB96315335e815359D6caED4", - "startBlock": "7687009" - }, - "stakePrizePoolProxyFactory_v3_2_0": { - "address": "0x96fa8c550b5f5233cb5bd384b033edd10c8c90bb", - "startBlock": "8062644" - }, - "stakePrizePoolProxyFactory_v3_3_2": { - "address": "0x594C2b2cAf96e259d9ED8bd0c4dCB19C12e4aA0a", - "startBlock": "8172251" - }, - "yieldSourcePrizePoolProxyFactory_v3_3_2": { - "address": "0xF25E689a66A3f4dC572fA5ec59227b3225b84c15", - "startBlock": "8172248" - }, - "sablierManager":{ - "address": "0x24FB66cef99B12c4088c9297528f7f13829936D3", - "startBlock": "8172246" - } -} diff --git a/package.json b/package.json index 584afcb..c94294e 100644 --- a/package.json +++ b/package.json @@ -5,36 +5,29 @@ "scripts": { "reinstall": "rm -rf node_modules/ && yarn", "clean": "rm -rf build/ generated/", - "prepare:local": "mustache networks/local.json subgraph.template.yaml subgraph.local.yaml", - "create:local": "graph create --node http://127.0.0.1:8020 pooltogether/ptv3-subgraph subgraph.local.yaml", - "remove:local": "graph remove --node http://127.0.0.1:8020 pooltogether/ptv3-subgraph subgraph.local.yaml", - "create:rinkeby-stg": "graph create --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/rinkeby-staging-v3 subgraph.local.yaml", - "prepare:mainnet": "mustache networks/mainnet.json subgraph.template.yaml subgraph.mainnet.yaml", - "prepare:rinkeby": "mustache networks/rinkeby.json subgraph.template.yaml subgraph.rinkeby.yaml", - "gen:mainnet": "graph codegen subgraph.mainnet.yaml", - "gen:rinkeby": "graph codegen subgraph.rinkeby.yaml", - "gen:local": "graph codegen subgraph.local.yaml", - "deploy:mainnet": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/pooltogether-v3_1_0 subgraph.mainnet.yaml", - "deploy:mainnet-stg": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/pooltogether-staging-v3_1_0 subgraph.mainnet.yaml", - "deploy:rinkeby": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/rinkeby-v3_1_0 subgraph.rinkeby.yaml", - "deploy:rinkeby-stg": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/rinkeby-staging-v3_1_0 subgraph.rinkeby.yaml", - "deploy:local": "graph deploy --node http://127.0.0.1:8020 --ipfs http://localhost:5001 pooltogether/ptv3-subgraph subgraph.local.yaml", - "all-local": "yarn clean && yarn prepare:local && yarn gen:local && yarn deploy:local", - "all-rinkeby-stg": "yarn clean && yarn prepare:rinkeby && yarn gen:rinkeby && yarn deploy:rinkeby-stg", - "all-rinkeby": "yarn clean && yarn prepare:rinkeby && yarn gen:rinkeby && yarn deploy:rinkeby", - "all-mainnet": "yarn clean && yarn prepare:mainnet && yarn gen:mainnet && yarn deploy:mainnet", - "all-mainnet-stg": "yarn clean && yarn prepare:mainnet && yarn gen:mainnet && yarn deploy:mainnet-stg", + "prepare:polygon": "mustache networks/polygon.json subgraph.template.yaml subgraph.polygon.yaml", + "prepare:mumbai": "mustache networks/mumbai.json subgraph.template.yaml subgraph.mumbai.yaml", + + "gen:polygon": "graph codegen subgraph.polygon.yaml", + "gen:mumbai": "graph codegen subgraph.mumbai.yaml", + + "deploy:polygon": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/pooltogether-polygon-v3_3 subgraph.polygon.yaml", + "deploy:mumbai": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pooltogether/pooltogether-mumbai-v3_3 subgraph.mumbai.yaml", + + "all-mumbai": "yarn clean && yarn prepare:mumbai && yarn gen:mumbai && yarn deploy:mumbai", + + "all-polygon": "yarn clean && yarn prepare:polygon && yarn gen:polygon && yarn deploy:polygon", + "codegen": "graph codegen", - "build:mainnet": "graph build subgraph.mainnet.yaml", - "build:rinkeby": "graph build subgraph.rinkeby.yaml", + "build:polygon": "graph build subgraph.polygon.yaml", + "build:mumbai": "graph build subgraph.mumbai.yaml", "auth": "graph auth https://api.thegraph.com/deploy/", "tag-release": "PACKAGE_VERSION=$(./scripts/package-version.sh) && git tag -ae v$PACKAGE_VERSION && git push --tags" }, "dependencies": { - "@graphprotocol/graph-cli": "^0.19.0", - "@graphprotocol/graph-ts": "^0.19.0", - "@pooltogether/pooltogether-contracts": "^3.3.2", - "ptv3.1.0": "pooltogether/pooltogether-pool-contracts#e7aaad778093fdb48f740576bf8affa3ca31636f", + "@graphprotocol/graph-cli": "^0.20.0", + "@graphprotocol/graph-ts": "^0.20.0", + "@pooltogether/pooltogether-contracts": "^3.3.5", "mustache": "^4.0.1" } } diff --git a/schema.graphql b/schema.graphql index e9b3ce4..066f82a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -366,7 +366,7 @@ type VolumeDrip @entity { deactivated: Boolean! } - +# id address of prizeStrategy type MultipleWinnersPrizeStrategy @entity { id: ID! owner: Bytes diff --git a/src/helpers/loadOrCreateAwardedExternalErc.ts b/src/helpers/loadOrCreateAwardedExternalErc.ts index b53ac4b..eb6c54a 100644 --- a/src/helpers/loadOrCreateAwardedExternalErc.ts +++ b/src/helpers/loadOrCreateAwardedExternalErc.ts @@ -2,7 +2,7 @@ import { Address, BigInt, log } from '@graphprotocol/graph-ts' import { ERC20 as ERC20Contract, -} from '../../generated/templates/PrizePool_v3_0_1/ERC20' +} from '../../generated/templates/PrizePool/ERC20' import { Prize, diff --git a/src/helpers/loadOrCreateExternalAward.ts b/src/helpers/loadOrCreateExternalAward.ts index 4c3d507..c164c59 100644 --- a/src/helpers/loadOrCreateExternalAward.ts +++ b/src/helpers/loadOrCreateExternalAward.ts @@ -2,7 +2,7 @@ import { Address, BigInt, log } from '@graphprotocol/graph-ts' import { ERC20 as ERC20Contract, -} from '../../generated/templates/PrizePool_v3_0_1/ERC20' +} from '../../generated/templates/PrizePool/ERC20' import { SingleRandomWinnerExternalErc20Award, diff --git a/src/helpers/loadOrCreateMultipleWinnersExternalAward.ts b/src/helpers/loadOrCreateMultipleWinnersExternalAward.ts index 2bbd97a..b65a0c1 100644 --- a/src/helpers/loadOrCreateMultipleWinnersExternalAward.ts +++ b/src/helpers/loadOrCreateMultipleWinnersExternalAward.ts @@ -2,7 +2,7 @@ import { Address, BigInt, log } from '@graphprotocol/graph-ts' import { ERC20 as ERC20Contract, -} from '../../generated/templates/PrizePool_v3_1_0/ERC20' +} from '../../generated/templates/PrizePool/ERC20' import { MultipleWinnersExternalErc20Award, diff --git a/src/helpers/loadOrCreatePrizePool.ts b/src/helpers/loadOrCreatePrizePool.ts index 6a298fb..3ac1e35 100644 --- a/src/helpers/loadOrCreatePrizePool.ts +++ b/src/helpers/loadOrCreatePrizePool.ts @@ -5,8 +5,8 @@ import { } from '../../generated/schema' import { - PrizePool_v3 as PrizePoolContract, -} from '../../generated/templates/PrizePool_v3/PrizePool_v3' + PrizePool as PrizePoolContract, +} from '../../generated/templates/PrizePool/PrizePool' import { ControlledToken as ControlledTokenContract, @@ -18,9 +18,13 @@ import { ZERO, ONE, ZERO_ADDRESS } from './common' export function loadOrCreatePrizePool( prizePool: Address ): PrizePool { + + log.warning("loadOrCreatePrizePool called for {} ",[prizePool.toHexString()]) + let _prizePool = PrizePool.load(prizePool.toHex()) if (!_prizePool) { + log.warning("loadOrCreatePrizePool creating a prizePool {} ", [prizePool.toHexString()]) _prizePool = new PrizePool(prizePool.toHex()) const boundPrizePool = PrizePoolContract.bind(prizePool) @@ -106,6 +110,5 @@ export function loadOrCreatePrizePool( _prizePool.save() } - return _prizePool as PrizePool } diff --git a/src/mappingForCompoundPrizePool.ts b/src/mappingForCompoundPrizePool.ts index ee4458a..7247ce7 100644 --- a/src/mappingForCompoundPrizePool.ts +++ b/src/mappingForCompoundPrizePool.ts @@ -1,9 +1,12 @@ import { CompoundPrizePoolInitialized, -} from '../generated/templates/CompoundPrizePool/CompoundPrizePool' +} from '../generated/templates/CompoundPrizePool/CompoundPrizePool' // but any should do since its the same event for all import { loadOrCreateCompoundPrizePool } from './helpers/loadOrCreateCompoundPrizePool' +// the initialised event is the same for all compound prize pools so just one handler required +// called form the data source template + export function handleCompoundPrizePoolInitialized(event: CompoundPrizePoolInitialized): void { const _compoundPrizePool = loadOrCreateCompoundPrizePool(event.address) _compoundPrizePool.cToken = event.params.cToken diff --git a/src/mappingForCompoundPrizePoolProxyFactory.ts b/src/mappingForCompoundPrizePoolProxyFactory.ts new file mode 100644 index 0000000..97d0879 --- /dev/null +++ b/src/mappingForCompoundPrizePoolProxyFactory.ts @@ -0,0 +1,16 @@ + +import { + ProxyCreated, + } from '../generated/CompoundPrizePoolProxyFactory/CompoundPrizePoolProxyFactory' + + import { + PrizePool as PrizePoolTemplate, + CompoundPrizePool as CompoundPrizePoolTemplate, + } from '../generated/templates' + + export function handleProxyCreated(event: ProxyCreated): void { + // Start listening for events from the dynamically generated contract + // PrizePoolV3Template.create(event.params.proxy) + PrizePoolTemplate.create(event.params.proxy) + CompoundPrizePoolTemplate.create(event.params.proxy) + } \ No newline at end of file diff --git a/src/mappingForCompoundPrizePoolProxyFactory_v3.ts b/src/mappingForCompoundPrizePoolProxyFactory_v3.ts deleted file mode 100644 index 4e1dc9f..0000000 --- a/src/mappingForCompoundPrizePoolProxyFactory_v3.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { - ProxyCreated, -} from '../generated/CompoundPrizePoolProxyFactory_v3_1_0/CompoundPrizePoolProxyFactory_v3_1_0' - -import { - PrizePool_v3 as PrizePoolV3Template, - PrizePool_v3_1_0 as PrizePoolTemplate, - CompoundPrizePool as CompoundPrizePoolTemplate, -} from '../generated/templates' - -export function handleProxyCreated(event: ProxyCreated): void { - // Start listening for events from the dynamically generated contract - PrizePoolV3Template.create(event.params.proxy) - PrizePoolTemplate.create(event.params.proxy) - CompoundPrizePoolTemplate.create(event.params.proxy) -} \ No newline at end of file diff --git a/src/mappingForControlledTokenProxyFactory_v3.ts b/src/mappingForControlledTokenProxyFactory.ts similarity index 72% rename from src/mappingForControlledTokenProxyFactory_v3.ts rename to src/mappingForControlledTokenProxyFactory.ts index 95fce25..e88e264 100644 --- a/src/mappingForControlledTokenProxyFactory_v3.ts +++ b/src/mappingForControlledTokenProxyFactory.ts @@ -1,6 +1,6 @@ import { ProxyCreated, - } from '../generated/ControlledTokenProxyFactory_v3_1_0/ControlledTokenProxyFactory_v3_1_0' + } from '../generated/ControlledTokenProxyFactory/ControlledTokenProxyFactory' import { ControlledToken as ControlledTokenTemplate, diff --git a/src/mappingForMultipleWinners_v3_1_0.ts b/src/mappingForMultipleWinners.ts similarity index 84% rename from src/mappingForMultipleWinners_v3_1_0.ts rename to src/mappingForMultipleWinners.ts index d1a0d4a..bf2f2c2 100644 --- a/src/mappingForMultipleWinners_v3_1_0.ts +++ b/src/mappingForMultipleWinners.ts @@ -27,6 +27,7 @@ import {Initialized} from "../generated/templates/MultipleWinners/MultipleWinner import { ONE } from "./helpers/common" import { loadOrCreatePrize } from "./helpers/loadOrCreatePrize" import { loadOrCreateControlledToken } from "./helpers/loadOrCreateControlledToken" +import { loadOrCreatePrizePool } from "./helpers/loadOrCreatePrizePool" @@ -37,7 +38,7 @@ export function handleNumberOfWinnersSet(event: NumberOfWinnersSet) : void { } export function handlePrizePoolOpened(event: PrizePoolOpened): void { - log.warning("Prize Pool Opened!",[]) + log.warning("Prize Pool Opened! {} ",[event.address.toHexString()]) // no-op } @@ -47,6 +48,8 @@ export function handleSplitExternalErc20AwardsSet(event: SplitExternalErc20Award _prizeStrategy.save() } + +// this is called before the prizepool initializer export function handlePeriodicPrizeInitialized(event: Initialized) : void { const prizePool = event.params.prizePool const rng =event.params.rng @@ -55,19 +58,27 @@ export function handlePeriodicPrizeInitialized(event: Initialized) : void { const startTime = event.params.prizePeriodStart const prizePeriod = event.params.prizePeriodSeconds - const multipleWinners = MultipleWinnersPrizeStrategy.load(event.address.toHex()) + log.warning("MultipleWinners being intialized for {} ",[event.address.toHexString()]) + + + let multipleWinners = MultipleWinnersPrizeStrategy.load(event.address.toHexString()) if(!multipleWinners){ - log.error("multiple winners does not exist for {} ",[event.address.toHexString()]) + log.error("debu multiple winners does not exist for {} ",[event.address.toHexString()]) + // multipleWinners = new MultipleWinnersPrizeStrategy(event.address.toHexString()) } - const _checkPrizePool = PrizePool.load(prizePool.toHex()) - if(!_checkPrizePool){ - log.warning("checkprizepool setting mw prizePool to null!",[]) - multipleWinners.prizePool = null - } - else{ - multipleWinners.prizePool = _checkPrizePool.id - } + // const _checkPrizePool = PrizePool.load(prizePool.toHexString()) + // if(!_checkPrizePool){ + // log.info("debug556 checkprizepool setting mw prizePool to null! for {}",[event.address.toHexString()]) + // multipleWinners.prizePool = null + // } + // else{ + // multipleWinners.prizePool = _checkPrizePool.id + // } + + const _prizePool = loadOrCreatePrizePool(prizePool) + multipleWinners.prizePool = prizePool.toHexString() + multipleWinners.prizePeriodStartedAt = startTime @@ -109,9 +120,11 @@ export function handleExternalErc20AwardAdded(event: ExternalErc20AwardAdded): v export function handlePrizePoolAwarded(event: PrizePoolAwarded) : void { + log.warning("PrizePoolAwarded called for {}", [event.address.toHexString()]) + const mwStrategy = MultipleWinnersPrizeStrategy.load(event.address.toHex()) if(!mwStrategy.prizePool){ // if prizePool is empty just skip (temp) - log.warning("prizepool not linked to strategy",[]) + log.warning("prizepool not linked to strategy for prize strategy {}",[event.address.toHexString()]) return } diff --git a/src/mappingForMultipleWinnersProxyFactory_v3.ts b/src/mappingForMultipleWinnersProxyFactory.ts similarity index 70% rename from src/mappingForMultipleWinnersProxyFactory_v3.ts rename to src/mappingForMultipleWinnersProxyFactory.ts index abee6a1..c8aeb20 100644 --- a/src/mappingForMultipleWinnersProxyFactory_v3.ts +++ b/src/mappingForMultipleWinnersProxyFactory.ts @@ -1,18 +1,21 @@ -import { BigInt } from '@graphprotocol/graph-ts' +import { BigInt, log } from '@graphprotocol/graph-ts' -import { ProxyCreated } from "../generated/MultipleWinnersProxyFactory_v3_1_0/MultipleWinnersProxyFactory_v3_1_0" +import { ProxyCreated } from "../generated/MultipleWinnersProxyFactory/MultipleWinnersProxyFactory" import { loadOrCreatePrizeStrategy } from './helpers/loadOrCreatePrizeStrategy' import { - MultipleWinnersPrizeStrategy, + MultipleWinnersPrizeStrategy } from '../generated/schema' -import { MultipleWinners as MultipleWinnersTemplate } from "../generated/templates" +import { MultipleWinners } from "../generated/templates" export function handleMultipleWinnersCreated(event: ProxyCreated) : void{ const address = event.params.proxy.toHexString() + + log.info("debug771 creating a MWPrizeStrategy for {}", [address]) + const multipleWinners = new MultipleWinnersPrizeStrategy(address) // set fields to blank/generic for now - Initialized event called straight after @@ -26,5 +29,11 @@ export function handleMultipleWinnersCreated(event: ProxyCreated) : void{ prizeStrategy.multipleWinners = multipleWinners.id prizeStrategy.save() - MultipleWinnersTemplate.create(event.params.proxy) + + // creating multiple templates + MultipleWinners.create(event.params.proxy) + + + + } diff --git a/src/mappingForPrizePool.ts b/src/mappingForPrizePool.ts index 76ddd88..75186fb 100644 --- a/src/mappingForPrizePool.ts +++ b/src/mappingForPrizePool.ts @@ -17,7 +17,8 @@ import { CreditPlanSet, PrizeStrategySet, OwnershipTransferred, -} from '../generated/templates/PrizePool_v3/PrizePool_v3' + Initialized +} from '../generated/templates/PrizePool/PrizePool' import {externalAwardId} from "./helpers/idTemplates" @@ -59,6 +60,9 @@ export function handleCreditPlanSet(event: CreditPlanSet): void { } export function handlePrizeStrategySet(event: PrizeStrategySet): void { + + log.warning("debugps handlePrizeStrategySet for {} as {} ",[event.address.toHexString(), event.params.prizeStrategy.toHexString()]) + const _prizePoolAddress = event.address const _prizeStrategyAddress = event.params.prizeStrategy @@ -211,4 +215,18 @@ export function handleTimelockDeposited(event: TimelockDeposited): void { export function handleDeposited(event: Deposited):void { loadOrCreatePrizePoolAccount(event.address, event.params.to.toHex()) -} \ No newline at end of file +} + + + +// inserted from 3_3_2 +export function handleInitialized(event: Initialized): void { + + log.warning("PrizePool Initialized called for {} ",[event.address.toHexString()]) + + const _prizePool = loadOrCreatePrizePool(event.address) + _prizePool.reserveRegistry = event.params.reserveRegistry + _prizePool.maxExitFeeMantissa = event.params.maxExitFeeMantissa + _prizePool.maxTimelockDuration = event.params.maxTimelockDuration + _prizePool.save() +} diff --git a/src/mappingForPrizePool_v3_0_1.ts b/src/mappingForPrizePool_v3_0_1.ts deleted file mode 100644 index d499107..0000000 --- a/src/mappingForPrizePool_v3_0_1.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { - Initialized -} from '../generated/templates/PrizePool_v3_0_1/PrizePool_v3_0_1' - -import { loadOrCreatePrizePool } from './helpers/loadOrCreatePrizePool' - -export function handleInitialized(event: Initialized): void { - const _prizePool = loadOrCreatePrizePool(event.address) - _prizePool.reserveRegistry = event.params.reserveRegistry - _prizePool.maxExitFeeMantissa = event.params.maxExitFeeMantissa - _prizePool.maxTimelockDuration = event.params.maxTimelockDuration - _prizePool.save() -} diff --git a/src/mappingForPrizePool_v3_1_0.ts b/src/mappingForPrizePool_v3_1_0.ts deleted file mode 100644 index 26f3101..0000000 --- a/src/mappingForPrizePool_v3_1_0.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { - Initialized -} from '../generated/templates/PrizePool_v3_1_0/PrizePool_v3_1_0' - -import { loadOrCreatePrizePool } from './helpers/loadOrCreatePrizePool' - -export function handleInitialized(event: Initialized): void { - const _prizePool = loadOrCreatePrizePool(event.address) - _prizePool.reserveRegistry = event.params.reserveRegistry - _prizePool.maxExitFeeMantissa = event.params.maxExitFeeMantissa - _prizePool.maxTimelockDuration = event.params.maxTimelockDuration - _prizePool.save() -} diff --git a/src/mappingForSingleRandomWinnerProxyFactory.ts b/src/mappingForSingleRandomWinnerProxyFactory.ts index 133d81d..8110d4c 100644 --- a/src/mappingForSingleRandomWinnerProxyFactory.ts +++ b/src/mappingForSingleRandomWinnerProxyFactory.ts @@ -1,6 +1,6 @@ import { ProxyCreated, // note that the version doesn't matter here, it's just the way the generated code works -} from '../generated/SingleRandomWinnerProxyFactory_v3_1_0/SingleRandomWinnerProxyFactory' +} from '../generated/SingleRandomWinnerProxyFactory/SingleRandomWinnerProxyFactory' import { SingleRandomWinner as SingleRandomWinnerTemplate, diff --git a/src/mappingForStakePrizePoolProxyFactory_v3.ts b/src/mappingForStakePrizePoolProxyFactory.ts similarity index 62% rename from src/mappingForStakePrizePoolProxyFactory_v3.ts rename to src/mappingForStakePrizePoolProxyFactory.ts index c0c0280..1756d81 100644 --- a/src/mappingForStakePrizePoolProxyFactory_v3.ts +++ b/src/mappingForStakePrizePoolProxyFactory.ts @@ -1,16 +1,14 @@ import { ProxyCreated, - } from '../generated/StakePrizePoolProxyFactory_v3_1_0/StakePrizePoolProxyFactory' + } from '../generated/StakePrizePoolProxyFactory/StakePrizePoolProxyFactory' import { - PrizePool_v3 as PrizePoolV3Template, - PrizePool_v3_1_0 as PrizePoolTemplate, + PrizePool as PrizePoolTemplate, StakePrizePool as StakePrizeTemplate, } from '../generated/templates' export function handleStakePrizePoolCreated(event: ProxyCreated): void { // Start listening for events from the dynamically generated contract - PrizePoolV3Template.create(event.params.proxy) PrizePoolTemplate.create(event.params.proxy) StakePrizeTemplate.create(event.params.proxy) } diff --git a/src/mappingForTicketProxyFactory_v3.ts b/src/mappingForTicketProxyFactory.ts similarity index 83% rename from src/mappingForTicketProxyFactory_v3.ts rename to src/mappingForTicketProxyFactory.ts index 5650024..be18c88 100644 --- a/src/mappingForTicketProxyFactory_v3.ts +++ b/src/mappingForTicketProxyFactory.ts @@ -2,7 +2,7 @@ import { log } from '@graphprotocol/graph-ts' import { ProxyCreated -} from '../generated/TicketProxyFactory_v3_1_0/TicketProxyFactory_v3_1_0' +} from '../generated/TicketProxyFactory/TicketProxyFactory' import { ControlledToken as ControlledTokenTemplate diff --git a/src/mappingForYieldSourcePrizePoolProxyFactory_v3.ts b/src/mappingForYieldSourcePrizePoolProxyFactory.ts similarity index 61% rename from src/mappingForYieldSourcePrizePoolProxyFactory_v3.ts rename to src/mappingForYieldSourcePrizePoolProxyFactory.ts index b05cb69..4c29388 100644 --- a/src/mappingForYieldSourcePrizePoolProxyFactory_v3.ts +++ b/src/mappingForYieldSourcePrizePoolProxyFactory.ts @@ -1,16 +1,15 @@ import { ProxyCreated, -} from "../generated/YieldSourcePrizePoolProxyFactory_v3_3_2/YieldSourcePrizePoolProxyFactory_v3_3_2" +} from "../generated/YieldSourcePrizePoolProxyFactory/YieldSourcePrizePoolProxyFactory" import { - PrizePool_v3 as PrizePoolV3Template, - PrizePool_v3_0_1 as PrizePoolTemplate, + + PrizePool as PrizePoolTemplate, YieldSourcePrizePool as YieldSourcePrizePoolTemplate, } from '../generated/templates' export function handleProxyCreated(event: ProxyCreated): void { // Start listening for events from the dynamically generated contract - PrizePoolV3Template.create(event.params.proxy) PrizePoolTemplate.create(event.params.proxy) YieldSourcePrizePoolTemplate.create(event.params.proxy) } diff --git a/subgraph.mumbai.yaml b/subgraph.mumbai.yaml new file mode 100644 index 0000000..13e9a9f --- /dev/null +++ b/subgraph.mumbai.yaml @@ -0,0 +1,425 @@ +specVersion: 0.0.2 +schema: + file: ./schema.graphql +dataSources: + - name: Comptroller + kind: ethereum/contract + network: mumbai + source: + address: "0xdb8E47BEFe4646fCc62BE61EEE5DF350404c124F" + abi: Comptroller + startBlock: 11194150 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForComptroller.ts + entities: + - Comptroller + abis: + - name: Comptroller + file: ./abis/v3_1_0/abis/Comptroller.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: BalanceDripActivated(indexed address,indexed address,indexed address,uint256) + handler: handleBalanceDripActivated + - event: BalanceDripDeactivated(indexed address,indexed address,indexed address) + handler: handleBalanceDripDeactivated + - event: BalanceDripRateSet(indexed address,indexed address,indexed address,uint256) + handler: handleBalanceDripRateSet + - event: BalanceDripDripped(indexed address,indexed address,indexed address,address,uint256) + handler: handleBalanceDripDripped + - event: VolumeDripActivated(indexed address,indexed address,indexed address,bool,uint256,uint256) + handler: handleVolumeDripActivated + - event: VolumeDripDeactivated(indexed address,indexed address,indexed address,bool) + handler: handleVolumeDripDeactivated + - event: VolumeDripSet(indexed address,indexed address,indexed address,bool,uint256,uint256) + handler: handleVolumeDripSet + - event: VolumeDripPeriodStarted(indexed address,indexed address,indexed address,bool,uint32,uint256,uint256) + handler: handleVolumeDripPeriodStarted + - event: VolumeDripPeriodEnded(indexed address,indexed address,indexed address,bool,uint32,uint256,uint256) + handler: handleVolumeDripPeriodEnded + - event: VolumeDripDripped(indexed address,indexed address,indexed address,bool,address,uint256) + handler: handleVolumeDripDripped + + + + + + # doesnt seem to be a way to add to the above + - name: CompoundPrizePoolProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0xdd8f31f7B9C6026311464bc07aE5DB2F99F3892e" + abi: CompoundPrizePoolProxyFactory + startBlock: 11194160 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - CompoundPrizePool + abis: + - name: CompoundPrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForCompoundPrizePoolProxyFactory.ts #using existing ProxyCreated event since the ProxyCreated event is the same -- can we join mappingForCompoundPrizePoolFactories together for all versions? + + # doesnt seem to be a way to add to the above + - name: YieldSourcePrizePoolProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0x41122Ca50202d13c809dfE88F60Da212A1525Ed7" + abi: YieldSourcePrizePoolProxyFactory + startBlock: 11713809 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - YieldSourcePrizePool + abis: + - name: YieldSourcePrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForYieldSourcePrizePoolProxyFactory.ts #using existing ProxyCreated event + + + + + + + - name: MultipleWinnersProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0xCB876f60399897db24058b2d58D0B9f713175eeF" + abi: MultipleWinnersProxyFactory + startBlock: 11194170 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - MultipleWinnersPrizeStrategy + abis: + - name: MultipleWinnersProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinnersProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleMultipleWinnersCreated + file: ./src/mappingForMultipleWinnersProxyFactory.ts + + + - name: StakePrizePoolProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0xc79B5D46f010c88f738A00B3bed7757d04dd2a37" + abi: StakePrizePoolProxyFactory + startBlock: 11194166 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - StakePrizePool + abis: + - name: StakePrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/StakePrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleStakePrizePoolCreated + file: ./src/mappingForStakePrizePoolProxyFactory.ts + + + - name: ControlledTokenProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0x259d46F1559e4d41FAf61d858b4b439D3962fC57" + abi: ControlledTokenProxyFactory + startBlock: 11194163 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - ControlledToken + abis: + - name: ControlledTokenProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledTokenProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForControlledTokenProxyFactory.ts + + - name: TicketProxyFactory + kind: ethereum/contract + network: mumbai + source: + address: "0x03e75AeEB92adD6f3b168412671360eB94f0dBf7" + abi: TicketProxyFactory + startBlock: 11194164 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - ControlledToken + abis: + - name: TicketProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/TicketProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForTicketProxyFactory.ts + +templates: + - name: SingleRandomWinner + kind: ethereum/contract + network: mumbai + source: + abi: SingleRandomWinner + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForSingleRandomWinner.ts + entities: + - SingleRandomWinnerPrizeStrategy + abis: + - name: ERC20 + file: ./abis/ERC20.json + - name: PrizePool + file: ./abis/v3_1_0/abis/PrizePool.json + - name: SingleRandomWinner + file: ./abis/v3_1_0/abis/SingleRandomWinner.json + - name: RNGInterface + file: ./abis/v3_1_0/abis/RNGInterface.json + - name: Comptroller + file: ./abis/v3_1_0/abis/Comptroller.json + - name: ControlledToken + file: ./abis/v3_1_0/abis/ControlledToken.json + eventHandlers: + - event: TokenListenerUpdated(indexed address) + handler: handleTokenListenerUpdated + - event: PrizePoolOpened(indexed address,indexed uint256) + handler: handlePrizePoolOpened + - event: PrizePoolAwardStarted(indexed address,indexed address,indexed uint32,uint32) + handler: handlePrizePoolAwardStarted + - event: PrizePoolAwarded(indexed address,uint256) + handler: handlePrizePoolAwarded + - event: RngServiceUpdated(indexed address) + handler: handleRngServiceUpdated + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: ExternalErc20AwardAdded(indexed address) + handler: handleExternalErc20AwardAdded + - event: ExternalErc20AwardRemoved(indexed address) + handler: handleExternalErc20AwardRemoved + - event: ExternalErc721AwardAdded(indexed address,uint256[]) + handler: handleExternalErc721AwardAdded + - event: ExternalErc721AwardRemoved(indexed address) + handler: handleExternalErc721AwardRemoved + + - name: StakePrizePool + kind: ethereum/contract + network: mumbai + source: + abi: StakePrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForStakePrizePool.ts + entities: + - StakePrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: StakePrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/StakePrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: StakePrizePoolInitialized(indexed address) + handler: handleStakePrizePoolInitialized + + + - name: CompoundPrizePool + kind: ethereum/contract + network: mumbai + source: + abi: CompoundPrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForCompoundPrizePool.ts + entities: + - CompoundPrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: CompoundPrizePoolInitialized(indexed address) + handler: handleCompoundPrizePoolInitialized + + - name: YieldSourcePrizePool + kind: ethereum/contract + network: mumbai + source: + abi: YieldSourcePrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForYieldSourcePrizePool.ts + entities: + - YieldSourcePrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: YieldSourcePrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: YieldSourcePrizePoolInitialized(indexed address) + handler: handleYieldSourcePrizePoolInitialized + + + - name: PrizePool + kind: ethereum/contract + network: mumbai + source: + abi: PrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForPrizePool.ts + entities: + - PrizePool + abis: + - name: ERC20 + file: ./abis/ERC20.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: ControlledTokenAdded(indexed address) + handler: handleControlledTokenAdded + - event: ReserveFeeCaptured(uint256) + handler: handleReserveFeeCaptured + - event: LiquidityCapSet(uint256) + handler: handleLiquidityCapSet + - event: TimelockDeposited(indexed address,indexed address,indexed address,uint256) + handler: handleTimelockDeposited + - event: Awarded(indexed address,indexed address,uint256) + handler: handleAwarded + - event: AwardedExternalERC20(indexed address,indexed address,uint256) + handler: handleAwardedExternalERC20 + - event: AwardedExternalERC721(indexed address,indexed address,uint256[]) + handler: handleAwardedExternalERC721 + - event: TimelockedWithdrawal(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleTimelockedWithdrawal + - event: TimelockedWithdrawalSwept(indexed address,indexed address,uint256,uint256) + handler: handleTimelockedWithdrawalSwept + - event: CreditPlanSet(address,uint128,uint128) + handler: handleCreditPlanSet + - event: PrizeStrategySet(indexed address) + handler: handlePrizeStrategySet + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: Deposited(indexed address,indexed address,indexed address,uint256,address) + handler: handleDeposited + - event: Initialized(address,uint256,uint256) # added together + handler: handleInitialized + + - name: ControlledToken # will one controlled token do all versions? + kind: ethereum/contract + network: mumbai + source: + abi: ControlledToken + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForControlledToken.ts + entities: + - ControlledToken + abis: + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + + + - name: MultipleWinners + kind: ethereum/contract + network: mumbai + source: + abi: MultipleWinners + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForMultipleWinners.ts + entities: + - PeriodicPrizeStrategy + - MultipleWinners + abis: + - name: MultipleWinners + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinners.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ERC20 + file: ./abis/ERC20.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: TokenListenerUpdated(indexed address) + handler: handleTokenListenerUpdated + - event: PrizePoolOpened(indexed address,indexed uint256) + handler: handlePrizePoolOpened + - event: RngServiceUpdated(indexed address) + handler: handleRngServiceUpdated + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: ExternalErc20AwardAdded(indexed address) + handler: handleExternalErc20AwardAdded + - event: ExternalErc20AwardRemoved(indexed address) + handler: handleExternalErc20AwardRemoved + - event: ExternalErc721AwardAdded(indexed address,uint256[]) + handler: handleExternalErc721AwardAdded + - event: ExternalErc721AwardRemoved(indexed address) + handler: handleExternalErc721AwardRemoved + - event: Initialized(uint256,uint256,indexed address,address,address,address,address[]) + handler: handlePeriodicPrizeInitialized + - event: NumberOfWinnersSet(uint256) + handler: handleNumberOfWinnersSet + - event: PrizePoolAwarded(indexed address,uint256) + handler: handlePrizePoolAwarded + - event: PrizePoolAwardStarted(indexed address,indexed address,indexed uint32,uint32) + handler: handlePrizePoolAwardStarted + - event: SplitExternalErc20AwardsSet(bool) + handler: handleSplitExternalErc20AwardsSet \ No newline at end of file diff --git a/subgraph.polygon.yaml b/subgraph.polygon.yaml new file mode 100644 index 0000000..f45c0ce --- /dev/null +++ b/subgraph.polygon.yaml @@ -0,0 +1,425 @@ +specVersion: 0.0.2 +schema: + file: ./schema.graphql +dataSources: + - name: Comptroller + kind: ethereum/contract + network: matic + source: + address: "0x4027dE966127af5F015Ea1cfd6293a3583892668" + abi: Comptroller + startBlock: 11606852 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForComptroller.ts + entities: + - Comptroller + abis: + - name: Comptroller + file: ./abis/v3_1_0/abis/Comptroller.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: BalanceDripActivated(indexed address,indexed address,indexed address,uint256) + handler: handleBalanceDripActivated + - event: BalanceDripDeactivated(indexed address,indexed address,indexed address) + handler: handleBalanceDripDeactivated + - event: BalanceDripRateSet(indexed address,indexed address,indexed address,uint256) + handler: handleBalanceDripRateSet + - event: BalanceDripDripped(indexed address,indexed address,indexed address,address,uint256) + handler: handleBalanceDripDripped + - event: VolumeDripActivated(indexed address,indexed address,indexed address,bool,uint256,uint256) + handler: handleVolumeDripActivated + - event: VolumeDripDeactivated(indexed address,indexed address,indexed address,bool) + handler: handleVolumeDripDeactivated + - event: VolumeDripSet(indexed address,indexed address,indexed address,bool,uint256,uint256) + handler: handleVolumeDripSet + - event: VolumeDripPeriodStarted(indexed address,indexed address,indexed address,bool,uint32,uint256,uint256) + handler: handleVolumeDripPeriodStarted + - event: VolumeDripPeriodEnded(indexed address,indexed address,indexed address,bool,uint32,uint256,uint256) + handler: handleVolumeDripPeriodEnded + - event: VolumeDripDripped(indexed address,indexed address,indexed address,bool,address,uint256) + handler: handleVolumeDripDripped + + + + + + # doesnt seem to be a way to add to the above + - name: CompoundPrizePoolProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0x44C585E76A5DA580f59B0a3ADd7ca0C96bF4fE2a" + abi: CompoundPrizePoolProxyFactory + startBlock: 11606870 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - CompoundPrizePool + abis: + - name: CompoundPrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForCompoundPrizePoolProxyFactory.ts #using existing ProxyCreated event since the ProxyCreated event is the same -- can we join mappingForCompoundPrizePoolFactories together for all versions? + + # doesnt seem to be a way to add to the above + - name: YieldSourcePrizePoolProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0xE1d06d492107F14AE024c357005c5c692158B13D" + abi: YieldSourcePrizePoolProxyFactory + startBlock: 12175288 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - YieldSourcePrizePool + abis: + - name: YieldSourcePrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForYieldSourcePrizePoolProxyFactory.ts #using existing ProxyCreated event + + + + + + + - name: MultipleWinnersProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0xa6358441F68eD4707E1c4366a0D2E2233bB4841D" + abi: MultipleWinnersProxyFactory + startBlock: 11606891 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - MultipleWinnersPrizeStrategy + abis: + - name: MultipleWinnersProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinnersProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleMultipleWinnersCreated + file: ./src/mappingForMultipleWinnersProxyFactory.ts + + + - name: StakePrizePoolProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0x03e75AeEB92adD6f3b168412671360eB94f0dBf7" + abi: StakePrizePoolProxyFactory + startBlock: 11606884 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - StakePrizePool + abis: + - name: StakePrizePoolProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/StakePrizePoolProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleStakePrizePoolCreated + file: ./src/mappingForStakePrizePoolProxyFactory.ts + + + - name: ControlledTokenProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0x59b34c5BC94e2d5b9DcB97Ec935c94C353E5Eb94" + abi: ControlledTokenProxyFactory + startBlock: 11606877 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - ControlledToken + abis: + - name: ControlledTokenProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledTokenProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForControlledTokenProxyFactory.ts + + - name: TicketProxyFactory + kind: ethereum/contract + network: matic + source: + address: "0x259d46F1559e4d41FAf61d858b4b439D3962fC57" + abi: TicketProxyFactory + startBlock: 11606880 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - ControlledToken + abis: + - name: TicketProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/TicketProxyFactory.json + eventHandlers: + - event: ProxyCreated(address) + handler: handleProxyCreated + file: ./src/mappingForTicketProxyFactory.ts + +templates: + - name: SingleRandomWinner + kind: ethereum/contract + network: matic + source: + abi: SingleRandomWinner + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForSingleRandomWinner.ts + entities: + - SingleRandomWinnerPrizeStrategy + abis: + - name: ERC20 + file: ./abis/ERC20.json + - name: PrizePool + file: ./abis/v3_1_0/abis/PrizePool.json + - name: SingleRandomWinner + file: ./abis/v3_1_0/abis/SingleRandomWinner.json + - name: RNGInterface + file: ./abis/v3_1_0/abis/RNGInterface.json + - name: Comptroller + file: ./abis/v3_1_0/abis/Comptroller.json + - name: ControlledToken + file: ./abis/v3_1_0/abis/ControlledToken.json + eventHandlers: + - event: TokenListenerUpdated(indexed address) + handler: handleTokenListenerUpdated + - event: PrizePoolOpened(indexed address,indexed uint256) + handler: handlePrizePoolOpened + - event: PrizePoolAwardStarted(indexed address,indexed address,indexed uint32,uint32) + handler: handlePrizePoolAwardStarted + - event: PrizePoolAwarded(indexed address,uint256) + handler: handlePrizePoolAwarded + - event: RngServiceUpdated(indexed address) + handler: handleRngServiceUpdated + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: ExternalErc20AwardAdded(indexed address) + handler: handleExternalErc20AwardAdded + - event: ExternalErc20AwardRemoved(indexed address) + handler: handleExternalErc20AwardRemoved + - event: ExternalErc721AwardAdded(indexed address,uint256[]) + handler: handleExternalErc721AwardAdded + - event: ExternalErc721AwardRemoved(indexed address) + handler: handleExternalErc721AwardRemoved + + - name: StakePrizePool + kind: ethereum/contract + network: matic + source: + abi: StakePrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForStakePrizePool.ts + entities: + - StakePrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: StakePrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/StakePrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: StakePrizePoolInitialized(indexed address) + handler: handleStakePrizePoolInitialized + + + - name: CompoundPrizePool + kind: ethereum/contract + network: matic + source: + abi: CompoundPrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForCompoundPrizePool.ts + entities: + - CompoundPrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: CompoundPrizePoolInitialized(indexed address) + handler: handleCompoundPrizePoolInitialized + + - name: YieldSourcePrizePool + kind: ethereum/contract + network: matic + source: + abi: YieldSourcePrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForYieldSourcePrizePool.ts + entities: + - YieldSourcePrizePool + abis: + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: YieldSourcePrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: YieldSourcePrizePoolInitialized(indexed address) + handler: handleYieldSourcePrizePoolInitialized + + + - name: PrizePool + kind: ethereum/contract + network: matic + source: + abi: PrizePool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForPrizePool.ts + entities: + - PrizePool + abis: + - name: ERC20 + file: ./abis/ERC20.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: ControlledTokenAdded(indexed address) + handler: handleControlledTokenAdded + - event: ReserveFeeCaptured(uint256) + handler: handleReserveFeeCaptured + - event: LiquidityCapSet(uint256) + handler: handleLiquidityCapSet + - event: TimelockDeposited(indexed address,indexed address,indexed address,uint256) + handler: handleTimelockDeposited + - event: Awarded(indexed address,indexed address,uint256) + handler: handleAwarded + - event: AwardedExternalERC20(indexed address,indexed address,uint256) + handler: handleAwardedExternalERC20 + - event: AwardedExternalERC721(indexed address,indexed address,uint256[]) + handler: handleAwardedExternalERC721 + - event: TimelockedWithdrawal(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleTimelockedWithdrawal + - event: TimelockedWithdrawalSwept(indexed address,indexed address,uint256,uint256) + handler: handleTimelockedWithdrawalSwept + - event: CreditPlanSet(address,uint128,uint128) + handler: handleCreditPlanSet + - event: PrizeStrategySet(indexed address) + handler: handlePrizeStrategySet + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: Deposited(indexed address,indexed address,indexed address,uint256,address) + handler: handleDeposited + - event: Initialized(address,uint256,uint256) # added together + handler: handleInitialized + + - name: ControlledToken # will one controlled token do all versions? + kind: ethereum/contract + network: matic + source: + abi: ControlledToken + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForControlledToken.ts + entities: + - ControlledToken + abis: + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + + + - name: MultipleWinners + kind: ethereum/contract + network: matic + source: + abi: MultipleWinners + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappingForMultipleWinners.ts + entities: + - PeriodicPrizeStrategy + - MultipleWinners + abis: + - name: MultipleWinners + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinners.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json + - name: CompoundPrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json + - name: ERC20 + file: ./abis/ERC20.json + - name: ControlledToken + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json + eventHandlers: + - event: TokenListenerUpdated(indexed address) + handler: handleTokenListenerUpdated + - event: PrizePoolOpened(indexed address,indexed uint256) + handler: handlePrizePoolOpened + - event: RngServiceUpdated(indexed address) + handler: handleRngServiceUpdated + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: ExternalErc20AwardAdded(indexed address) + handler: handleExternalErc20AwardAdded + - event: ExternalErc20AwardRemoved(indexed address) + handler: handleExternalErc20AwardRemoved + - event: ExternalErc721AwardAdded(indexed address,uint256[]) + handler: handleExternalErc721AwardAdded + - event: ExternalErc721AwardRemoved(indexed address) + handler: handleExternalErc721AwardRemoved + - event: Initialized(uint256,uint256,indexed address,address,address,address,address[]) + handler: handlePeriodicPrizeInitialized + - event: NumberOfWinnersSet(uint256) + handler: handleNumberOfWinnersSet + - event: PrizePoolAwarded(indexed address,uint256) + handler: handlePrizePoolAwarded + - event: PrizePoolAwardStarted(indexed address,indexed address,indexed uint32,uint32) + handler: handlePrizePoolAwardStarted + - event: SplitExternalErc20AwardsSet(bool) + handler: handleSplitExternalErc20AwardsSet \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 8671328..0d9e80c 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -71,61 +71,14 @@ dataSources: {{/sablierManager}} - {{#compoundPrizePoolProxyFactory_v3_0_1}} - - name: CompoundPrizePoolProxyFactory_v3_0_1 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: CompoundPrizePoolProxyFactory_v3_0_1 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - CompoundPrizePool - abis: - - name: CompoundPrizePoolProxyFactory_v3_0_1 - file: ./abis/v3_1_0/abis/CompoundPrizePoolProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForCompoundPrizePoolProxyFactory_v3.ts - - {{/compoundPrizePoolProxyFactory_v3_0_1}} - - {{#compoundPrizePoolProxyFactory_v3_1_0}} - - name: CompoundPrizePoolProxyFactory_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: CompoundPrizePoolProxyFactory_v3_1_0 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - CompoundPrizePool - abis: - - name: CompoundPrizePoolProxyFactory_v3_1_0 - file: ./abis/v3_1_0/abis/CompoundPrizePoolProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForCompoundPrizePoolProxyFactory_v3.ts - - {{/compoundPrizePoolProxyFactory_v3_1_0}} - {{#compoundPrizePoolProxyFactory_v3_3_2}} # doesnt seem to be a way to add to the above - - name: CompoundPrizePoolProxyFactory_v3_3_2 + {{#compoundPrizePoolProxyFactory}} # doesnt seem to be a way to add to the above + - name: CompoundPrizePoolProxyFactory kind: ethereum/contract network: {{network}} source: address: "{{address}}" - abi: CompoundPrizePoolProxyFactory_v3_3_2 + abi: CompoundPrizePoolProxyFactory startBlock: {{startBlock}} mapping: kind: ethereum/events @@ -134,22 +87,21 @@ dataSources: entities: - CompoundPrizePool abis: - - name: CompoundPrizePoolProxyFactory_v3_3_2 + - name: CompoundPrizePoolProxyFactory file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePoolProxyFactory.json eventHandlers: - event: ProxyCreated(address) handler: handleProxyCreated - file: ./src/mappingForCompoundPrizePoolProxyFactory_v3.ts #using existing ProxyCreated event since the ProxyCreated event is the same -- can we join mappingForCompoundPrizePoolFactories together for all versions? + file: ./src/mappingForCompoundPrizePoolProxyFactory.ts #using existing ProxyCreated event since the ProxyCreated event is the same -- can we join mappingForCompoundPrizePoolFactories together for all versions? + {{/compoundPrizePoolProxyFactory}} - {{/compoundPrizePoolProxyFactory_v3_3_2}} - - {{#yieldSourcePrizePoolProxyFactory_v3_3_2}} # doesnt seem to be a way to add to the above - - name: YieldSourcePrizePoolProxyFactory_v3_3_2 + {{#yieldSourcePrizePoolProxyFactory}} # doesnt seem to be a way to add to the above + - name: YieldSourcePrizePoolProxyFactory kind: ethereum/contract network: {{network}} source: address: "{{address}}" - abi: YieldSourcePrizePoolProxyFactory_v3_3_2 + abi: YieldSourcePrizePoolProxyFactory startBlock: {{startBlock}} mapping: kind: ethereum/events @@ -158,18 +110,18 @@ dataSources: entities: - YieldSourcePrizePool abis: - - name: YieldSourcePrizePoolProxyFactory_v3_3_2 + - name: YieldSourcePrizePoolProxyFactory file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePoolProxyFactory.json eventHandlers: - event: ProxyCreated(address) handler: handleProxyCreated - file: ./src/mappingForYieldSourcePrizePoolProxyFactory_v3.ts #using existing ProxyCreated event - {{/yieldSourcePrizePoolProxyFactory_v3_3_2}} + file: ./src/mappingForYieldSourcePrizePoolProxyFactory.ts #using existing ProxyCreated event + {{/yieldSourcePrizePoolProxyFactory}} - {{#singleRandomWinnerProxyFactory_v3_1_0}} - - name: SingleRandomWinnerProxyFactory_v3_1_0 + {{#singleRandomWinnerProxyFactory}} + - name: SingleRandomWinnerProxyFactory kind: ethereum/contract network: {{network}} source: @@ -195,67 +147,17 @@ dataSources: - event: ProxyCreated(address) handler: handleProxyCreated file: ./src/mappingForSingleRandomWinnerProxyFactory.ts - {{/singleRandomWinnerProxyFactory_v3_1_0}} + {{/singleRandomWinnerProxyFactory}} - {{#singleRandomWinnerProxyFactory_v3_0_1}} - - name: SingleRandomWinnerProxyFactory_v3_0_1 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: SingleRandomWinnerProxyFactory - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - SingleRandomWinnerPrizeStrategy - abis: - - name: PrizePool - file: ./abis/v3_1_0/abis/PrizePool.json - - name: SingleRandomWinner - file: ./abis/v3_1_0/abis/SingleRandomWinner.json - - name: SingleRandomWinnerProxyFactory - file: ./abis/v3_1_0/abis/SingleRandomWinnerProxyFactory.json - - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForSingleRandomWinnerProxyFactory.ts - {{/singleRandomWinnerProxyFactory_v3_0_1}} - {{#multipleWinnersProxyFactory_v3_1_0}} - - name: MultipleWinnersProxyFactory_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: MultipleWinnersProxyFactory_v3_1_0 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - MultipleWinnersPrizeStrategy - abis: - - name: MultipleWinnersProxyFactory_v3_1_0 - file: ./abis/v3_1_0/abis/MultipleWinnersProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleMultipleWinnersCreated - file: ./src/mappingForMultipleWinnersProxyFactory_v3.ts - {{/multipleWinnersProxyFactory_v3_1_0}} - {{#multipleWinnersProxyFactory_v3_2_0}} - - name: MultipleWinnersProxyFactory_v3_2_0 + {{#multipleWinnersProxyFactory}} + - name: MultipleWinnersProxyFactory kind: ethereum/contract network: {{network}} source: address: "{{address}}" - abi: MultipleWinnersProxyFactory_v3_1_0 + abi: MultipleWinnersProxyFactory startBlock: {{startBlock}} mapping: kind: ethereum/events @@ -264,89 +166,17 @@ dataSources: entities: - MultipleWinnersPrizeStrategy abis: - - name: MultipleWinnersProxyFactory_v3_1_0 - file: ./abis/v3_1_0/abis/MultipleWinnersProxyFactory.json + - name: MultipleWinnersProxyFactory + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinnersProxyFactory.json eventHandlers: - event: ProxyCreated(address) handler: handleMultipleWinnersCreated - file: ./src/mappingForMultipleWinnersProxyFactory_v3.ts - {{/multipleWinnersProxyFactory_v3_2_0}} + file: ./src/mappingForMultipleWinnersProxyFactory.ts + {{/multipleWinnersProxyFactory}} - {{#multipleWinnersProxyFactory_v3_3_2}} - - name: MultipleWinnersProxyFactory_v3_3_2 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: MultipleWinnersProxyFactory_v3_3_2 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - MultipleWinnersPrizeStrategy - abis: - - name: MultipleWinnersProxyFactory_v3_3_2 - file: ./abis/v3_1_0/abis/MultipleWinnersProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleMultipleWinnersCreated - file: ./src/mappingForMultipleWinnersProxyFactory_v3.ts - {{/multipleWinnersProxyFactory_v3_3_2}} - - - - {{#stakePrizePoolProxyFactory_v3_1_0}} - - name: StakePrizePoolProxyFactory_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: StakePrizePoolProxyFactory - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - StakePrizePool - abis: - - name: StakePrizePoolProxyFactory - file: ./abis/v3_1_0/abis/StakePrizePoolProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleStakePrizePoolCreated - file: ./src/mappingForStakePrizePoolProxyFactory_v3.ts - {{/stakePrizePoolProxyFactory_v3_1_0}} - - {{#stakePrizePoolProxyFactory_v3_2_0}} - - name: StakePrizePoolProxyFactory_v3_2_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: StakePrizePoolProxyFactory - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - StakePrizePool - abis: - - name: StakePrizePoolProxyFactory - file: ./abis/v3_1_0/abis/StakePrizePoolProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleStakePrizePoolCreated - file: ./src/mappingForStakePrizePoolProxyFactory_v3.ts - {{/stakePrizePoolProxyFactory_v3_2_0}} - - - {{#stakePrizePoolProxyFactory_v3_3_2}} - - name: StakePrizePoolProxyFactory_v3_3_2 + {{#stakePrizePoolProxyFactory}} + - name: StakePrizePoolProxyFactory kind: ethereum/contract network: {{network}} source: @@ -365,18 +195,17 @@ dataSources: eventHandlers: - event: ProxyCreated(address) handler: handleStakePrizePoolCreated - file: ./src/mappingForStakePrizePoolProxyFactory_v3.ts - {{/stakePrizePoolProxyFactory_v3_3_2}} + file: ./src/mappingForStakePrizePoolProxyFactory.ts + {{/stakePrizePoolProxyFactory}} - - {{#controlledTokenProxyFactory_v3_0_1}} - - name: ControlledTokenProxyFactory_v3_0_1 + {{#controlledTokenProxyFactory}} + - name: ControlledTokenProxyFactory kind: ethereum/contract network: {{network}} source: address: "{{address}}" - abi: ControlledTokenProxyFactory_v3_0_1 + abi: ControlledTokenProxyFactory startBlock: {{startBlock}} mapping: kind: ethereum/events @@ -385,114 +214,21 @@ dataSources: entities: - ControlledToken abis: - - name: ControlledTokenProxyFactory_v3_0_1 - file: ./abis/v3_1_0/abis/ControlledTokenProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForControlledTokenProxyFactory_v3.ts - {{/controlledTokenProxyFactory_v3_0_1}} - - {{#controlledTokenProxyFactory_v3_1_0}} - - name: ControlledTokenProxyFactory_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: ControlledTokenProxyFactory_v3_1_0 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - ControlledToken - abis: - - name: ControlledTokenProxyFactory_v3_1_0 - file: ./abis/v3_1_0/abis/ControlledTokenProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForControlledTokenProxyFactory_v3.ts - {{/controlledTokenProxyFactory_v3_1_0}} - - - {{#controlledTokenProxyFactory_v3_3_2}} - - name: ControlledTokenProxyFactory_v3_3_2 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: ControlledTokenProxyFactory_v3_3_2 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - ControlledToken - abis: - - name: ControlledTokenProxyFactory_v3_3_2 + - name: ControlledTokenProxyFactory file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledTokenProxyFactory.json eventHandlers: - event: ProxyCreated(address) handler: handleProxyCreated - file: ./src/mappingForControlledTokenProxyFactory_v3.ts - {{/controlledTokenProxyFactory_v3_3_2}} - - {{#ticketProxyFactory_v3_0_1}} - - name: TicketProxyFactory_v3_0_1 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: TicketProxyFactory_v3_0_1 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - ControlledToken - abis: - - name: TicketProxyFactory_v3_0_1 - file: ./abis/v3_1_0/abis/TicketProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForTicketProxyFactory_v3.ts - {{/ticketProxyFactory_v3_0_1}} - - {{#ticketProxyFactory_v3_1_0}} - - name: TicketProxyFactory_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - address: "{{address}}" - abi: TicketProxyFactory_v3_1_0 - startBlock: {{startBlock}} - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - ControlledToken - abis: - - name: TicketProxyFactory_v3_1_0 - file: ./abis/v3_1_0/abis/TicketProxyFactory.json - eventHandlers: - - event: ProxyCreated(address) - handler: handleProxyCreated - file: ./src/mappingForTicketProxyFactory_v3.ts - {{/ticketProxyFactory_v3_1_0}} + file: ./src/mappingForControlledTokenProxyFactory.ts + {{/controlledTokenProxyFactory}} - {{#ticketProxyFactory_v3_3_2}} - - name: TicketProxyFactory_v3_3_2 + {{#ticketProxyFactory}} + - name: TicketProxyFactory kind: ethereum/contract network: {{network}} source: address: "{{address}}" - abi: TicketProxyFactory_v3_3_2 + abi: TicketProxyFactory startBlock: {{startBlock}} mapping: kind: ethereum/events @@ -501,13 +237,13 @@ dataSources: entities: - ControlledToken abis: - - name: TicketProxyFactory_v3_3_2 + - name: TicketProxyFactory file: ./node_modules/@pooltogether/pooltogether-contracts/abis/TicketProxyFactory.json eventHandlers: - event: ProxyCreated(address) handler: handleProxyCreated - file: ./src/mappingForTicketProxyFactory_v3.ts - {{/ticketProxyFactory_v3_3_2}} + file: ./src/mappingForTicketProxyFactory.ts + {{/ticketProxyFactory}} templates: - name: SingleRandomWinner @@ -571,11 +307,11 @@ templates: - StakePrizePool abis: - name: PrizePool - file: ./abis/v3_1_0/abis/PrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json - name: StakePrizePool - file: ./abis/v3_1_0/abis/StakePrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/StakePrizePool.json - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: StakePrizePoolInitialized(indexed address) handler: handleStakePrizePoolInitialized @@ -595,11 +331,11 @@ templates: - CompoundPrizePool abis: - name: PrizePool - file: ./abis/v3_1_0/abis/PrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json - name: CompoundPrizePool - file: ./abis/v3_1_0/abis/CompoundPrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: CompoundPrizePoolInitialized(indexed address) handler: handleCompoundPrizePoolInitialized @@ -618,21 +354,21 @@ templates: - YieldSourcePrizePool abis: - name: PrizePool - file: ./abis/v3_1_0/abis/PrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json - name: YieldSourcePrizePool file: ./node_modules/@pooltogether/pooltogether-contracts/abis/YieldSourcePrizePool.json - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: YieldSourcePrizePoolInitialized(indexed address) handler: handleYieldSourcePrizePoolInitialized - - name: PrizePool_v3 + - name: PrizePool kind: ethereum/contract network: {{network}} source: - abi: PrizePool_v3 + abi: PrizePool mapping: kind: ethereum/events apiVersion: 0.0.4 @@ -643,12 +379,12 @@ templates: abis: - name: ERC20 file: ./abis/ERC20.json - - name: PrizePool_v3 - file: ./abis/PrizePool_v3.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json - name: CompoundPrizePool - file: ./abis/v3_1_0/abis/CompoundPrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: ControlledTokenAdded(indexed address) handler: handleControlledTokenAdded @@ -676,62 +412,10 @@ templates: handler: handleOwnershipTransferred - event: Deposited(indexed address,indexed address,indexed address,uint256,address) handler: handleDeposited - - - name: PrizePool_v3_1_0 - kind: ethereum/contract - network: {{network}} - source: - abi: PrizePool_v3_1_0 - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - file: ./src/mappingForPrizePool_v3_1_0.ts - entities: - - PrizePool - abis: - - name: ERC20 - file: ./abis/ERC20.json - - name: PrizePool_v3 - file: ./abis/PrizePool_v3.json - - name: PrizePool_v3_1_0 - file: ./abis/v3_1_0/abis/PrizePool.json - - name: CompoundPrizePool - file: ./abis/v3_1_0/abis/CompoundPrizePool.json - - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json - eventHandlers: - - event: Initialized(address,uint256,uint256) - handler: handleInitialized - - - name: PrizePool_v3_0_1 - kind: ethereum/contract - network: {{network}} - source: - abi: PrizePool_v3_0_1 - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - file: ./src/mappingForPrizePool_v3_0_1.ts - entities: - - PrizePool - abis: - - name: ERC20 - file: ./abis/ERC20.json - - name: PrizePool_v3 - file: ./abis/PrizePool_v3.json - - name: PrizePool_v3_0_1 - file: ./abis/PrizePool_v3_0_1.json - - name: CompoundPrizePool - file: ./abis/v3_1_0/abis/CompoundPrizePool.json - - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json - eventHandlers: - - event: Initialized(address,address,uint256,uint256) + - event: Initialized(address,uint256,uint256) # added together handler: handleInitialized - - name: ControlledToken + - name: ControlledToken # will one controlled token do all versions? kind: ethereum/contract network: {{network}} source: @@ -745,11 +429,12 @@ templates: - ControlledToken abis: - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + - name: MultipleWinners kind: ethereum/contract network: {{network}} @@ -759,23 +444,21 @@ templates: kind: ethereum/events apiVersion: 0.0.4 language: wasm/assemblyscript - file: ./src/mappingForMultipleWinners_v3_1_0.ts + file: ./src/mappingForMultipleWinners.ts entities: - PeriodicPrizeStrategy - MultipleWinners abis: - name: MultipleWinners - file: ./abis/v3_1_0/abis/MultipleWinners.json - - name: PrizePool_v3 - file: ./abis/PrizePool_v3.json - - name: PrizePool_v3_1_0 - file: ./abis/v3_1_0/abis/PrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/MultipleWinners.json + - name: PrizePool + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/PrizePool.json - name: CompoundPrizePool - file: ./abis/v3_1_0/abis/CompoundPrizePool.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/CompoundPrizePool.json - name: ERC20 - file: ./abis/v3_1_0/abis/ERC20Upgradeable.json + file: ./abis/ERC20.json - name: ControlledToken - file: ./abis/v3_1_0/abis/ControlledToken.json + file: ./node_modules/@pooltogether/pooltogether-contracts/abis/ControlledToken.json eventHandlers: - event: TokenListenerUpdated(indexed address) handler: handleTokenListenerUpdated @@ -802,5 +485,4 @@ templates: - event: PrizePoolAwardStarted(indexed address,indexed address,indexed uint32,uint32) handler: handlePrizePoolAwardStarted - event: SplitExternalErc20AwardsSet(bool) - handler: handleSplitExternalErc20AwardsSet - + handler: handleSplitExternalErc20AwardsSet \ No newline at end of file diff --git a/test b/test new file mode 100644 index 0000000..513e752 --- /dev/null +++ b/test @@ -0,0 +1,11 @@ + { + "id": "0x3124db361ba65c12719269459c1acd5233ac5422", + "prizeStrategy": null + }, + { + "id": "0x3836f2044e19dd4449a4f0b20189061ba9338782", + "prizeStrategy": null + }, + { + + rinkeby prizepools that dont have a prizeStrategy on rinkeby-staging. \ No newline at end of file diff --git a/testQueries/testDaiPrizePool.graphql b/testQueries/testDaiPrizePool.graphql new file mode 100644 index 0000000..5b1b0a4 --- /dev/null +++ b/testQueries/testDaiPrizePool.graphql @@ -0,0 +1,11 @@ +{ + prizePool(id:"0xebfb47a7ad0fd6e57323c8a42b2e5a6a4f68fc1a"){ + id + reserveRegistry + prizes(first: 5){ + id + awardedBlock + lockBlock + } + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ed7aede..8c23391 100644 --- a/yarn.lock +++ b/yarn.lock @@ -182,10 +182,10 @@ "@ethersproject/rlp" "^5.0.3" "@ethersproject/signing-key" "^5.0.4" -"@graphprotocol/graph-cli@^0.19.0": - version "0.19.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.19.0.tgz#c5c330f3ef9bb56ee5bec1e9da998638049dc0d3" - integrity sha512-rG6udMjMyXtCgX1oYyteM3ohecLV8JZqlQLzc8BSfw/g6+6dAVey6KQkJ04MRYJCv2VxrUVTYXu1AxzhXPJMkQ== +"@graphprotocol/graph-cli@^0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.20.0.tgz#52d907f906d4845c42ef2d8063fe0f624db95c09" + integrity sha512-uUeq54fIdBvj3SVA4U1qArAG0vZuw3Qnw0J7o/kQ712G8YtJ6l2rkmt5IaS35zQHlnNjAmFd1WJ095lSemlHog== dependencies: assemblyscript "https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3" chalk "^3.0.0" @@ -196,7 +196,7 @@ fs-extra "^9.0.0" glob "^7.1.2" gluegun "^4.3.1" - graphql "^14.0.2" + graphql "^15.5.0" immutable "^3.8.2" ipfs-http-client "^34.0.0" jayson "^3.0.2" @@ -208,12 +208,12 @@ tmp "^0.1.0" yaml "^1.5.1" optionalDependencies: - keytar "^5.0.0" + keytar "^7.4.0" -"@graphprotocol/graph-ts@^0.19.0": - version "0.19.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.19.0.tgz#e1ea3abcf94b91b36624a0821c6561d68720397f" - integrity sha512-9dRwZF/jMHjIC/4jZDl8uUV3vHbXgHZV2m6728JbYcbjt4Kaw73cIxVqrsXHyDNVkVaIkZ/yorQ37pY2suLddg== +"@graphprotocol/graph-ts@^0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.20.0.tgz#ed31ffd59a6aa9703a1ec5079f137a81220443cb" + integrity sha512-+R0Tu/MD4Fiq0Fo+v1l+xznz+ZrciQKWlzMtXjDrhM70vlMNVL9wDmf90MVFYpslgqIfw024hT6XwlmyNyOWbQ== dependencies: assemblyscript "https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3" @@ -300,11 +300,6 @@ safe-buffer "^5.1.1" util.promisify "^1.0.0" -"@openzeppelin/contracts-upgradeable@3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.3.0.tgz#a536c6ff107d21319490e6cb699e555a3edcf6ea" - integrity sha512-kJeNuKauR4xH52Yo3GdXXAOW4CWyWdm7VXcJFe63G8TRb45ISSnkt/gXwUa8zzEYqokQrwNZYoH/iGYfUlp6wA== - "@openzeppelin/contracts-upgradeable@3.4.0": version "3.4.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.0.tgz#7674c73c643a509f1b90c509e3e72fe9aae02aeb" @@ -315,15 +310,16 @@ resolved "https://registry.yarnpkg.com/@pooltogether/fixed-point/-/fixed-point-1.0.0-beta.2.tgz#d76a1e77f21833e9b680296d65526b0ffd7415d7" integrity sha512-aUw4R0Z2oM0AK3W4LIXyBaojTOzRRbhLDHX0egeuvxfjy4gBb6X66v81gI7Wngg/7O0y9QL/B8jWkUnAFzhTig== -"@pooltogether/pooltogether-contracts@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@pooltogether/pooltogether-contracts/-/pooltogether-contracts-3.3.2.tgz#01e9bc77bc39879a0b96df4365032aadd3eae1d8" - integrity sha512-DttMVsMFKipZ7gDUmp2Y/KdRU7GquQFgadjOD/25I35sTFOsNDX+wu2IiO1sQt0ZZy9wSBTr0qF8Tcx9gVALIA== +"@pooltogether/pooltogether-contracts@^3.3.5": + version "3.3.5" + resolved "https://registry.yarnpkg.com/@pooltogether/pooltogether-contracts/-/pooltogether-contracts-3.3.5.tgz#53c90c549130ea9ebcd7e8baf58759f76ca82a89" + integrity sha512-pEeSMMI9YOPaqN/6TvsFLmI826MIkJsKZo7TNpiLhPZQf9uIvFyOpMqU2tiCPd9Hdw3mHv93DL/Id3Vkdr34eg== dependencies: "@openzeppelin/contracts-upgradeable" "3.4.0" "@pooltogether/fixed-point" "1.0.0-beta.2" "@pooltogether/pooltogether-rng-contracts" "1.0.0" "@pooltogether/uniform-random-number" "1.0.0-beta.1" + "@pooltogether/yield-source-interface" "^1.0.1" deploy-eip-1820 "1.0.0" sortition-sum-tree-factory "0.1.0" @@ -337,6 +333,11 @@ resolved "https://registry.yarnpkg.com/@pooltogether/uniform-random-number/-/uniform-random-number-1.0.0-beta.1.tgz#72257401fe8536e95f9f812f1d249262659084a7" integrity sha512-V4iqLOpNFNhnUqfKRlvqUeRwvKaODdz+qn4Qi65C3iMOnDb0J31tBvyhwKbhP4wauNuUN64WfepqkkxET9U7EQ== +"@pooltogether/yield-source-interface@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@pooltogether/yield-source-interface/-/yield-source-interface-1.0.1.tgz#ce446e5e5f83ff55663f686cef4e7984a7e8d230" + integrity sha512-ykfmKpTZ38V5hmoupAvVygnlvezflHjHa/Dqp4J2LrF8NWUfcrrx8jF1a6hvT+UYBsVyFBGyWU9gL0NZO+tzmw== + "@protobufjs/utf8@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" @@ -856,9 +857,9 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -"assemblyscript@https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3": +"assemblyscript@git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3": version "0.6.0" - resolved "https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3" + resolved "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3" dependencies: "@protobufjs/utf8" "^1.1.0" binaryen "77.0.0-nightly.20190407" @@ -4100,12 +4101,10 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -graphql@^14.0.2: - version "14.7.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.7.0.tgz#7fa79a80a69be4a31c27dda824dc04dac2035a72" - integrity sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA== - dependencies: - iterall "^1.2.2" +graphql@^15.5.0: + version "15.5.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" + integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== growl@1.10.5: version "1.10.5" @@ -4919,11 +4918,6 @@ iterable-ndjson@^1.1.0: dependencies: string_decoder "^1.2.0" -iterall@^1.2.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" - integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== - jayson@^3.0.2: version "3.3.4" resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.3.4.tgz#c4fc8f3a8884ac85562da101f5bb526e5a679fa4" @@ -5126,13 +5120,13 @@ keypair@^1.0.1: resolved "https://registry.yarnpkg.com/keypair/-/keypair-1.0.1.tgz#7603719270afb6564ed38a22087a06fc9aa4ea1b" integrity sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs= -keytar@^5.0.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/keytar/-/keytar-5.6.0.tgz#7b5d4bd043d17211163640be6c4a27a49b12bb39" - integrity sha512-ueulhshHSGoryfRXaIvTj0BV1yB0KddBGhGoqCxSN9LR1Ks1GKuuCdVhF+2/YOs5fMl6MlTI9On1a4DHDXoTow== +keytar@^7.4.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.5.0.tgz#d9f2c4ea591b12a7b23adc5f731f216a062ffc26" + integrity sha512-g3GPp8abi7FE8mlE16LdxLVXZ8cLLq8O/gYrjxy1IGTNVYycHnsElXIKFS/Qj+AfbCyz59H+1j6ehkv6RU6HMA== dependencies: - nan "2.14.1" - prebuild-install "5.3.3" + node-addon-api "^3.0.0" + prebuild-install "^6.0.0" keyv@3.0.0: version "3.0.0" @@ -5758,7 +5752,7 @@ minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@~1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -5786,7 +5780,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-classic@^0.5.2: +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== @@ -6007,7 +6001,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@2.14.1, nan@^2.14.0: +nan@^2.14.0: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== @@ -6075,6 +6069,11 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.1.0.tgz#98b21931557466c6729e51cb77cd39c965f42239" + integrity sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw== + node-environment-flags@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" @@ -6634,16 +6633,16 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -prebuild-install@5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.3.tgz#ef4052baac60d465f5ba6bf003c9c1de79b9da8e" - integrity sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== +prebuild-install@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.1.tgz#5902172f7a40eb67305b96c2a695db32636ee26d" + integrity sha512-7GOJrLuow8yeiyv75rmvZyeMGzl8mdEX5gY69d6a6bHWmiPevwqFw+tQavhK0EYMaSg3/KD24cWqeQv1EWsqDQ== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" github-from-package "0.0.0" - minimist "^1.2.0" - mkdirp "^0.5.1" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" node-abi "^2.7.0" noop-logger "^0.1.1" @@ -6758,17 +6757,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -ptv3.1.0@pooltogether/pooltogether-pool-contracts#e7aaad778093fdb48f740576bf8affa3ca31636f: - version "3.1.0" - resolved "https://codeload.github.com/pooltogether/pooltogether-pool-contracts/tar.gz/e7aaad778093fdb48f740576bf8affa3ca31636f" - dependencies: - "@openzeppelin/contracts-upgradeable" "3.3.0" - "@pooltogether/fixed-point" "1.0.0-beta.2" - "@pooltogether/pooltogether-rng-contracts" "1.0.0" - "@pooltogether/uniform-random-number" "1.0.0-beta.1" - deploy-eip-1820 "1.0.0" - sortition-sum-tree-factory "0.1.0" - public-encrypt@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0"