Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x334D6eDc13F63728b39e6A6D04A7Bbd5D6A9B9FF
Balance 0 ETH
Nonce 1
Code Size 12785 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

12785 bytes
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063a217fddf116100ad578063c45a015511610071578063c45a0155146102c8578063ca8371dc146102ef578063e3ed146614610302578063f0fdd73614610317578063f851a4401461033e57600080fd5b8063a217fddf1461025e578063b361cf5814610266578063b992ea471461027b578063c368df7e1461028e578063c4269876146102b557600080fd5b80635ef685be116100f45780635ef685be146101e5578063659c6a5b146101fa5780637ef7a4621461020d57806392136806146102345780639c6d026f1461024957600080fd5b80630ffe0a5614610131578063313b7b19146101615780633ee526ed14610188578063435bd804146101bd5780634e8f119b146101d2575b600080fd5b61014461013f366004612a83565b610365565b6040516001600160a01b0390911681526020015b60405180910390f35b6101447f000000000000000000000000b9e5cbb9ca5b0d659238807e84d0176930753d8681565b6101af7f9328ef869700347b81959a69acbca4adf93a9ee617e796e5692b2660ee007a8181565b604051908152602001610158565b6101af60008051602061319c83398151915281565b6101446101e0366004612a4a565b610783565b6101f86101f3366004612ace565b610956565b005b610144610208366004612c62565b610a63565b6101447f00000000000000000000000075100bd564415731b5936a4a94d0dc29dde5db3c81565b6101af60008051602061311c83398151915281565b6101af60008051602061317c83398151915281565b6101af600081565b6101af60008051602061315c83398151915281565b610144610289366004612a4a565b6110fc565b6101447f000000000000000000000000f0211b7660680b49de1a7e9f25c65660f0a13fea81565b6101446102c3366004612d9f565b611157565b6101447f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec481565b6101f86102fd366004612b96565b612841565b6101af60008051602061313c83398151915281565b6101447f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97781565b6101447f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c81565b604051637aa886b360e01b81526001600160a01b038481166004830152838116602483015282811660448301527f000000000000000000000000b9e5cbb9ca5b0d659238807e84d0176930753d86811660648301527f000000000000000000000000f0211b7660680b49de1a7e9f25c65660f0a13fea811660848301526000917f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec490911690637aa886b39060a401602060405180830381600087803b15801561042d57600080fd5b505af1158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190612a2d565b90507f000000000000000000000000b9e5cbb9ca5b0d659238807e84d0176930753d866001600160a01b0316816001600160a01b031663313b7b196040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ca57600080fd5b505afa1580156104de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105029190612a2d565b6001600160a01b0316146105185761051861309d565b7f000000000000000000000000f0211b7660680b49de1a7e9f25c65660f0a13fea6001600160a01b0316816001600160a01b031663c368df7e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b39190612a2d565b6001600160a01b0316146105c9576105c961309d565b836001600160a01b0316816001600160a01b031663268f07606040518163ffffffff1660e01b815260040160206040518083038186803b15801561060c57600080fd5b505afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190612a2d565b6001600160a01b03161461065a5761065a61309d565b826001600160a01b0316816001600160a01b031663fdcceb146040518163ffffffff1660e01b815260040160206040518083038186803b15801561069d57600080fd5b505afa1580156106b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d59190612a2d565b6001600160a01b0316146106eb576106eb61309d565b816001600160a01b0316816001600160a01b0316630db94bba6040518163ffffffff1660e01b815260040160206040518083038186803b15801561072e57600080fd5b505afa158015610742573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107669190612a2d565b6001600160a01b03161461077c5761077c61309d565b9392505050565b604051634e8f119b60e01b81526001600160a01b03838116600483015282811660248301526000917f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec490911690634e8f119b906044015b602060405180830381600087803b1580156107f457600080fd5b505af1158015610808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082c9190612a2d565b9050826001600160a01b0316816001600160a01b031663268f07606040518163ffffffff1660e01b815260040160206040518083038186803b15801561087157600080fd5b505afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190612a2d565b6001600160a01b0316146108bf576108bf61309d565b816001600160a01b0316816001600160a01b031663fdcceb146040518163ffffffff1660e01b815260040160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a9190612a2d565b6001600160a01b0316146109505761095061309d565b92915050565b60408051600180825281830190925260009160208083019080368337019050509050888160008151811061098c5761098c6130c9565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020015b60608152602001906001900390816109bc57905050905088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250855186945090925015159050610a1d57610a1d6130c9565b60200260200101819052506000610a3986868585886000611157565b90506000610a478989610a63565b9050610a548c8383610365565b50505050505050505050505050565b6040805160028082526060820183526000928392919060208301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c82600081518110610adf57610adf6130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250503082600181518110610b1357610b136130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c81600081518110610b6757610b676130c9565b6001600160a01b039283166020918202929092010152604051631743783960e21b81527f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec490911690635d0de0e490610be7907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c9086908690600401612eda565b602060405180830381600087803b158015610c0157600080fd5b505af1158015610c15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c399190612a2d565b925060005b84811015610ce857836001600160a01b031663d48bfca7878784818110610c6757610c676130c9565b9050602002016020810190610c7c9190612a10565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b505050508080610ce090613082565b915050610c3e565b50604051631b2b455f60e11b81526001600160a01b038416906336568abe90610d259060008051602061317c833981519152903090600401612ff2565b600060405180830381600087803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b5050505060005b84811015610e2d57836001600160a01b031663f9eaee0d878784818110610d8357610d836130c9565b9050602002016020810190610d989190612a10565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610dd757600080fd5b505afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190612d45565b610e1b57610e1b61309d565b80610e2581613082565b915050610d5a565b50604051632474521560e21b81526001600160a01b038416906391d1485490610e8a9060008051602061317c833981519152907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015610ea257600080fd5b505afa158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190612d45565b610ee657610ee661309d565b604051632474521560e21b81526001600160a01b038416906391d1485490610f54907f9328ef869700347b81959a69acbca4adf93a9ee617e796e5692b2660ee007a81907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015610f6c57600080fd5b505afa158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa49190612d45565b610fb057610fb061309d565b604051632474521560e21b81526001600160a01b038416906391d1485490610fff906000907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b15801561101757600080fd5b505afa15801561102b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104f9190612d45565b61105b5761105b61309d565b604051632474521560e21b81526001600160a01b038416906391d14854906110979060008051602061317c833981519152903090600401612ff2565b60206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190612d45565b156110f4576110f461309d565b505092915050565b60405163b992ea4760e01b81526001600160a01b03838116600483015282811660248301526000917f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec49091169063b992ea47906044016107da565b600083518551146111af5760405162461bcd60e51b815260206004820152601f60248201527f526563697069656e74732064617461206c656e677468206d69736d617463680060448201526064015b60405180910390fd5b868311156112145760405162461bcd60e51b815260206004820152602c60248201527f5f7370656e74416d6f756e74206d757374206265206c6f776572206f7220657160448201526b1d585b081d1bc81b1a5b5a5d60a21b60648201526084016111a6565b600082611222576002611225565b60035b60ff1667ffffffffffffffff811115611240576112406130df565b604051908082528060200260200182016040528015611269578160200160208202803683370190505b5090507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c816000815181106112a0576112a06130c9565b60200260200101906001600160a01b031690816001600160a01b03168152505030816001815181106112d4576112d46130c9565b60200260200101906001600160a01b031690816001600160a01b031681525050821561134f577f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f9778160028151811061132e5761132e6130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250505b60008361135d576001611360565b60025b60ff1667ffffffffffffffff81111561137b5761137b6130df565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b5090507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c816000815181106113db576113db6130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250508315611456577f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97781600181518110611435576114356130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c816000815181106114ab576114ab6130c9565b60200260200101906001600160a01b031690816001600160a01b03168152505030816001815181106114df576114df6130c9565b6001600160a01b03929092166020928302919091018201526040805160038082526080820190925260009290919082016060803683370190505090507f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c8160008151811061154f5761154f6130c9565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f977816001815181106115a3576115a36130c9565b60200260200101906001600160a01b031690816001600160a01b03168152505030816002815181106115d7576115d76130c9565b6001600160a01b039283166020918202929092010152604051630f81f90360e31b81527f000000000000000000000000ee60c6ebc91237d334230b12263e26ee3b480ec490911690637c0fc8189061167d907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c9088908890889088907f00000000000000000000000075100bd564415731b5936a4a94d0dc29dde5db3c90600401612f1a565b602060405180830381600087803b15801561169757600080fd5b505af11580156116ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cf9190612a2d565b94507f00000000000000000000000075100bd564415731b5936a4a94d0dc29dde5db3c6001600160a01b0316856001600160a01b0316637ef7a4626040518163ffffffff1660e01b815260040160206040518083038186803b15801561173457600080fd5b505afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c9190612a2d565b6001600160a01b0316146117825761178261309d565b60005b895181101561183357856001600160a01b031663739b53848b83815181106117af576117af6130c9565b60200260200101518b84815181106117c9576117c96130c9565b60200260200101516040518363ffffffff1660e01b81526004016117ee929190612f8d565b600060405180830381600087803b15801561180857600080fd5b505af115801561181c573d6000803e3d6000fd5b50505050808061182b90613082565b915050611785565b50604051631b2b455f60e11b81526001600160a01b038616906336568abe906118709060008051602061311c833981519152903090600401612ff2565b600060405180830381600087803b15801561188a57600080fd5b505af115801561189e573d6000803e3d6000fd5b505050508851856001600160a01b031663c0f7e5486040518163ffffffff1660e01b815260040160006040518083038186803b1580156118dd57600080fd5b505afa1580156118f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119199190810190612ca4565b51146119275761192761309d565b60005b89518110156119f557856001600160a01b0316638400c3078b8381518110611954576119546130c9565b60200260200101516040518263ffffffff1660e01b815260040161198791906001600160a01b0391909116815260200190565b60206040518083038186803b15801561199f57600080fd5b505afa1580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d79190612d45565b6119e3576119e361309d565b806119ed81613082565b91505061192a565b50604051633e0bde6760e01b8152600481018c9052602481018b90526001600160a01b03861690633e0bde6790604401600060405180830381600087803b158015611a3f57600080fd5b505af1158015611a53573d6000803e3d6000fd5b5050604051631b2b455f60e11b81526001600160a01b03881692506336568abe9150611a939060008051602061313c833981519152903090600401612ff2565b600060405180830381600087803b158015611aad57600080fd5b505af1158015611ac1573d6000803e3d6000fd5b50505050600080866001600160a01b031663e759b06c6040518163ffffffff1660e01b8152600401604080518083038186803b158015611b0057600080fd5b505afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b389190612d7b565b915091508c8214611b4b57611b4b61309d565b8b8114611b5a57611b5a61309d565b604051636667122960e01b8152600481018a90526001600160a01b03881690636667122990602401600060405180830381600087803b158015611b9c57600080fd5b505af1158015611bb0573d6000803e3d6000fd5b5050604051631b2b455f60e11b81526001600160a01b038a1692506336568abe9150611bf09060008051602061319c833981519152903090600401612ff2565b600060405180830381600087803b158015611c0a57600080fd5b505af1158015611c1e573d6000803e3d6000fd5b50505050888d611c2e919061305e565b876001600160a01b0316632a9a872a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c6757600080fd5b505afa158015611c7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9f9190612d62565b14611cac57611cac61309d565b604051632474521560e21b81526001600160a01b038816906391d1485490611d089060008051602061311c833981519152907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015611d2057600080fd5b505afa158015611d34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d589190612d45565b611d6457611d6461309d565b604051632474521560e21b81526001600160a01b038816906391d1485490611dc09060008051602061315c833981519152907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015611dd857600080fd5b505afa158015611dec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e109190612d45565b611e1c57611e1c61309d565b604051632474521560e21b81526001600160a01b038816906391d1485490611e789060008051602061313c833981519152907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015611e9057600080fd5b505afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190612d45565b611ed457611ed461309d565b604051632474521560e21b81526001600160a01b038816906391d1485490611f309060008051602061319c833981519152907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015611f4857600080fd5b505afa158015611f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f809190612d45565b611f8c57611f8c61309d565b604051632474521560e21b81526001600160a01b038816906391d1485490611fdb906000907f0000000000000000000000003e40d73eb977dc6a537af587d48316fee66e9c8c90600401612ff2565b60206040518083038186803b158015611ff357600080fd5b505afa158015612007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202b9190612d45565b6120375761203761309d565b87156121b257604051632474521560e21b81526001600160a01b038816906391d14854906120999060008051602061311c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b1580156120b157600080fd5b505afa1580156120c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e99190612d45565b6120f5576120f561309d565b604051632474521560e21b81526001600160a01b038816906391d14854906121519060008051602061315c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b15801561216957600080fd5b505afa15801561217d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a19190612d45565b6121ad576121ad61309d565b612324565b604051632474521560e21b81526001600160a01b038816906391d148549061220e9060008051602061311c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b15801561222657600080fd5b505afa15801561223a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225e9190612d45565b1561226b5761226b61309d565b604051632474521560e21b81526001600160a01b038816906391d14854906122c79060008051602061315c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b1580156122df57600080fd5b505afa1580156122f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123179190612d45565b156123245761232461309d565b604051632474521560e21b81526001600160a01b038816906391d14854906123809060008051602061319c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b15801561239857600080fd5b505afa1580156123ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d09190612d45565b6123dc576123dc61309d565b604051632474521560e21b81526001600160a01b038816906391d14854906124389060008051602061313c833981519152907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b15801561245057600080fd5b505afa158015612464573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124889190612d45565b156124955761249561309d565b604051632474521560e21b81526001600160a01b038816906391d14854906124e4906000907f000000000000000000000000fe5986e06210ac1ecc1adcafc0cc7f8d63b3f97790600401612ff2565b60206040518083038186803b1580156124fc57600080fd5b505afa158015612510573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125349190612d45565b156125415761254161309d565b604051632474521560e21b81526001600160a01b038816906391d148549061257d9060008051602061311c833981519152903090600401612ff2565b60206040518083038186803b15801561259557600080fd5b505afa1580156125a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125cd9190612d45565b156125da576125da61309d565b604051632474521560e21b81526001600160a01b038816906391d14854906126169060008051602061315c833981519152903090600401612ff2565b60206040518083038186803b15801561262e57600080fd5b505afa158015612642573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126669190612d45565b156126735761267361309d565b604051632474521560e21b81526001600160a01b038816906391d14854906126af9060008051602061313c833981519152903090600401612ff2565b60206040518083038186803b1580156126c757600080fd5b505afa1580156126db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ff9190612d45565b1561270c5761270c61309d565b604051632474521560e21b81526001600160a01b038816906391d14854906127489060008051602061319c833981519152903090600401612ff2565b60206040518083038186803b15801561276057600080fd5b505afa158015612774573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127989190612d45565b156127a5576127a561309d565b604051632474521560e21b81526001600160a01b038816906391d14854906127d4906000903090600401612ff2565b60206040518083038186803b1580156127ec57600080fd5b505afa158015612800573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128249190612d45565b156128315761283161309d565b5050505050509695505050505050565b60006128908a8a88888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061288892508991508a9050613075565b866001611157565b9050600061289e8989610a63565b90506128ab8c8383610365565b506128b68c83610783565b50610a548c836110fc565b60006128d46128cf8461303a565b613009565b9050808382526020808301915083868660051b860111156128f457600080fd5b60005b8681101561298957813567ffffffffffffffff8082111561291757600080fd5b8188019150601f8a8184011261292c57600080fd5b82358281111561293e5761293e6130df565b61294f818301601f19168801613009565b92508083528b8782860101111561296557600080fd5b808785018885013760009083018701525085525092820192908201906001016128f7565b505050509392505050565b60008083601f8401126129a657600080fd5b50813567ffffffffffffffff8111156129be57600080fd5b6020830191508360208260051b85010111156129d957600080fd5b9250929050565b600082601f8301126129f157600080fd5b61077c838335602085016128c1565b8035612a0b8161310d565b919050565b600060208284031215612a2257600080fd5b813561077c816130f5565b600060208284031215612a3f57600080fd5b815161077c816130f5565b60008060408385031215612a5d57600080fd5b8235612a68816130f5565b91506020830135612a78816130f5565b809150509250929050565b600080600060608486031215612a9857600080fd5b8335612aa3816130f5565b92506020840135612ab3816130f5565b91506040840135612ac3816130f5565b809150509250925092565b60008060008060008060008060c0898b031215612aea57600080fd5b8835612af5816130f5565b9750602089013567ffffffffffffffff80821115612b1257600080fd5b818b0191508b601f830112612b2657600080fd5b813581811115612b3557600080fd5b8c6020828501011115612b4757600080fd5b6020830199508098505060408b0135915080821115612b6557600080fd5b50612b728b828c01612994565b999c989b5096999698976060880135976080810135975060a0013595509350505050565b60008060008060008060008060008060e08b8d031215612bb557600080fd5b8a35612bc0816130f5565b995060208b0135985060408b0135975060608b013567ffffffffffffffff80821115612beb57600080fd5b612bf78e838f01612994565b909950975060808d0135915080821115612c1057600080fd5b612c1c8e838f01612994565b909750955060a08d0135915080821115612c3557600080fd5b50612c428d828e01612994565b9150809450508092505060c08b013590509295989b9194979a5092959850565b60008060208385031215612c7557600080fd5b823567ffffffffffffffff811115612c8c57600080fd5b612c9885828601612994565b90969095509350505050565b60006020808385031215612cb757600080fd5b825167ffffffffffffffff811115612cce57600080fd5b8301601f81018513612cdf57600080fd5b8051612ced6128cf8261303a565b80828252848201915084840188868560051b8701011115612d0d57600080fd5b600094505b83851015612d39578051612d25816130f5565b835260019490940193918501918501612d12565b50979650505050505050565b600060208284031215612d5757600080fd5b815161077c8161310d565b600060208284031215612d7457600080fd5b5051919050565b60008060408385031215612d8e57600080fd5b505080516020909101519092909150565b60008060008060008060c08789031215612db857600080fd5b863595506020808801359550604088013567ffffffffffffffff80821115612ddf57600080fd5b818a0191508a601f830112612df357600080fd5b8135612e016128cf8261303a565b8082825285820191508585018e878560051b8801011115612e2157600080fd5b600095505b83861015612e4d578035612e39816130f5565b835260019590950194918601918601612e26565b509850505060608a0135925080831115612e6657600080fd5b5050612e7489828a016129e0565b93505060808701359150612e8a60a08801612a00565b90509295509295509295565b600081518084526020808501945080840160005b83811015612ecf5781516001600160a01b031687529582019590820190600101612eaa565b509495945050505050565b6001600160a01b0384168152606060208201819052600090612efe90830185612e96565b8281036040840152612f108185612e96565b9695505050505050565b600060018060a01b03808916835260c06020840152612f3c60c0840189612e96565b8381036040850152612f4e8189612e96565b90508381036060850152612f628188612e96565b90508381036080850152612f768187612e96565b92505080841660a084015250979650505050505050565b60018060a01b038316815260006020604081840152835180604085015260005b81811015612fc957858101830151858201606001528201612fad565b81811115612fdb576000606083870101525b50601f01601f191692909201606001949350505050565b9182526001600160a01b0316602082015260400190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613032576130326130df565b604052919050565b600067ffffffffffffffff821115613054576130546130df565b5060051b60200190565b600082821015613070576130706130b3565b500390565b600061077c3684846128c1565b6000600019821415613096576130966130b3565b5060010190565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461310a57600080fd5b50565b801515811461310a57600080fdfeec20c52871c824e5437859e75ac830e83aaaaeb7b0ffd850de830ddd3e385276260b83d52a26066d8e9db550fa70395df5f3f064b50ff9d8a94267d9f1fe1967491d7752c25cfca0f73715cde1130022a9b815373f91a996bbb1ba8943efc99bf171689cfd5919fb6ea45c7db72005f66d37a9d2ecad9a9102caf8177435cf54c5260260446719a726d11a6faece21d19daa48b4cbcca118345832d4cb71df99a2646970667358221220a8357be6684a4dfeda453d2f1ca2c9b810f0777bb0ec58ecc1171d8b861bf74664736f6c63430008060033

Verified Source Code Partial Match

Compiler: v0.8.6+commit.11564f7e EVM: istanbul Optimization: Yes (200 runs)
IEasyTrack.sol 9 lines
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.4;

interface IEasyTrack {
    function motionDuration() external view returns (uint256);
    function evmScriptExecutor() external view returns (address);
}
IAllowedTokensRegistry.sol 22 lines
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.4;

interface IAllowedTokensRegistry {
    function addToken(address _token) external;
    
    function removeToken(address _token) external;

    function renounceRole(bytes32 role, address account) external;

    function isTokenAllowed(address _token) external view returns (bool);

    function hasRole(bytes32 role, address account) external view returns (bool);

    function getAllowedTokens() external view returns (address[] memory);

    function decimals() external view returns (uint8);

    function normalizeAmount(uint256 _amount, address _token) external view returns (uint256);
}
AllowedRecipientsBuilder.sol 297 lines
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.4;

import "IAllowedRecipientsRegistry.sol";
import "IAllowedTokensRegistry.sol";
import "IEasyTrack.sol";

interface ITopUpAllowedRecipients {
    function token() external view returns (address);

    function finance() external view returns (address);

    function easyTrack() external view returns (IEasyTrack);

    function trustedCaller() external view returns (address);

    function allowedRecipientsRegistry() external view returns (address);

    function allowedTokensRegistry() external view returns (address);
}

interface IAddAllowedRecipient {
    function trustedCaller() external view returns (address);

    function allowedRecipientsRegistry() external view returns (address);
}

interface IRemoveAllowedRecipient {
    function trustedCaller() external view returns (address);

    function allowedRecipientsRegistry() external view returns (address);
}

interface IAllowedRecipientsFactory {
    function deployAllowedRecipientsRegistry(
        address _admin,
        address[] calldata _addRecipientToAllowedListRoleHolders,
        address[] calldata _removeRecipientFromAllowedListRoleHolders,
        address[] calldata _setLimitParametersRoleHolders,
        address[] calldata _updateSpentAmountRoleHolders,
        address bokkyPooBahsDateTimeContract
    ) external returns (IAllowedRecipientsRegistry);

    function deployAllowedTokensRegistry(
        address _defaultAdmin,
        address[] calldata _addTokensToAllowedListRoleHolders,
        address[] calldata _removeTokensFromAllowedListRoleHolders
    ) external returns (IAllowedTokensRegistry registry);

    function deployTopUpAllowedRecipients(
        address _trustedCaller,
        address _allowedRecipientsRegistry,
        address _allowedTokensRegistry,
        address _finance,
        address _easyTrack
    ) external returns (ITopUpAllowedRecipients topUpAllowedRecipients);

    function deployAddAllowedRecipient(address _trustedCaller, address _allowedRecipientsRegistry)
        external
        returns (IAddAllowedRecipient);

    function deployRemoveAllowedRecipient(address _trustedCaller, address _allowedRecipientsRegistry)
        external
        returns (IRemoveAllowedRecipient);
}

contract AllowedRecipientsBuilder {
    IEasyTrack public immutable easyTrack;
    address public immutable finance;
    address public immutable evmScriptExecutor;
    address public immutable admin;
    address public immutable bokkyPooBahsDateTimeContract;
    IAllowedRecipientsFactory public immutable factory;

    bytes32 public constant ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE = keccak256("ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE");
    bytes32 public constant REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE =
        keccak256("REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE");
    bytes32 public constant ADD_TOKEN_TO_ALLOWED_LIST_ROLE = keccak256("ADD_TOKEN_TO_ALLOWED_LIST_ROLE");
    bytes32 public constant REMOVE_TOKEN_FROM_ALLOWED_LIST_ROLE = keccak256("REMOVE_TOKEN_FROM_ALLOWED_LIST_ROLE");
    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
    bytes32 public constant SET_PARAMETERS_ROLE = keccak256("SET_PARAMETERS_ROLE");
    bytes32 public constant UPDATE_SPENT_AMOUNT_ROLE = keccak256("UPDATE_SPENT_AMOUNT_ROLE");

    constructor(
        IAllowedRecipientsFactory _factory,
        address _admin,
        IEasyTrack _easytrack,
        address _finance,
        address _bokkyPooBahsDateTimeContract
    ) {
        factory = _factory;
        evmScriptExecutor = _easytrack.evmScriptExecutor();
        admin = _admin;
        easyTrack = _easytrack;
        finance = _finance;
        bokkyPooBahsDateTimeContract = _bokkyPooBahsDateTimeContract;
    }

    function deployAllowedRecipientsRegistry(
        uint256 _limit,
        uint256 _periodDurationMonths,
        address[] memory _recipients,
        string[] memory _titles,
        uint256 _spentAmount,
        bool _grantRightsToEVMScriptExecutor
    ) public returns (IAllowedRecipientsRegistry registry) {
        require(_recipients.length == _titles.length, "Recipients data length mismatch");
        require(_spentAmount <= _limit, "_spentAmount must be lower or equal to limit");

        address[] memory addRecipientToAllowedListRoleHolders = new address[](
            _grantRightsToEVMScriptExecutor ? 3 : 2
        );
        addRecipientToAllowedListRoleHolders[0] = admin;
        addRecipientToAllowedListRoleHolders[1] = address(this);
        if (_grantRightsToEVMScriptExecutor) {
            addRecipientToAllowedListRoleHolders[2] = evmScriptExecutor;
        }
        address[] memory removeRecipientFromAllowedListRoleHolders = new address[](
            _grantRightsToEVMScriptExecutor ? 2 : 1
        );
        removeRecipientFromAllowedListRoleHolders[0] = admin;
        if (_grantRightsToEVMScriptExecutor) {
            removeRecipientFromAllowedListRoleHolders[1] = evmScriptExecutor;
        }
        address[] memory setLimitParametersRoleHolders = new address[](2);
        setLimitParametersRoleHolders[0] = admin;
        setLimitParametersRoleHolders[1] = address(this);
        address[] memory updateSpentAmountRoleHolders = new address[](3);
        updateSpentAmountRoleHolders[0] = admin;
        updateSpentAmountRoleHolders[1] = evmScriptExecutor;
        updateSpentAmountRoleHolders[2] = address(this);

        registry = factory.deployAllowedRecipientsRegistry(
            admin,
            addRecipientToAllowedListRoleHolders,
            removeRecipientFromAllowedListRoleHolders,
            setLimitParametersRoleHolders,
            updateSpentAmountRoleHolders,
            bokkyPooBahsDateTimeContract
        );

        assert(registry.bokkyPooBahsDateTimeContract() == bokkyPooBahsDateTimeContract);

        for (uint256 i = 0; i < _recipients.length; i++) {
            registry.addRecipient(_recipients[i], _titles[i]);
        }
        registry.renounceRole(ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE, address(this));

        assert(registry.getAllowedRecipients().length == _recipients.length);

        for (uint256 i = 0; i < _recipients.length; i++) {
            assert(registry.isRecipientAllowed(_recipients[i]));
        }

        registry.setLimitParameters(_limit, _periodDurationMonths);
        registry.renounceRole(SET_PARAMETERS_ROLE, address(this));

        (uint256 registryLimit, uint256 registryPeriodDuration) = registry.getLimitParameters();
        assert(registryLimit == _limit);
        assert(registryPeriodDuration == _periodDurationMonths);

        registry.updateSpentAmount(_spentAmount);
        registry.renounceRole(UPDATE_SPENT_AMOUNT_ROLE, address(this));

        assert(registry.spendableBalance() == _limit - _spentAmount);

        assert(registry.hasRole(ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE, admin));
        assert(registry.hasRole(REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE, admin));
        assert(registry.hasRole(SET_PARAMETERS_ROLE, admin));
        assert(registry.hasRole(UPDATE_SPENT_AMOUNT_ROLE, admin));
        assert(registry.hasRole(DEFAULT_ADMIN_ROLE, admin));

        if (_grantRightsToEVMScriptExecutor) {
            assert(registry.hasRole(ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE, evmScriptExecutor));
            assert(registry.hasRole(REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE, evmScriptExecutor));
        } else {
            assert(!registry.hasRole(ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE, evmScriptExecutor));
            assert(!registry.hasRole(REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE, evmScriptExecutor));
        }
        assert(registry.hasRole(UPDATE_SPENT_AMOUNT_ROLE, evmScriptExecutor));
        assert(!registry.hasRole(SET_PARAMETERS_ROLE, evmScriptExecutor));
        assert(!registry.hasRole(DEFAULT_ADMIN_ROLE, evmScriptExecutor));

        assert(!registry.hasRole(ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE, address(this)));
        assert(!registry.hasRole(REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE, address(this)));
        assert(!registry.hasRole(SET_PARAMETERS_ROLE, address(this)));
        assert(!registry.hasRole(UPDATE_SPENT_AMOUNT_ROLE, address(this)));
        assert(!registry.hasRole(DEFAULT_ADMIN_ROLE, address(this)));
    }

    function deployAllowedTokensRegistry(address[] calldata _tokens) public returns (IAllowedTokensRegistry registry) {
        address[] memory addTokenRoleHolders = new address[](2);
        address[] memory removeTokenRoleHolders = new address[](1);

        addTokenRoleHolders[0] = admin;
        addTokenRoleHolders[1] = address(this);

        removeTokenRoleHolders[0] = admin;

        registry = factory.deployAllowedTokensRegistry(admin, addTokenRoleHolders, removeTokenRoleHolders);

        for (uint256 i = 0; i < _tokens.length; i++) {
            registry.addToken(_tokens[i]);
        }

        registry.renounceRole(ADD_TOKEN_TO_ALLOWED_LIST_ROLE, address(this));

        for (uint256 i = 0; i < _tokens.length; i++) {
            assert(registry.isTokenAllowed(_tokens[i]));
        }

        assert(registry.hasRole(ADD_TOKEN_TO_ALLOWED_LIST_ROLE, admin));
        assert(registry.hasRole(REMOVE_TOKEN_FROM_ALLOWED_LIST_ROLE, admin));
        assert(registry.hasRole(DEFAULT_ADMIN_ROLE, admin));

        assert(!registry.hasRole(ADD_TOKEN_TO_ALLOWED_LIST_ROLE, address(this)));
    }

    function deployTopUpAllowedRecipients(
        address _trustedCaller,
        address _allowedRecipientsRegistry,
        address _allowedTokensRegistry
    ) public returns (ITopUpAllowedRecipients topUpAllowedRecipients) {
        topUpAllowedRecipients = factory.deployTopUpAllowedRecipients(
            _trustedCaller, _allowedRecipientsRegistry, _allowedTokensRegistry, finance, address(easyTrack)
        );

        assert(topUpAllowedRecipients.finance() == finance);
        assert(topUpAllowedRecipients.easyTrack() == easyTrack);
        assert(topUpAllowedRecipients.trustedCaller() == _trustedCaller);
        assert(address(topUpAllowedRecipients.allowedRecipientsRegistry()) == _allowedRecipientsRegistry);
        assert(address(topUpAllowedRecipients.allowedTokensRegistry()) == _allowedTokensRegistry);
    }

    function deployAddAllowedRecipient(address _trustedCaller, address _allowedRecipientsRegistry)
        public
        returns (IAddAllowedRecipient addAllowedRecipient)
    {
        addAllowedRecipient = factory.deployAddAllowedRecipient(_trustedCaller, _allowedRecipientsRegistry);

        assert(addAllowedRecipient.trustedCaller() == _trustedCaller);
        assert(address(addAllowedRecipient.allowedRecipientsRegistry()) == _allowedRecipientsRegistry);
    }

    function deployRemoveAllowedRecipient(address _trustedCaller, address _allowedRecipientsRegistry)
        public
        returns (IRemoveAllowedRecipient removeAllowedRecipient)
    {
        removeAllowedRecipient = factory.deployRemoveAllowedRecipient(_trustedCaller, _allowedRecipientsRegistry);

        assert(removeAllowedRecipient.trustedCaller() == _trustedCaller);
        assert(address(removeAllowedRecipient.allowedRecipientsRegistry()) == _allowedRecipientsRegistry);
    }

    function deployFullSetup(
        address _trustedCaller,
        uint256 _limit,
        uint256 _periodDurationMonths,
        address[] calldata _tokens,
        address[] calldata _recipients,
        string[] calldata _titles,
        uint256 _spentAmount
    ) public {
        IAllowedRecipientsRegistry allowedRecipientsRegistry =
            deployAllowedRecipientsRegistry(_limit, _periodDurationMonths, _recipients, _titles, _spentAmount, true);
        IAllowedTokensRegistry allowedTokensRegistry = deployAllowedTokensRegistry(_tokens);

        deployTopUpAllowedRecipients(_trustedCaller, address(allowedRecipientsRegistry), address(allowedTokensRegistry));

        deployAddAllowedRecipient(_trustedCaller, address(allowedRecipientsRegistry));

        deployRemoveAllowedRecipient(_trustedCaller, address(allowedRecipientsRegistry));
    }

    function deploySingleRecipientTopUpOnlySetup(
        address _recipient,
        string calldata _title,
        address[] calldata _tokens,
        uint256 _limit,
        uint256 _periodDurationMonths,
        uint256 _spentAmount
    ) public {
        address[] memory recipients = new address[](1);
        recipients[0] = _recipient;

        string[] memory titles = new string[](1);
        titles[0] = _title;

        IAllowedRecipientsRegistry allowedRecipientsRegistry =
            deployAllowedRecipientsRegistry(_limit, _periodDurationMonths, recipients, titles, _spentAmount, false);
        IAllowedTokensRegistry allowedTokensRegistry = deployAllowedTokensRegistry(_tokens);

        deployTopUpAllowedRecipients(_recipient, address(allowedRecipientsRegistry), address(allowedTokensRegistry));
    }
}
IAllowedRecipientsRegistry.sol 28 lines
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.4;

interface IAllowedRecipientsRegistry {
    function addRecipient(address _recipient, string memory _title) external;

    function renounceRole(bytes32 role, address account) external;

    function isRecipientAllowed(address _recipient) external view returns (bool);

    function setLimitParameters(uint256 _limit, uint256 _periodDurationMonths) external;

    function getLimitParameters() external view returns (uint256, uint256);

    function updateSpentAmount(uint256 _payoutAmount) external;

    function spendableBalance() external view returns (uint256);

    function hasRole(bytes32 role, address account) external view returns (bool);

    function getAllowedRecipients() external view returns (address[] memory);

    function bokkyPooBahsDateTimeContract() external view returns (address);

    function isUnderSpendableBalance(uint256 _amount, uint256 _motionDuration) external view returns (bool);
}

Read Contract

ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE 0x92136806 → bytes32
ADD_TOKEN_TO_ALLOWED_LIST_ROLE 0x9c6d026f → bytes32
DEFAULT_ADMIN_ROLE 0xa217fddf → bytes32
REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE 0xb361cf58 → bytes32
REMOVE_TOKEN_FROM_ALLOWED_LIST_ROLE 0x3ee526ed → bytes32
SET_PARAMETERS_ROLE 0xe3ed1466 → bytes32
UPDATE_SPENT_AMOUNT_ROLE 0x435bd804 → bytes32
admin 0xf851a440 → address
bokkyPooBahsDateTimeContract 0x7ef7a462 → address
easyTrack 0xc368df7e → address
evmScriptExecutor 0xf0fdd736 → address
factory 0xc45a0155 → address
finance 0x313b7b19 → address

Write Contract 7 functions

These functions modify contract state and require a wallet transaction to execute.

deployAddAllowedRecipient 0x4e8f119b
address _trustedCaller
address _allowedRecipientsRegistry
returns: address
deployAllowedRecipientsRegistry 0xc4269876
uint256 _limit
uint256 _periodDurationMonths
address[] _recipients
string[] _titles
uint256 _spentAmount
bool _grantRightsToEVMScriptExecutor
returns: address
deployAllowedTokensRegistry 0x659c6a5b
address[] _tokens
returns: address
deployFullSetup 0xca8371dc
address _trustedCaller
uint256 _limit
uint256 _periodDurationMonths
address[] _tokens
address[] _recipients
string[] _titles
uint256 _spentAmount
deployRemoveAllowedRecipient 0xb992ea47
address _trustedCaller
address _allowedRecipientsRegistry
returns: address
deploySingleRecipientTopUpOnlySetup 0x5ef685be
address _recipient
string _title
address[] _tokens
uint256 _limit
uint256 _periodDurationMonths
uint256 _spentAmount
deployTopUpAllowedRecipients 0x0ffe0a56
address _trustedCaller
address _allowedRecipientsRegistry
address _allowedTokensRegistry
returns: address

Recent Transactions

No transactions found for this address