diff --git a/pkg/bindings/AVSDirectory/binding.go b/pkg/bindings/AVSDirectory/binding.go index e91d51eb1..50606c7de 100644 --- a/pkg/bindings/AVSDirectory/binding.go +++ b/pkg/bindings/AVSDirectory/binding.go @@ -39,7 +39,7 @@ type ISignatureUtilsSignatureWithSaltAndExpiry struct { // AVSDirectoryMetaData contains all meta data concerning the AVSDirectory contract. var AVSDirectoryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"avsOperatorStatus\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelSalt\",\"inputs\":[{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x60c06040523480156200001157600080fd5b5060405162001f7838038062001f78833981016040819052620000349162000118565b6001600160a01b0381166080526200004b62000056565b504660a0526200014a565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000116576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012b57600080fd5b81516001600160a01b03811681146200014357600080fd5b9392505050565b60805160a051611e01620001776000396000610ea801526000818161032401526109830152611e016000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063d79aceab1161007c578063d79aceab146102f8578063df5cf7231461031f578063ec76f44214610346578063f2fde38b14610359578063f698da251461036c578063fabc1cbc1461037457600080fd5b80638da5cb5b1461029b5780639926ee7d146102ac578063a1060c88146102bf578063a364f4da146102d2578063a98fb355146102e557600080fd5b806349075da31161010a57806349075da3146101fa578063595c6a67146102355780635ac86ab71461023d5780635c975abb14610260578063715018a614610268578063886f11951461027057600080fd5b806310d67a2f14610147578063136439dd1461015c5780631794bb3c1461016f57806320606b7014610182578063374823b5146101bc575b600080fd5b61015a6101553660046118ab565b610387565b005b61015a61016a3660046118cf565b610443565b61015a61017d3660046118e8565b610582565b6101a97f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020015b60405180910390f35b6101ea6101ca366004611929565b609960209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101b3565b610228610208366004611955565b609860209081526000928352604080842090915290825290205460ff1681565b6040516101b391906119a4565b61015a6106ac565b6101ea61024b3660046119cc565b606654600160ff9092169190911b9081161490565b6066546101a9565b61015a610773565b606554610283906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b6033546001600160a01b0316610283565b61015a6102ba366004611a5f565b610787565b6101a96102cd366004611b46565b610b1a565b61015a6102e03660046118ab565b610bd3565b61015a6102f3366004611b8c565b610d3c565b6101a97fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd81565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b61015a6103543660046118cf565b610d83565b61015a6103673660046118ab565b610e2e565b6101a9610ea4565b61015a6103823660046118cf565b610ee2565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fe9190611bfe565b6001600160a01b0316336001600160a01b0316146104375760405162461bcd60e51b815260040161042e90611c1b565b60405180910390fd5b6104408161103e565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af9190611c65565b6104cb5760405162461bcd60e51b815260040161042e90611c87565b606654818116146105445760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c6974790000000000000000606482015260840161042e565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600054610100900460ff16158080156105a25750600054600160ff909116105b806105bc5750303b1580156105bc575060005460ff166001145b61061f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161042e565b6000805460ff191660011790558015610642576000805461ff0019166101001790555b61064c8383611135565b61065461121f565b609755610660846112b6565b80156106a6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190611c65565b6107345760405162461bcd60e51b815260040161042e90611c87565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b61077b611308565b61078560006112b6565b565b606654600090600190811614156107dc5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b604482015260640161042e565b42826040015110156108445760405162461bcd60e51b815260206004820152603e6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f72207369676e617475726520657870697265640000606482015260840161042e565b60013360009081526098602090815260408083206001600160a01b038816845290915290205460ff16600181111561087e5761087e61198e565b14156108e05760405162461bcd60e51b815260206004820152603f6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f7220616c7265616479207265676973746572656400606482015260840161042e565b6001600160a01b038316600090815260996020908152604080832085830151845290915290205460ff16156109645760405162461bcd60e51b81526020600482015260366024820152600080516020611dac8339815191526044820152751594ce881cd85b1d08185b1c9958591e481cdc195b9d60521b606482015260840161042e565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee9190611c65565b610a645760405162461bcd60e51b815260206004820152604d6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f72206e6f74207265676973746572656420746f204560648201526c1a59d95b93185e595c881e595d609a1b608482015260a40161042e565b6000610a7a843385602001518660400151610b1a565b9050610a8b84828560000151611362565b3360008181526098602090815260408083206001600160a01b0389168085529083528184208054600160ff199182168117909255609985528386208a860151875290945293829020805490931684179092555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610b0c91906119a4565b60405180910390a350505050565b604080517fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd6020808301919091526001600160a01b0387811683850152861660608301526080820185905260a08083018590528351808403909101815260c0909201909252805191012060009081610b90610ea4565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f190181529190528051602090910120979650505050505050565b60665460009060019081161415610c285760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b604482015260640161042e565b60013360009081526098602090815260408083206001600160a01b038716845290915290205460ff166001811115610c6257610c6261198e565b14610cd55760405162461bcd60e51b815260206004820152603f60248201527f4156534469726563746f72792e646572656769737465724f70657261746f724660448201527f726f6d4156533a206f70657261746f72206e6f74207265676973746572656400606482015260840161042e565b3360008181526098602090815260408083206001600160a01b0387168085529252808320805460ff191690555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610d3091906119a4565b60405180910390a35050565b336001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c9437138383604051610d77929190611ccf565b60405180910390a25050565b33600090815260996020908152604080832084845290915290205460ff1615610e085760405162461bcd60e51b815260206004820152603160248201527f4156534469726563746f72792e63616e63656c53616c743a2063616e6e6f742060448201527018d85b98d95b081cdc195b9d081cd85b1d607a1b606482015260840161042e565b33600090815260996020908152604080832093835292905220805460ff19166001179055565b610e36611308565b6001600160a01b038116610e9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042e565b610440816112b6565b60007f0000000000000000000000000000000000000000000000000000000000000000461415610ed5575060975490565b610edd61121f565b905090565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f599190611bfe565b6001600160a01b0316336001600160a01b031614610f895760405162461bcd60e51b815260040161042e90611c1b565b6066541981196066541916146110075760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c6974790000000000000000606482015260840161042e565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610577565b6001600160a01b0381166110cc5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a40161042e565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031615801561115657506001600160a01b03821615155b6111d85760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a40161042e565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a261121b8261103e565b5050565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6033546001600160a01b031633146107855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161042e565b6001600160a01b0383163b1561148157604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e906113a29086908690600401611cfe565b602060405180830381865afa1580156113bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e39190611d5b565b6001600160e01b0319161461147c5760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a40161042e565b505050565b826001600160a01b03166114958383611521565b6001600160a01b03161461147c5760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a40161042e565b60008060006115308585611545565b9150915061153d816115b5565b509392505050565b60008082516041141561157c5760208301516040840151606085015160001a61157087828585611770565b945094505050506115ae565b8251604014156115a6576020830151604084015161159b86838361185d565b9350935050506115ae565b506000905060025b9250929050565b60008160048111156115c9576115c961198e565b14156115d25750565b60018160048111156115e6576115e661198e565b14156116345760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161042e565b60028160048111156116485761164861198e565b14156116965760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161042e565b60038160048111156116aa576116aa61198e565b14156117035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161042e565b60048160048111156117175761171761198e565b14156104405760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161042e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156117a75750600090506003611854565b8460ff16601b141580156117bf57508460ff16601c14155b156117d05750600090506004611854565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611824573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661184d57600060019250925050611854565b9150600090505b94509492505050565b6000806001600160ff1b0383168161187a60ff86901c601b611d85565b905061188887828885611770565b935093505050935093915050565b6001600160a01b038116811461044057600080fd5b6000602082840312156118bd57600080fd5b81356118c881611896565b9392505050565b6000602082840312156118e157600080fd5b5035919050565b6000806000606084860312156118fd57600080fd5b833561190881611896565b9250602084013561191881611896565b929592945050506040919091013590565b6000806040838503121561193c57600080fd5b823561194781611896565b946020939093013593505050565b6000806040838503121561196857600080fd5b823561197381611896565b9150602083013561198381611896565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b60208101600283106119c657634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156119de57600080fd5b813560ff811681146118c857600080fd5b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a2857611a286119ef565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5757611a576119ef565b604052919050565b60008060408385031215611a7257600080fd5b8235611a7d81611896565b915060208381013567ffffffffffffffff80821115611a9b57600080fd5b9085019060608288031215611aaf57600080fd5b611ab7611a05565b823582811115611ac657600080fd5b8301601f81018913611ad757600080fd5b803583811115611ae957611ae96119ef565b611afb601f8201601f19168701611a2e565b93508084528986828401011115611b1157600080fd5b808683018786013760008682860101525050818152838301358482015260408301356040820152809450505050509250929050565b60008060008060808587031215611b5c57600080fd5b8435611b6781611896565b93506020850135611b7781611896565b93969395505050506040820135916060013590565b60008060208385031215611b9f57600080fd5b823567ffffffffffffffff80821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b813581811115611bda57600080fd5b866020828501011115611bec57600080fd5b60209290920196919550909350505050565b600060208284031215611c1057600080fd5b81516118c881611896565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611c7757600080fd5b815180151581146118c857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b82815260006020604081840152835180604085015260005b81811015611d3257858101830151858201606001528201611d16565b81811115611d44576000606083870101525b50601f01601f191692909201606001949350505050565b600060208284031215611d6d57600080fd5b81516001600160e01b0319811681146118c857600080fd5b60008219821115611da657634e487b7160e01b600052601160045260246000fd5b50019056fe4156534469726563746f72792e72656769737465724f70657261746f72546f41a26469706673582212203078326ec29ef6e4c0629c3db8b9232b52ccd0d073d4926089bdbc0d9eef3c0f64736f6c634300080c0033", + Bin: "0x60c06040523480156200001157600080fd5b5060405162001f7838038062001f78833981016040819052620000349162000118565b6001600160a01b0381166080526200004b62000056565b504660a0526200014a565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000116576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012b57600080fd5b81516001600160a01b03811681146200014357600080fd5b9392505050565b60805160a051611e01620001776000396000610ea801526000818161032401526109830152611e016000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063d79aceab1161007c578063d79aceab146102f8578063df5cf7231461031f578063ec76f44214610346578063f2fde38b14610359578063f698da251461036c578063fabc1cbc1461037457600080fd5b80638da5cb5b1461029b5780639926ee7d146102ac578063a1060c88146102bf578063a364f4da146102d2578063a98fb355146102e557600080fd5b806349075da31161010a57806349075da3146101fa578063595c6a67146102355780635ac86ab71461023d5780635c975abb14610260578063715018a614610268578063886f11951461027057600080fd5b806310d67a2f14610147578063136439dd1461015c5780631794bb3c1461016f57806320606b7014610182578063374823b5146101bc575b600080fd5b61015a6101553660046118ab565b610387565b005b61015a61016a3660046118cf565b610443565b61015a61017d3660046118e8565b610582565b6101a97f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020015b60405180910390f35b6101ea6101ca366004611929565b609960209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101b3565b610228610208366004611955565b609860209081526000928352604080842090915290825290205460ff1681565b6040516101b391906119a4565b61015a6106ac565b6101ea61024b3660046119cc565b606654600160ff9092169190911b9081161490565b6066546101a9565b61015a610773565b606554610283906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b6033546001600160a01b0316610283565b61015a6102ba366004611a5f565b610787565b6101a96102cd366004611b46565b610b1a565b61015a6102e03660046118ab565b610bd3565b61015a6102f3366004611b8c565b610d3c565b6101a97fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd81565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b61015a6103543660046118cf565b610d83565b61015a6103673660046118ab565b610e2e565b6101a9610ea4565b61015a6103823660046118cf565b610ee2565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fe9190611bfe565b6001600160a01b0316336001600160a01b0316146104375760405162461bcd60e51b815260040161042e90611c1b565b60405180910390fd5b6104408161103e565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af9190611c65565b6104cb5760405162461bcd60e51b815260040161042e90611c87565b606654818116146105445760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c6974790000000000000000606482015260840161042e565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600054610100900460ff16158080156105a25750600054600160ff909116105b806105bc5750303b1580156105bc575060005460ff166001145b61061f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161042e565b6000805460ff191660011790558015610642576000805461ff0019166101001790555b61064c8383611135565b61065461121f565b609755610660846112b6565b80156106a6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190611c65565b6107345760405162461bcd60e51b815260040161042e90611c87565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b61077b611308565b61078560006112b6565b565b606654600090600190811614156107dc5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b604482015260640161042e565b42826040015110156108445760405162461bcd60e51b815260206004820152603e6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f72207369676e617475726520657870697265640000606482015260840161042e565b60013360009081526098602090815260408083206001600160a01b038816845290915290205460ff16600181111561087e5761087e61198e565b14156108e05760405162461bcd60e51b815260206004820152603f6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f7220616c7265616479207265676973746572656400606482015260840161042e565b6001600160a01b038316600090815260996020908152604080832085830151845290915290205460ff16156109645760405162461bcd60e51b81526020600482015260366024820152600080516020611dac8339815191526044820152751594ce881cd85b1d08185b1c9958591e481cdc195b9d60521b606482015260840161042e565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee9190611c65565b610a645760405162461bcd60e51b815260206004820152604d6024820152600080516020611dac83398151915260448201527f56533a206f70657261746f72206e6f74207265676973746572656420746f204560648201526c1a59d95b93185e595c881e595d609a1b608482015260a40161042e565b6000610a7a843385602001518660400151610b1a565b9050610a8b84828560000151611362565b3360008181526098602090815260408083206001600160a01b0389168085529083528184208054600160ff199182168117909255609985528386208a860151875290945293829020805490931684179092555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610b0c91906119a4565b60405180910390a350505050565b604080517fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd6020808301919091526001600160a01b0387811683850152861660608301526080820185905260a08083018590528351808403909101815260c0909201909252805191012060009081610b90610ea4565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f190181529190528051602090910120979650505050505050565b60665460009060019081161415610c285760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b604482015260640161042e565b60013360009081526098602090815260408083206001600160a01b038716845290915290205460ff166001811115610c6257610c6261198e565b14610cd55760405162461bcd60e51b815260206004820152603f60248201527f4156534469726563746f72792e646572656769737465724f70657261746f724660448201527f726f6d4156533a206f70657261746f72206e6f74207265676973746572656400606482015260840161042e565b3360008181526098602090815260408083206001600160a01b0387168085529252808320805460ff191690555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610d3091906119a4565b60405180910390a35050565b336001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c9437138383604051610d77929190611ccf565b60405180910390a25050565b33600090815260996020908152604080832084845290915290205460ff1615610e085760405162461bcd60e51b815260206004820152603160248201527f4156534469726563746f72792e63616e63656c53616c743a2063616e6e6f742060448201527018d85b98d95b081cdc195b9d081cd85b1d607a1b606482015260840161042e565b33600090815260996020908152604080832093835292905220805460ff19166001179055565b610e36611308565b6001600160a01b038116610e9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042e565b610440816112b6565b60007f0000000000000000000000000000000000000000000000000000000000000000461415610ed5575060975490565b610edd61121f565b905090565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f599190611bfe565b6001600160a01b0316336001600160a01b031614610f895760405162461bcd60e51b815260040161042e90611c1b565b6066541981196066541916146110075760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c6974790000000000000000606482015260840161042e565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610577565b6001600160a01b0381166110cc5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a40161042e565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031615801561115657506001600160a01b03821615155b6111d85760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a40161042e565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a261121b8261103e565b5050565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6033546001600160a01b031633146107855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161042e565b6001600160a01b0383163b1561148157604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e906113a29086908690600401611cfe565b602060405180830381865afa1580156113bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e39190611d5b565b6001600160e01b0319161461147c5760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a40161042e565b505050565b826001600160a01b03166114958383611521565b6001600160a01b03161461147c5760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a40161042e565b60008060006115308585611545565b9150915061153d816115b5565b509392505050565b60008082516041141561157c5760208301516040840151606085015160001a61157087828585611770565b945094505050506115ae565b8251604014156115a6576020830151604084015161159b86838361185d565b9350935050506115ae565b506000905060025b9250929050565b60008160048111156115c9576115c961198e565b14156115d25750565b60018160048111156115e6576115e661198e565b14156116345760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161042e565b60028160048111156116485761164861198e565b14156116965760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161042e565b60038160048111156116aa576116aa61198e565b14156117035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161042e565b60048160048111156117175761171761198e565b14156104405760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161042e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156117a75750600090506003611854565b8460ff16601b141580156117bf57508460ff16601c14155b156117d05750600090506004611854565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611824573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661184d57600060019250925050611854565b9150600090505b94509492505050565b6000806001600160ff1b0383168161187a60ff86901c601b611d85565b905061188887828885611770565b935093505050935093915050565b6001600160a01b038116811461044057600080fd5b6000602082840312156118bd57600080fd5b81356118c881611896565b9392505050565b6000602082840312156118e157600080fd5b5035919050565b6000806000606084860312156118fd57600080fd5b833561190881611896565b9250602084013561191881611896565b929592945050506040919091013590565b6000806040838503121561193c57600080fd5b823561194781611896565b946020939093013593505050565b6000806040838503121561196857600080fd5b823561197381611896565b9150602083013561198381611896565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b60208101600283106119c657634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156119de57600080fd5b813560ff811681146118c857600080fd5b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a2857611a286119ef565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5757611a576119ef565b604052919050565b60008060408385031215611a7257600080fd5b8235611a7d81611896565b915060208381013567ffffffffffffffff80821115611a9b57600080fd5b9085019060608288031215611aaf57600080fd5b611ab7611a05565b823582811115611ac657600080fd5b8301601f81018913611ad757600080fd5b803583811115611ae957611ae96119ef565b611afb601f8201601f19168701611a2e565b93508084528986828401011115611b1157600080fd5b808683018786013760008682860101525050818152838301358482015260408301356040820152809450505050509250929050565b60008060008060808587031215611b5c57600080fd5b8435611b6781611896565b93506020850135611b7781611896565b93969395505050506040820135916060013590565b60008060208385031215611b9f57600080fd5b823567ffffffffffffffff80821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b813581811115611bda57600080fd5b866020828501011115611bec57600080fd5b60209290920196919550909350505050565b600060208284031215611c1057600080fd5b81516118c881611896565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611c7757600080fd5b815180151581146118c857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b82815260006020604081840152835180604085015260005b81811015611d3257858101830151858201606001528201611d16565b81811115611d44576000606083870101525b50601f01601f191692909201606001949350505050565b600060208284031215611d6d57600080fd5b81516001600160e01b0319811681146118c857600080fd5b60008219821115611da657634e487b7160e01b600052601160045260246000fd5b50019056fe4156534469726563746f72792e72656769737465724f70657261746f72546f41a2646970667358221220b7778c7d52b5fe1eb8634389cab15599e8ccf5d58343d7cd8aca6c0e2462df2d64736f6c634300080c0033", } // AVSDirectoryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/AVSDirectoryStorage/binding.go b/pkg/bindings/AVSDirectoryStorage/binding.go index 2070a8e69..9de79fbc7 100644 --- a/pkg/bindings/AVSDirectoryStorage/binding.go +++ b/pkg/bindings/AVSDirectoryStorage/binding.go @@ -38,7 +38,7 @@ type ISignatureUtilsSignatureWithSaltAndExpiry struct { // AVSDirectoryStorageMetaData contains all meta data concerning the AVSDirectoryStorage contract. var AVSDirectoryStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"avsOperatorStatus\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"avsOperatorStatus\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelSalt\",\"inputs\":[{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"anonymous\":false}]", } // AVSDirectoryStorageABI is the input ABI used to generate the binding from. @@ -342,6 +342,37 @@ func (_AVSDirectoryStorage *AVSDirectoryStorageCallerSession) Delegation() (comm return _AVSDirectoryStorage.Contract.Delegation(&_AVSDirectoryStorage.CallOpts) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_AVSDirectoryStorage *AVSDirectoryStorageCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _AVSDirectoryStorage.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_AVSDirectoryStorage *AVSDirectoryStorageSession) DomainSeparator() ([32]byte, error) { + return _AVSDirectoryStorage.Contract.DomainSeparator(&_AVSDirectoryStorage.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_AVSDirectoryStorage *AVSDirectoryStorageCallerSession) DomainSeparator() ([32]byte, error) { + return _AVSDirectoryStorage.Contract.DomainSeparator(&_AVSDirectoryStorage.CallOpts) +} + // OperatorSaltIsSpent is a free data retrieval call binding the contract method 0x374823b5. // // Solidity: function operatorSaltIsSpent(address , bytes32 ) view returns(bool) @@ -373,6 +404,27 @@ func (_AVSDirectoryStorage *AVSDirectoryStorageCallerSession) OperatorSaltIsSpen return _AVSDirectoryStorage.Contract.OperatorSaltIsSpent(&_AVSDirectoryStorage.CallOpts, arg0, arg1) } +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_AVSDirectoryStorage *AVSDirectoryStorageTransactor) CancelSalt(opts *bind.TransactOpts, salt [32]byte) (*types.Transaction, error) { + return _AVSDirectoryStorage.contract.Transact(opts, "cancelSalt", salt) +} + +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_AVSDirectoryStorage *AVSDirectoryStorageSession) CancelSalt(salt [32]byte) (*types.Transaction, error) { + return _AVSDirectoryStorage.Contract.CancelSalt(&_AVSDirectoryStorage.TransactOpts, salt) +} + +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_AVSDirectoryStorage *AVSDirectoryStorageTransactorSession) CancelSalt(salt [32]byte) (*types.Transaction, error) { + return _AVSDirectoryStorage.Contract.CancelSalt(&_AVSDirectoryStorage.TransactOpts, salt) +} + // DeregisterOperatorFromAVS is a paid mutator transaction binding the contract method 0xa364f4da. // // Solidity: function deregisterOperatorFromAVS(address operator) returns() diff --git a/pkg/bindings/BackingEigen/binding.go b/pkg/bindings/BackingEigen/binding.go index 7adf41315..ac5077016 100644 --- a/pkg/bindings/BackingEigen/binding.go +++ b/pkg/bindings/BackingEigen/binding.go @@ -37,8 +37,8 @@ type ERC20VotesUpgradeableCheckpoint struct { // BackingEigenMetaData contains all meta data concerning the BackingEigen contract. var BackingEigenMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_EIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedFrom\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pos\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"components\":[{\"name\":\"fromBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"votes\",\"type\":\"uint224\",\"internalType\":\"uint224\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegate\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateBySig\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegates\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"inputs\":[{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numCheckpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Backed\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateChanged\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"inputs\":[{\"name\":\"delegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"previousBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferRestrictionsDisabled\",\"inputs\":[],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162002b4438038062002b44833981016040819052620000349162000113565b6001600160a01b0381166080526200004b62000052565b5062000145565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000111576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012657600080fd5b81516001600160a01b03811681146200013e57600080fd5b9392505050565b6080516129c76200017d6000396000818161056f01528181610c5b01528181610c8601528181610cb10152610cd201526129c76000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c806384b0196e11610125578063b8c25594116100ad578063dd62ed3e1161007c578063dd62ed3e146104ff578063eb415f4514610512578063f1127ed81461051a578063f2fde38b14610557578063fdc371ce1461056a57600080fd5b8063b8c25594146104b3578063c3cda520146104c6578063c4d66de8146104d9578063d505accf146104ec57600080fd5b806395d89b41116100f457806395d89b41146104685780639ab24eb0146104705780639aec4bae14610483578063a457c2d71461048d578063a9059cbb146104a057600080fd5b806384b0196e1461040a5780638da5cb5b146104255780638e539e8c1461043657806391ddadf41461044957600080fd5b80633a46b1a8116101a85780636fcfff45116101775780636fcfff451461037a57806370a08231146103a2578063715018a6146103cb57806378aa33ba146103d35780637ecebe00146103f757600080fd5b80633a46b1a8146102e65780634bf5d7e9146102f9578063587cde1e146103235780635c19a95c1461036757600080fd5b80631ffacdef116101ef5780631ffacdef1461029457806323b872dd146102a9578063313ce567146102bc5780633644e515146102cb57806339509351146102d357600080fd5b80630455e6941461022157806306fdde031461025a578063095ea7b31461026f57806318160ddd14610282575b600080fd5b61024561022f366004612548565b6101316020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b610262610591565b60405161025191906125b0565b61024561027d3660046125c3565b610623565b6067545b604051908152602001610251565b6102a76102a23660046125ed565b61063b565b005b6102456102b7366004612629565b610651565b60405160128152602001610251565b610286610675565b6102456102e13660046125c3565b610684565b6102866102f43660046125c3565b6106a6565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b6020820152610262565b61034f610331366004612548565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b039091168152602001610251565b6102a7610375366004612548565b610730565b61038d610388366004612548565b61073d565b60405163ffffffff9091168152602001610251565b6102866103b0366004612548565b6001600160a01b031660009081526065602052604090205490565b6102a7610765565b6102456103e1366004612548565b6101326020526000908152604090205460ff1681565b610286610405366004612548565b610779565b610412610797565b6040516102519796959493929190612665565b6033546001600160a01b031661034f565b6102866104443660046126fb565b610835565b61045161089d565b60405165ffffffffffff9091168152602001610251565b6102626108a8565b61028661047e366004612548565b6108b7565b6102866101305481565b61024561049b3660046125c3565b610939565b6102456104ae3660046125c3565b6109b4565b6102a76104c13660046125ed565b6109c2565b6102a76104d4366004612725565b6109d4565b6102a76104e7366004612548565b610b0a565b6102a76104fa36600461277d565b610dc9565b61028661050d3660046127e7565b610f2d565b6102a7610f58565b61052d61052836600461281a565b611028565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610251565b6102a7610565366004612548565b6110ac565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b6060606880546105a09061284f565b80601f01602080910402602001604051908101604052809291908181526020018280546105cc9061284f565b80156106195780601f106105ee57610100808354040283529160200191610619565b820191906000526020600020905b8154815290600101906020018083116105fc57829003601f168201915b5050505050905090565b600033610631818585611122565b5060019392505050565b610643611246565b61064d82826112a0565b5050565b60003361065f858285611301565b61066a85858561137b565b506001949350505050565b600061067f611537565b905090565b6000336106318185856106978383610f2d565b6106a1919061289a565b611122565b60006106b061089d565b65ffffffffffff1682106107075760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff602052604090206107299083611541565b9392505050565b61073a338261162a565b50565b6001600160a01b038116600090815260ff602052604081205461075f906116a4565b92915050565b61076d611246565b610777600061170d565b565b6001600160a01b038116600090815260cb602052604081205461075f565b6000606080600080600060606097546000801b1480156107b75750609854155b6107fb5760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b60448201526064016106fe565b61080361175f565b61080b61176e565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600061083f61089d565b65ffffffffffff1682106108915760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064016106fe565b61075f61010083611541565b600061067f4261177d565b6060606980546105a09061284f565b6001600160a01b038116600090815260ff60205260408120548015610926576001600160a01b038316600090815260ff6020526040902080546000198301908110610904576109046128b2565b60009182526020909120015464010000000090046001600160e01b0316610929565b60005b6001600160e01b03169392505050565b600033816109478286610f2d565b9050838110156109a75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106fe565b61066a8286868403611122565b60003361063181858561137b565b6109ca611246565b61064d82826117e4565b83421115610a245760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016106fe565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610a9e90610a969060a0016040516020818303038152906040528051906020012061183d565b85858561186a565b9050610aa981611892565b8614610af75760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016106fe565b610b01818861162a565b50505050505050565b600054610100900460ff1615808015610b2a5750600054600160ff909116105b80610b445750303b158015610b44575060005460ff166001145b610ba75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106fe565b6000805460ff191660011790558015610bca576000805461ff0019166101001790555b610bd26118ba565b610c1f6040518060400160405280600d81526020016c2130b1b5b4b7339022b4b3b2b760991b815250604051806040016040528060068152602001653122a4a3a2a760d11b8152506118e9565b610c288261170d565b610c4f604051806040016040528060068152602001653122a4a3a2a760d11b81525061191a565b60001961013055610c817f000000000000000000000000000000000000000000000000000000000000000060016112a0565b610cac7f000000000000000000000000000000000000000000000000000000000000000060016117e4565b610d577f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5291906128c8565b611964565b6040517fb7c23c1e2e36f298e9879a88ecfcd07e28fbb439bcfa9c78ca1363ca14370d2690600090a1801561064d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b83421115610e195760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016106fe565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610e488c611892565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610ea38261183d565b90506000610eb38287878761186a565b9050896001600160a01b0316816001600160a01b031614610f165760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016106fe565b610f218a8a8a611122565b50505050505050505050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b610f60611246565b6000196101305414610ff75760405162461bcd60e51b815260206004820152605460248201527f4261636b696e67456967656e2e64697361626c655472616e736665725265737460448201527f72696374696f6e733a207472616e73666572207265737472696374696f6e7320606482015273185c9948185b1c9958591e48191a5cd8589b195960621b608482015260a4016106fe565b60006101308190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff841690811061106c5761106c6128b2565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6110b4611246565b6001600160a01b0381166111195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106fe565b61073a8161170d565b6001600160a01b0383166111845760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106fe565b6001600160a01b0382166111e55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106fe565b6001600160a01b0383811660008181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6033546001600160a01b031633146107775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106fe565b6001600160a01b03821660008181526101316020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b600061130d8484610f2d565b9050600019811461137557818110156113685760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106fe565b6113758484848403611122565b50505050565b6001600160a01b0383166113df5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106fe565b6001600160a01b0382166114415760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106fe565b61144c8383836119ef565b6001600160a01b038316600090815260656020526040902054818110156114c45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106fe565b6001600160a01b0380851660008181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115249086815260200190565b60405180910390a3611375848484611acd565b600061067f611aff565b81546000908181600581111561159b57600061155c84611b73565b61156690856128e1565b600088815260209020909150869082015463ffffffff16111561158b57809150611599565b61159681600161289a565b92505b505b808210156115e85760006115af8383611c58565b600088815260209020909150869082015463ffffffff1611156115d4578091506115e2565b6115df81600161289a565b92505b5061159b565b8015611614576000868152602090208101600019015464010000000090046001600160e01b0316611617565b60005b6001600160e01b03169695505050505050565b6001600160a01b03828116600081815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611375828483611c73565b600063ffffffff8211156117095760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016106fe565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060609980546105a09061284f565b6060609a80546105a09061284f565b600065ffffffffffff8211156117095760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b60648201526084016106fe565b6001600160a01b03821660008181526101326020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b91016112f5565b600061075f61184a611537565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600061187b87878787611db0565b9150915061188881611e74565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b600054610100900460ff166118e15760405162461bcd60e51b81526004016106fe906128f8565b610777611fc2565b600054610100900460ff166119105760405162461bcd60e51b81526004016106fe906128f8565b61064d8282611ff2565b600054610100900460ff166119415760405162461bcd60e51b81526004016106fe906128f8565b61073a81604051806040016040528060018152602001603160f81b815250612040565b61196e828261209d565b6067546001600160e01b0310156119e05760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016106fe565b6113756101006121728361217e565b610130544211611ac8576001600160a01b0383166000908152610131602052604090205460ff1680611a3a57506001600160a01b0382166000908152610132602052604090205460ff165b80611a4c57506001600160a01b038316155b611ac85760405162461bcd60e51b815260206004820152604160248201527f4261636b696e67456967656e2e5f6265666f7265546f6b656e5472616e73666560448201527f723a2066726f6d206f7220746f206d7573742062652077686974656c697374656064820152601960fa1b608482015260a4016106fe565b505050565b6001600160a01b03838116600090815260fe6020526040808220548584168352912054611ac892918216911683611c73565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611b2a6122f3565b611b3261234c565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081611b8257506000919050565b60006001611b8f8461237d565b901c6001901b90506001818481611ba857611ba8612943565b048201901c90506001818481611bc057611bc0612943565b048201901c90506001818481611bd857611bd8612943565b048201901c90506001818481611bf057611bf0612943565b048201901c90506001818481611c0857611c08612943565b048201901c90506001818481611c2057611c20612943565b048201901c90506001818481611c3857611c38612943565b048201901c905061072981828581611c5257611c52612943565b04612411565b6000611c676002848418612959565b6107299084841661289a565b816001600160a01b0316836001600160a01b031614158015611c955750600081115b15611ac8576001600160a01b03831615611d23576001600160a01b038316600090815260ff602052604081208190611cd0906124278561217e565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611d18929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611ac8576001600160a01b038216600090815260ff602052604081208190611d59906121728561217e565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611da1929190918252602082015260400190565b60405180910390a25050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611de75750600090506003611e6b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e3b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e6457600060019250925050611e6b565b9150600090505b94509492505050565b6000816004811115611e8857611e8861297b565b1415611e915750565b6001816004811115611ea557611ea561297b565b1415611ef35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106fe565b6002816004811115611f0757611f0761297b565b1415611f555760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106fe565b6003816004811115611f6957611f6961297b565b141561073a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106fe565b600054610100900460ff16611fe95760405162461bcd60e51b81526004016106fe906128f8565b6107773361170d565b600054610100900460ff166120195760405162461bcd60e51b81526004016106fe906128f8565b815161202c90606890602085019061249c565b508051611ac890606990602084019061249c565b600054610100900460ff166120675760405162461bcd60e51b81526004016106fe906128f8565b815161207a90609990602085019061249c565b50805161208e90609a90602084019061249c565b50506000609781905560985550565b6001600160a01b0382166120f35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106fe565b6120ff600083836119ef565b8060676000828254612111919061289a565b90915550506001600160a01b0382166000818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361064d60008383611acd565b6000610729828461289a565b825460009081908181156121cb5760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b031660208201526121e0565b60408051808201909152600080825260208201525b905080602001516001600160e01b0316935061220084868863ffffffff16565b925060008211801561222a575061221561089d565b65ffffffffffff16816000015163ffffffff16145b1561226f5761223883612433565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff9092169190911790556122e9565b86604051806040016040528061229361228661089d565b65ffffffffffff166116a4565b63ffffffff1681526020016122a786612433565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b6000806122fe61175f565b805190915015612315578051602090910120919050565b60975480156123245792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b60008061235761176e565b80519091501561236e578051602090910120919050565b60985480156123245792915050565b600080608083901c1561239257608092831c92015b604083901c156123a457604092831c92015b602083901c156123b657602092831c92015b601083901c156123c857601092831c92015b600883901c156123da57600892831c92015b600483901c156123ec57600492831c92015b600283901c156123fe57600292831c92015b600183901c1561075f5760010192915050565b60008183106124205781610729565b5090919050565b600061072982846128e1565b60006001600160e01b038211156117095760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016106fe565b8280546124a89061284f565b90600052602060002090601f0160209004810192826124ca5760008555612510565b82601f106124e357805160ff1916838001178555612510565b82800160010185558215612510579182015b828111156125105782518255916020019190600101906124f5565b506117099291505b808211156117095760008155600101612518565b80356001600160a01b038116811461254357600080fd5b919050565b60006020828403121561255a57600080fd5b6107298261252c565b6000815180845260005b818110156125895760208185018101518683018201520161256d565b8181111561259b576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006107296020830184612563565b600080604083850312156125d657600080fd5b6125df8361252c565b946020939093013593505050565b6000806040838503121561260057600080fd5b6126098361252c565b91506020830135801515811461261e57600080fd5b809150509250929050565b60008060006060848603121561263e57600080fd5b6126478461252c565b92506126556020850161252c565b9150604084013590509250925092565b60ff60f81b881681526000602060e08184015261268560e084018a612563565b8381036040850152612697818a612563565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156126e9578351835292840192918401916001016126cd565b50909c9b505050505050505050505050565b60006020828403121561270d57600080fd5b5035919050565b803560ff8116811461254357600080fd5b60008060008060008060c0878903121561273e57600080fd5b6127478761252c565b9550602087013594506040870135935061276360608801612714565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561279857600080fd5b6127a18861252c565b96506127af6020890161252c565b955060408801359450606088013593506127cb60808901612714565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156127fa57600080fd5b6128038361252c565b91506128116020840161252c565b90509250929050565b6000806040838503121561282d57600080fd5b6128368361252c565b9150602083013563ffffffff8116811461261e57600080fd5b600181811c9082168061286357607f821691505b602082108114156118b457634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156128ad576128ad612884565b500190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156128da57600080fd5b5051919050565b6000828210156128f3576128f3612884565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261297657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea26469706673582212208696d7fc75edc692b65d65df10ce07940ca4f7436f6a38a536db45f6904769aa64736f6c634300080c0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_EIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedFrom\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burn\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pos\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"components\":[{\"name\":\"fromBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"votes\",\"type\":\"uint224\",\"internalType\":\"uint224\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegate\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateBySig\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegates\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"inputs\":[{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isMinter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numCheckpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setIsMinter\",\"inputs\":[{\"name\":\"minterAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newStatus\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Backed\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateChanged\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"inputs\":[{\"name\":\"delegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"previousBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"IsMinterModified\",\"inputs\":[{\"name\":\"minterAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newStatus\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferRestrictionsDisabled\",\"inputs\":[],\"anonymous\":false}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162002d9738038062002d97833981016040819052620000349162000113565b6001600160a01b0381166080526200004b62000052565b5062000145565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000111576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012657600080fd5b81516001600160a01b03811681146200013e57600080fd5b9392505050565b608051612c2162000176600039600081816105f801528181610de301528181610e0e0152610e390152612c216000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80637ecebe001161013b578063aa271e1a116100b8578063dd62ed3e1161007c578063dd62ed3e14610588578063eb415f451461059b578063f1127ed8146105a3578063f2fde38b146105e0578063fdc371ce146105f357600080fd5b8063aa271e1a14610518578063b8c255941461053c578063c3cda5201461054f578063c4d66de814610562578063d505accf1461057557600080fd5b806395d89b41116100ff57806395d89b41146104cd5780639ab24eb0146104d55780639aec4bae146104e8578063a457c2d7146104f2578063a9059cbb1461050557600080fd5b80637ecebe001461045c57806384b0196e1461046f5780638da5cb5b1461048a5780638e539e8c1461049b57806391ddadf4146104ae57600080fd5b806340c10f19116101c957806366eb399f1161018d57806366eb399f146103cc5780636fcfff45146103df57806370a0823114610407578063715018a61461043057806378aa33ba1461043857600080fd5b806340c10f191461032557806342966c68146103385780634bf5d7e91461034b578063587cde1e146103755780635c19a95c146103b957600080fd5b806323b872dd1161021057806323b872dd146102d5578063313ce567146102e85780633644e515146102f757806339509351146102ff5780633a46b1a81461031257600080fd5b80630455e6941461024d57806306fdde0314610286578063095ea7b31461029b57806318160ddd146102ae5780631ffacdef146102c0575b600080fd5b61027161025b3660046127bb565b6101316020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61028e61061a565b60405161027d9190612823565b6102716102a9366004612836565b6106ac565b6067545b60405190815260200161027d565b6102d36102ce366004612860565b6106c4565b005b6102716102e336600461289c565b6106da565b6040516012815260200161027d565b6102b26106fe565b61027161030d366004612836565b61070d565b6102b2610320366004612836565b61072f565b6102d3610333366004612836565b6107b9565b6102d36103463660046128d8565b610835565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b602082015261028e565b6103a16103833660046127bb565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b03909116815260200161027d565b6102d36103c73660046127bb565b610842565b6102d36103da366004612860565b61084c565b6103f26103ed3660046127bb565b6108c5565b60405163ffffffff909116815260200161027d565b6102b26104153660046127bb565b6001600160a01b031660009081526065602052604090205490565b6102d36108ed565b6102716104463660046127bb565b6101326020526000908152604090205460ff1681565b6102b261046a3660046127bb565b610901565b61047761091f565b60405161027d97969594939291906128f1565b6033546001600160a01b03166103a1565b6102b26104a93660046128d8565b6109bd565b6104b6610a25565b60405165ffffffffffff909116815260200161027d565b61028e610a30565b6102b26104e33660046127bb565b610a3f565b6102b26101305481565b610271610500366004612836565b610ac1565b610271610513366004612836565b610b3c565b6102716105263660046127bb565b6101336020526000908152604090205460ff1681565b6102d361054a366004612860565b610b4a565b6102d361055d366004612998565b610b5c565b6102d36105703660046127bb565b610c92565b6102d36105833660046129f0565b610edc565b6102b2610596366004612a5a565b611040565b6102d361106b565b6105b66105b1366004612a8d565b61113b565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161027d565b6102d36105ee3660046127bb565b6111bf565b6103a17f000000000000000000000000000000000000000000000000000000000000000081565b60606068805461062990612ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461065590612ac2565b80156106a25780601f10610677576101008083540402835291602001916106a2565b820191906000526020600020905b81548152906001019060200180831161068557829003601f168201915b5050505050905090565b6000336106ba818585611235565b5060019392505050565b6106cc611359565b6106d682826113b3565b5050565b6000336106e8858285611414565b6106f385858561148e565b506001949350505050565b600061070861164a565b905090565b6000336106ba8185856107208383611040565b61072a9190612b0d565b611235565b6000610739610a25565b65ffffffffffff1682106107905760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff602052604090206107b29083611654565b9392505050565b336000908152610133602052604090205460ff1661082b5760405162461bcd60e51b815260206004820152602960248201527f4261636b696e67456967656e2e6d696e743a2063616c6c6572206973206e6f7460448201526810309036b4b73a32b960b91b6064820152608401610787565b6106d6828261173d565b61083f33826117c8565b50565b61083f33826117e1565b610854611359565b816001600160a01b03167f0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde82604051610891911515815260200190565b60405180910390a26001600160a01b0391909116600090815261013360205260409020805460ff1916911515919091179055565b6001600160a01b038116600090815260ff60205260408120546108e79061185b565b92915050565b6108f5611359565b6108ff60006118c4565b565b6001600160a01b038116600090815260cb60205260408120546108e7565b6000606080600080600060606097546000801b14801561093f5750609854155b6109835760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610787565b61098b611916565b610993611925565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60006109c7610a25565b65ffffffffffff168210610a195760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610787565b6108e761010083611654565b600061070842611934565b60606069805461062990612ac2565b6001600160a01b038116600090815260ff60205260408120548015610aae576001600160a01b038316600090815260ff6020526040902080546000198301908110610a8c57610a8c612b25565b60009182526020909120015464010000000090046001600160e01b0316610ab1565b60005b6001600160e01b03169392505050565b60003381610acf8286611040565b905083811015610b2f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610787565b6106f38286868403611235565b6000336106ba81858561148e565b610b52611359565b6106d6828261199b565b83421115610bac5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610787565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610c2690610c1e9060a001604051602081830303815290604052805190602001206119f4565b858585611a21565b9050610c3181611a49565b8614610c7f5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610787565b610c8981886117e1565b50505050505050565b600054610100900460ff1615808015610cb25750600054600160ff909116105b80610ccc5750303b158015610ccc575060005460ff166001145b610d2f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610787565b6000805460ff191660011790558015610d52576000805461ff0019166101001790555b610d5a611a71565b610da76040518060400160405280600d81526020016c2130b1b5b4b7339022b4b3b2b760991b815250604051806040016040528060068152602001653122a4a3a2a760d11b815250611aa0565b610db0826118c4565b610dd7604051806040016040528060068152602001653122a4a3a2a760d11b815250611ad1565b60001961013055610e097f000000000000000000000000000000000000000000000000000000000000000060016113b3565b610e347f0000000000000000000000000000000000000000000000000000000000000000600161199b565b610e6a7f00000000000000000000000000000000000000000000000000000000000000006b05686877afb5cbccbf73400061173d565b6040517fb7c23c1e2e36f298e9879a88ecfcd07e28fbb439bcfa9c78ca1363ca14370d2690600090a180156106d6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b83421115610f2c5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610787565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610f5b8c611a49565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610fb6826119f4565b90506000610fc682878787611a21565b9050896001600160a01b0316816001600160a01b0316146110295760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610787565b6110348a8a8a611235565b50505050505050505050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b611073611359565b600019610130541461110a5760405162461bcd60e51b815260206004820152605460248201527f4261636b696e67456967656e2e64697361626c655472616e736665725265737460448201527f72696374696f6e733a207472616e73666572207265737472696374696f6e7320606482015273185c9948185b1c9958591e48191a5cd8589b195960621b608482015260a401610787565b60006101308190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff841690811061117f5761117f612b25565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6111c7611359565b6001600160a01b03811661122c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610787565b61083f816118c4565b6001600160a01b0383166112975760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610787565b6001600160a01b0382166112f85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610787565b6001600160a01b0383811660008181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6033546001600160a01b031633146108ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610787565b6001600160a01b03821660008181526101316020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b60006114208484611040565b90506000198114611488578181101561147b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610787565b6114888484848403611235565b50505050565b6001600160a01b0383166114f25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610787565b6001600160a01b0382166115545760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610787565b61155f838383611b1b565b6001600160a01b038316600090815260656020526040902054818110156115d75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610787565b6001600160a01b0380851660008181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116379086815260200190565b60405180910390a3611488848484611bf9565b6000610708611c2b565b8154600090818160058111156116ae57600061166f84611c9f565b6116799085612b3b565b600088815260209020909150869082015463ffffffff16111561169e578091506116ac565b6116a9816001612b0d565b92505b505b808210156116fb5760006116c28383611d84565b600088815260209020909150869082015463ffffffff1611156116e7578091506116f5565b6116f2816001612b0d565b92505b506116ae565b8015611727576000868152602090208101600019015464010000000090046001600160e01b031661172a565b60005b6001600160e01b03169695505050505050565b6117478282611d9f565b6067546001600160e01b0310156117b95760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610787565b611488610100611e7483611e80565b6117d28282611ff5565b61148861010061213c83611e80565b6001600160a01b03828116600081815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611488828483612148565b600063ffffffff8211156118c05760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610787565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606099805461062990612ac2565b6060609a805461062990612ac2565b600065ffffffffffff8211156118c05760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610787565b6001600160a01b03821660008181526101326020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b9101611408565b60006108e7611a0161164a565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611a3287878787612285565b91509150611a3f81612349565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b600054610100900460ff16611a985760405162461bcd60e51b815260040161078790612b52565b6108ff612497565b600054610100900460ff16611ac75760405162461bcd60e51b815260040161078790612b52565b6106d682826124c7565b600054610100900460ff16611af85760405162461bcd60e51b815260040161078790612b52565b61083f81604051806040016040528060018152602001603160f81b815250612515565b610130544211611bf4576001600160a01b0383166000908152610131602052604090205460ff1680611b6657506001600160a01b0382166000908152610132602052604090205460ff165b80611b7857506001600160a01b038316155b611bf45760405162461bcd60e51b815260206004820152604160248201527f4261636b696e67456967656e2e5f6265666f7265546f6b656e5472616e73666560448201527f723a2066726f6d206f7220746f206d7573742062652077686974656c697374656064820152601960fa1b608482015260a401610787565b505050565b6001600160a01b03838116600090815260fe6020526040808220548584168352912054611bf492918216911683612148565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611c56612572565b611c5e6125cb565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081611cae57506000919050565b60006001611cbb846125fc565b901c6001901b90506001818481611cd457611cd4612b9d565b048201901c90506001818481611cec57611cec612b9d565b048201901c90506001818481611d0457611d04612b9d565b048201901c90506001818481611d1c57611d1c612b9d565b048201901c90506001818481611d3457611d34612b9d565b048201901c90506001818481611d4c57611d4c612b9d565b048201901c90506001818481611d6457611d64612b9d565b048201901c90506107b281828581611d7e57611d7e612b9d565b04612690565b6000611d936002848418612bb3565b6107b290848416612b0d565b6001600160a01b038216611df55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610787565b611e0160008383611b1b565b8060676000828254611e139190612b0d565b90915550506001600160a01b0382166000818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36106d660008383611bf9565b60006107b28284612b0d565b82546000908190818115611ecd5760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611ee2565b60408051808201909152600080825260208201525b905080602001516001600160e01b03169350611f0284868863ffffffff16565b9250600082118015611f2c5750611f17610a25565b65ffffffffffff16816000015163ffffffff16145b15611f7157611f3a836126a6565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff909216919091179055611feb565b866040518060400160405280611f95611f88610a25565b65ffffffffffff1661185b565b63ffffffff168152602001611fa9866126a6565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b6001600160a01b0382166120555760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610787565b61206182600083611b1b565b6001600160a01b038216600090815260656020526040902054818110156120d55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610787565b6001600160a01b03831660008181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611bf483600084611bf9565b60006107b28284612b3b565b816001600160a01b0316836001600160a01b03161415801561216a5750600081115b15611bf4576001600160a01b038316156121f8576001600160a01b038316600090815260ff6020526040812081906121a59061213c85611e80565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516121ed929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611bf4576001600160a01b038216600090815260ff60205260408120819061222e90611e7485611e80565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612276929190918252602082015260400190565b60405180910390a25050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156122bc5750600090506003612340565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612310573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661233957600060019250925050612340565b9150600090505b94509492505050565b600081600481111561235d5761235d612bd5565b14156123665750565b600181600481111561237a5761237a612bd5565b14156123c85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610787565b60028160048111156123dc576123dc612bd5565b141561242a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610787565b600381600481111561243e5761243e612bd5565b141561083f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610787565b600054610100900460ff166124be5760405162461bcd60e51b815260040161078790612b52565b6108ff336118c4565b600054610100900460ff166124ee5760405162461bcd60e51b815260040161078790612b52565b815161250190606890602085019061270f565b508051611bf490606990602084019061270f565b600054610100900460ff1661253c5760405162461bcd60e51b815260040161078790612b52565b815161254f90609990602085019061270f565b50805161256390609a90602084019061270f565b50506000609781905560985550565b60008061257d611916565b805190915015612594578051602090910120919050565b60975480156125a35792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806125d6611925565b8051909150156125ed578051602090910120919050565b60985480156125a35792915050565b600080608083901c1561261157608092831c92015b604083901c1561262357604092831c92015b602083901c1561263557602092831c92015b601083901c1561264757601092831c92015b600883901c1561265957600892831c92015b600483901c1561266b57600492831c92015b600283901c1561267d57600292831c92015b600183901c156108e75760010192915050565b600081831061269f57816107b2565b5090919050565b60006001600160e01b038211156118c05760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610787565b82805461271b90612ac2565b90600052602060002090601f01602090048101928261273d5760008555612783565b82601f1061275657805160ff1916838001178555612783565b82800160010185558215612783579182015b82811115612783578251825591602001919060010190612768565b506118c09291505b808211156118c0576000815560010161278b565b80356001600160a01b03811681146127b657600080fd5b919050565b6000602082840312156127cd57600080fd5b6107b28261279f565b6000815180845260005b818110156127fc576020818501810151868301820152016127e0565b8181111561280e576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006107b260208301846127d6565b6000806040838503121561284957600080fd5b6128528361279f565b946020939093013593505050565b6000806040838503121561287357600080fd5b61287c8361279f565b91506020830135801515811461289157600080fd5b809150509250929050565b6000806000606084860312156128b157600080fd5b6128ba8461279f565b92506128c86020850161279f565b9150604084013590509250925092565b6000602082840312156128ea57600080fd5b5035919050565b60ff60f81b881681526000602060e08184015261291160e084018a6127d6565b8381036040850152612923818a6127d6565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561297557835183529284019291840191600101612959565b50909c9b505050505050505050505050565b803560ff811681146127b657600080fd5b60008060008060008060c087890312156129b157600080fd5b6129ba8761279f565b955060208701359450604087013593506129d660608801612987565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a031215612a0b57600080fd5b612a148861279f565b9650612a226020890161279f565b95506040880135945060608801359350612a3e60808901612987565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612a6d57600080fd5b612a768361279f565b9150612a846020840161279f565b90509250929050565b60008060408385031215612aa057600080fd5b612aa98361279f565b9150602083013563ffffffff8116811461289157600080fd5b600181811c90821680612ad657607f821691505b60208210811415611a6b57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612b2057612b20612af7565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015612b4d57612b4d612af7565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612bd057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea26469706673582212205b136cec4035a938fe2f94a2475e38a3aea7e9678e80b6baf36f7a11bd8b574e64736f6c634300080c0033", } // BackingEigenABI is the input ABI used to generate the binding from. @@ -712,6 +712,37 @@ func (_BackingEigen *BackingEigenCallerSession) GetVotes(account common.Address) return _BackingEigen.Contract.GetVotes(&_BackingEigen.CallOpts, account) } +// IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. +// +// Solidity: function isMinter(address ) view returns(bool) +func (_BackingEigen *BackingEigenCaller) IsMinter(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _BackingEigen.contract.Call(opts, &out, "isMinter", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. +// +// Solidity: function isMinter(address ) view returns(bool) +func (_BackingEigen *BackingEigenSession) IsMinter(arg0 common.Address) (bool, error) { + return _BackingEigen.Contract.IsMinter(&_BackingEigen.CallOpts, arg0) +} + +// IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. +// +// Solidity: function isMinter(address ) view returns(bool) +func (_BackingEigen *BackingEigenCallerSession) IsMinter(arg0 common.Address) (bool, error) { + return _BackingEigen.Contract.IsMinter(&_BackingEigen.CallOpts, arg0) +} + // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) @@ -950,6 +981,27 @@ func (_BackingEigen *BackingEigenTransactorSession) Approve(spender common.Addre return _BackingEigen.Contract.Approve(&_BackingEigen.TransactOpts, spender, amount) } +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_BackingEigen *BackingEigenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.contract.Transact(opts, "burn", amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_BackingEigen *BackingEigenSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.Contract.Burn(&_BackingEigen.TransactOpts, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_BackingEigen *BackingEigenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.Contract.Burn(&_BackingEigen.TransactOpts, amount) +} + // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) @@ -1076,6 +1128,27 @@ func (_BackingEigen *BackingEigenTransactorSession) Initialize(initialOwner comm return _BackingEigen.Contract.Initialize(&_BackingEigen.TransactOpts, initialOwner) } +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_BackingEigen *BackingEigenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.contract.Transact(opts, "mint", to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_BackingEigen *BackingEigenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.Contract.Mint(&_BackingEigen.TransactOpts, to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_BackingEigen *BackingEigenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _BackingEigen.Contract.Mint(&_BackingEigen.TransactOpts, to, amount) +} + // Permit is a paid mutator transaction binding the contract method 0xd505accf. // // Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() @@ -1160,6 +1233,27 @@ func (_BackingEigen *BackingEigenTransactorSession) SetAllowedTo(to common.Addre return _BackingEigen.Contract.SetAllowedTo(&_BackingEigen.TransactOpts, to, isAllowedTo) } +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_BackingEigen *BackingEigenTransactor) SetIsMinter(opts *bind.TransactOpts, minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _BackingEigen.contract.Transact(opts, "setIsMinter", minterAddress, newStatus) +} + +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_BackingEigen *BackingEigenSession) SetIsMinter(minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _BackingEigen.Contract.SetIsMinter(&_BackingEigen.TransactOpts, minterAddress, newStatus) +} + +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_BackingEigen *BackingEigenTransactorSession) SetIsMinter(minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _BackingEigen.Contract.SetIsMinter(&_BackingEigen.TransactOpts, minterAddress, newStatus) +} + // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) @@ -2085,6 +2179,151 @@ func (_BackingEigen *BackingEigenFilterer) ParseInitialized(log types.Log) (*Bac return event, nil } +// BackingEigenIsMinterModifiedIterator is returned from FilterIsMinterModified and is used to iterate over the raw logs and unpacked data for IsMinterModified events raised by the BackingEigen contract. +type BackingEigenIsMinterModifiedIterator struct { + Event *BackingEigenIsMinterModified // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BackingEigenIsMinterModifiedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BackingEigenIsMinterModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BackingEigenIsMinterModified) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BackingEigenIsMinterModifiedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BackingEigenIsMinterModifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BackingEigenIsMinterModified represents a IsMinterModified event raised by the BackingEigen contract. +type BackingEigenIsMinterModified struct { + MinterAddress common.Address + NewStatus bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterIsMinterModified is a free log retrieval operation binding the contract event 0x0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde. +// +// Solidity: event IsMinterModified(address indexed minterAddress, bool newStatus) +func (_BackingEigen *BackingEigenFilterer) FilterIsMinterModified(opts *bind.FilterOpts, minterAddress []common.Address) (*BackingEigenIsMinterModifiedIterator, error) { + + var minterAddressRule []interface{} + for _, minterAddressItem := range minterAddress { + minterAddressRule = append(minterAddressRule, minterAddressItem) + } + + logs, sub, err := _BackingEigen.contract.FilterLogs(opts, "IsMinterModified", minterAddressRule) + if err != nil { + return nil, err + } + return &BackingEigenIsMinterModifiedIterator{contract: _BackingEigen.contract, event: "IsMinterModified", logs: logs, sub: sub}, nil +} + +// WatchIsMinterModified is a free log subscription operation binding the contract event 0x0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde. +// +// Solidity: event IsMinterModified(address indexed minterAddress, bool newStatus) +func (_BackingEigen *BackingEigenFilterer) WatchIsMinterModified(opts *bind.WatchOpts, sink chan<- *BackingEigenIsMinterModified, minterAddress []common.Address) (event.Subscription, error) { + + var minterAddressRule []interface{} + for _, minterAddressItem := range minterAddress { + minterAddressRule = append(minterAddressRule, minterAddressItem) + } + + logs, sub, err := _BackingEigen.contract.WatchLogs(opts, "IsMinterModified", minterAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BackingEigenIsMinterModified) + if err := _BackingEigen.contract.UnpackLog(event, "IsMinterModified", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseIsMinterModified is a log parse operation binding the contract event 0x0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde. +// +// Solidity: event IsMinterModified(address indexed minterAddress, bool newStatus) +func (_BackingEigen *BackingEigenFilterer) ParseIsMinterModified(log types.Log) (*BackingEigenIsMinterModified, error) { + event := new(BackingEigenIsMinterModified) + if err := _BackingEigen.contract.UnpackLog(event, "IsMinterModified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // BackingEigenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BackingEigen contract. type BackingEigenOwnershipTransferredIterator struct { Event *BackingEigenOwnershipTransferred // Event containing the contract specifics and raw log diff --git a/pkg/bindings/BeaconChainProofs/binding.go b/pkg/bindings/BeaconChainProofs/binding.go index 2fc7439ef..f22c2d3b9 100644 --- a/pkg/bindings/BeaconChainProofs/binding.go +++ b/pkg/bindings/BeaconChainProofs/binding.go @@ -32,7 +32,7 @@ var ( // BeaconChainProofsMetaData contains all meta data concerning the BeaconChainProofs contract. var BeaconChainProofsMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c00cb22743991a146de10677177d34d77104039d759b6119b391bd5a11f1770f64736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f8282275eec0422ab4600cb15cb73d34fae57071a98ca67cac6f465ff87cbcd464736f6c634300080c0033", } // BeaconChainProofsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/BytesLib/binding.go b/pkg/bindings/BytesLib/binding.go index b54665bad..47242d49c 100644 --- a/pkg/bindings/BytesLib/binding.go +++ b/pkg/bindings/BytesLib/binding.go @@ -32,7 +32,7 @@ var ( // BytesLibMetaData contains all meta data concerning the BytesLib contract. var BytesLibMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122052491940b4b732c4bc716d1afbe1eaf5e1c77ff3a35e025bac5ca61a239df65964736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204a56f75160c91455e91c16b7b0ef4f022250cc6b7ae0f92a1224b7151d2788c164736f6c634300080c0033", } // BytesLibABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/DelegationManager/binding.go b/pkg/bindings/DelegationManager/binding.go index cf241371c..29e8c8292 100644 --- a/pkg/bindings/DelegationManager/binding.go +++ b/pkg/bindings/DelegationManager/binding.go @@ -63,7 +63,7 @@ type ISignatureUtilsSignatureWithExpiry struct { // DelegationManagerMetaData contains all meta data concerning the DelegationManager contract. var DelegationManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_slasher\",\"type\":\"address\",\"internalType\":\"contractISlasher\"},{\"name\":\"_eigenPodManager\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_STAKER_OPT_OUT_WINDOW_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_WITHDRAWAL_DELAY_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKER_DELEGATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCurrentStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_stakerNonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"middlewareTimesIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"middlewareTimesIndexes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateToBySignature\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDelegatableShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalDelay\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minWithdrawalDelayBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"_withdrawalDelayBlocks\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"queuedWithdrawalParams\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"registeringOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"newMinWithdrawalDelayBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"withdrawalDelayBlocks\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerOptOutWindowBlocks\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoots\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDetailsModified\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false}]", - Bin: "0x6101006040523480156200001257600080fd5b5060405162005c4638038062005c46833981016040819052620000359162000140565b6001600160a01b0380841660805280821660c052821660a0526200005862000065565b50504660e0525062000194565b600054610100900460ff1615620000d25760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000125576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013d57600080fd5b50565b6000806000606084860312156200015657600080fd5b8351620001638162000127565b6020850151909350620001768162000127565b6040850151909250620001898162000127565b809150509250925092565b60805160a05160c05160e051615a1d6200022960003960006126a00152600081816105b10152818161102e015281816113aa01528181611c23015281816129f901528181613eac0152614398015260006107620152600081816104f901528181610ffc0152818161137801528181611cb701528181612ac601528181612c4901528181613fd2015261443e0152615a1d6000f3fe608060405234801561001057600080fd5b50600436106103425760003560e01c8063635bbd10116101b8578063b7f06ebe11610104578063cf80873e116100a2578063f16172b01161007c578063f16172b014610908578063f2fde38b1461091b578063f698da251461092e578063fabc1cbc1461093657600080fd5b8063cf80873e146108c1578063da8be864146108e2578063eea9064b146108f557600080fd5b8063c488375a116100de578063c488375a146107de578063c5e480db146107fe578063c94b5111146108a4578063ca661c04146108b757600080fd5b8063b7f06ebe14610784578063bb45fef2146107a7578063c448feb8146107d557600080fd5b8063886f1195116101715780639104c3191161014b5780639104c3191461070f57806399be81c81461072a578063a17884841461073d578063b13442711461075d57600080fd5b8063886f1195146106cb5780638da5cb5b146106de57806390041347146106ef57600080fd5b8063635bbd101461063657806365da1264146106495780636d70f7ae14610672578063715018a614610685578063778e55f31461068d5780637f548071146106b857600080fd5b806328a573ae116102925780634665bcda11610230578063597b36da1161020a578063597b36da146105e55780635ac86ab7146105f85780635c975abb1461061b57806360d7faed1461062357600080fd5b80634665bcda146105ac5780634fc40b61146105d3578063595c6a67146105dd57600080fd5b806339b70e381161026c57806339b70e38146104f45780633cdeb5e0146105335780633e28391d14610562578063433773821461058557600080fd5b806328a573ae146104ae57806329c77d4f146104c157806333404396146104e157600080fd5b8063132d4967116102ff57806316928365116102d957806316928365146104285780631bbce0911461046157806320606b701461047457806322bf40e41461049b57600080fd5b8063132d4967146103ef578063136439dd146104025780631522bf021461041557600080fd5b80630449ca391461034757806304a4f9791461036d5780630b9f487a146103945780630dd8dd02146103a75780630f589e59146103c757806310d67a2f146103dc575b600080fd5b61035a61035536600461484e565b610949565b6040519081526020015b60405180910390f35b61035a7f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad81565b61035a6103a23660046148b4565b6109ce565b6103ba6103b536600461484e565b610a90565b604051610364919061490f565b6103da6103d53660046149ac565b610df9565b005b6103da6103ea3660046149ff565b610f3e565b6103da6103fd366004614a23565b610ff1565b6103da610410366004614a64565b6110a8565b6103da610423366004614a7d565b6111e7565b61035a6104363660046149ff565b6001600160a01b0316600090815260996020526040902060010154600160a01b900463ffffffff1690565b61035a61046f366004614a23565b6111fb565b61035a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6103da6104a9366004614ae8565b611229565b6103da6104bc366004614a23565b61136d565b61035a6104cf3660046149ff565b609b6020526000908152604090205481565b6103da6104ef366004614b8f565b61141d565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610364565b61051b6105413660046149ff565b6001600160a01b039081166000908152609960205260409020600101541690565b6105756105703660046149ff565b61155a565b6040519015158152602001610364565b61035a7f39111bc4a4d688e1f685123d7497d4615370152a8ee4a0593e647bd06ad8bb0b81565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b61035a6213c68081565b6103da61157a565b61035a6105f3366004614e8c565b611641565b610575610606366004614ec8565b606654600160ff9092169190911b9081161490565b60665461035a565b6103da610631366004614ef9565b611671565b6103da610644366004614a64565b61170c565b61051b6106573660046149ff565b609a602052600090815260409020546001600160a01b031681565b6105756106803660046149ff565b61171d565b6103da611757565b61035a61069b366004614f88565b609860209081526000928352604080842090915290825290205481565b6103da6106c6366004615069565b61176b565b60655461051b906001600160a01b031681565b6033546001600160a01b031661051b565b6107026106fd3660046150f9565b611997565b6040516103649190615183565b61051b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b6103da610738366004615196565b611a71565b61035a61074b3660046149ff565b609f6020526000908152604090205481565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b610575610792366004614a64565b609e6020526000908152604090205460ff1681565b6105756107b53660046151cb565b609c60209081526000928352604080842090915290825290205460ff1681565b61035a609d5481565b61035a6107ec3660046149ff565b60a16020526000908152604090205481565b61086e61080c3660046149ff565b6040805160608082018352600080835260208084018290529284018190526001600160a01b03948516815260998352839020835191820184528054851682526001015493841691810191909152600160a01b90920463ffffffff169082015290565b6040805182516001600160a01b039081168252602080850151909116908201529181015163ffffffff1690820152606001610364565b61035a6108b23660046151f7565b611b43565b61035a62034bc081565b6108d46108cf3660046149ff565b611bfc565b604051610364929190615278565b6103ba6108f03660046149ff565b611fb4565b6103da61090336600461529d565b612478565b6103da6109163660046152f5565b612595565b6103da6109293660046149ff565b612626565b61035a61269c565b6103da610944366004614a64565b6126da565b609d54600090815b838110156109c657600060a1600087878581811061097157610971615311565b905060200201602081019061098691906149ff565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828111156109b5578092505b506109bf8161533d565b9050610951565b509392505050565b604080517f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad6020808301919091526001600160a01b038681168385015288811660608401528716608083015260a0820185905260c08083018590528351808403909101815260e0909201909252805191012060009081610a4c61269c565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f19018152919052805160209091012098975050505050505050565b60665460609060019060029081161415610ac55760405162461bcd60e51b8152600401610abc90615358565b60405180910390fd5b6000836001600160401b03811115610adf57610adf614c31565b604051908082528060200260200182016040528015610b08578160200160208202803683370190505b50336000908152609a60205260408120549192506001600160a01b03909116905b85811015610dee57868682818110610b4357610b43615311565b9050602002810190610b55919061538f565b610b639060208101906153af565b9050878783818110610b7757610b77615311565b9050602002810190610b89919061538f565b610b9390806153af565b905014610c085760405162461bcd60e51b815260206004820152603860248201527f44656c65676174696f6e4d616e616765722e717565756557697468647261776160448201527f6c3a20696e707574206c656e677468206d69736d6174636800000000000000006064820152608401610abc565b33878783818110610c1b57610c1b615311565b9050602002810190610c2d919061538f565b610c3e9060608101906040016149ff565b6001600160a01b031614610cba5760405162461bcd60e51b815260206004820152603c60248201527f44656c65676174696f6e4d616e616765722e717565756557697468647261776160448201527f6c3a2077697468647261776572206d757374206265207374616b6572000000006064820152608401610abc565b610dbf3383898985818110610cd157610cd1615311565b9050602002810190610ce3919061538f565b610cf49060608101906040016149ff565b8a8a86818110610d0657610d06615311565b9050602002810190610d18919061538f565b610d2290806153af565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150889050818110610d6857610d68615311565b9050602002810190610d7a919061538f565b610d889060208101906153af565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061283692505050565b838281518110610dd157610dd1615311565b602090810291909101015280610de68161533d565b915050610b29565b509095945050505050565b610e023361155a565b15610e885760405162461bcd60e51b815260206004820152604a60248201527f44656c65676174696f6e4d616e616765722e726567697374657241734f70657260448201527f61746f723a2063616c6c657220697320616c7265616479206163746976656c796064820152690819195b1959d85d195960b21b608482015260a401610abc565b610e923384612df6565b604080518082019091526060815260006020820152610eb43380836000612fe9565b336001600160a01b03167f8e8485583a2310d41f7c82b9427d0bd49bad74bb9cff9d3402a29d8f9b28a0e285604051610eed91906153f8565b60405180910390a2336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908484604051610f3092919061544a565b60405180910390a250505050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190615479565b6001600160a01b0316336001600160a01b031614610fe55760405162461bcd60e51b8152600401610abc90615496565b610fee8161327f565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806110505750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b61106c5760405162461bcd60e51b8152600401610abc906154e0565b6110758361155a565b156110a3576001600160a01b038084166000908152609a6020526040902054166110a181858585613376565b505b505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156110f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611114919061553d565b6111305760405162461bcd60e51b8152600401610abc9061555a565b606654818116146111a95760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610abc565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6111ef6133f1565b6110a18484848461344b565b6001600160a01b0383166000908152609b602052604081205461122085828686611b43565b95945050505050565b600054610100900460ff16158080156112495750600054600160ff909116105b806112635750303b158015611263575060005460ff166001145b6112c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610abc565b6000805460ff1916600117905580156112e9576000805461ff0019166101001790555b6112f38888613671565b6112fb61375b565b609755611307896137f2565b61131086613844565b61131c8585858561344b565b8015611362576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113cc5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b6113e85760405162461bcd60e51b8152600401610abc906154e0565b6113f18361155a565b156110a3576001600160a01b038084166000908152609a6020526040902054166110a18185858561393e565b606654600290600490811614156114465760405162461bcd60e51b8152600401610abc90615358565b600260c95414156114995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abc565b600260c95560005b88811015611549576115398a8a838181106114be576114be615311565b90506020028101906114d091906155a2565b8989848181106114e2576114e2615311565b90506020028101906114f491906153af565b89898681811061150657611506615311565b9050602002013588888781811061151f5761151f615311565b905060200201602081019061153491906155b8565b6139b9565b6115428161533d565b90506114a1565b5050600160c9555050505050505050565b6001600160a01b039081166000908152609a602052604090205416151590565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e6919061553d565b6116025760405162461bcd60e51b8152600401610abc9061555a565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000816040516020016116549190615649565b604051602081830303815290604052805190602001209050919050565b6066546002906004908116141561169a5760405162461bcd60e51b8152600401610abc90615358565b600260c95414156116ed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abc565b600260c9556116ff86868686866139b9565b5050600160c95550505050565b6117146133f1565b610fee81613844565b60006001600160a01b0382161580159061175157506001600160a01b038083166000818152609a6020526040902054909116145b92915050565b61175f6133f1565b61176960006137f2565b565b42836020015110156117ef5760405162461bcd60e51b815260206004820152604160248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a207374616b6572207369676e6174757265206578706972656064820152601960fa1b608482015260a401610abc565b6117f88561155a565b156118815760405162461bcd60e51b815260206004820152604d60248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a207374616b657220697320616c726561647920616374697660648201526c195b1e4819195b1959d85d1959609a1b608482015260a401610abc565b61188a8461171d565b6119165760405162461bcd60e51b815260206004820152605160248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a206f70657261746f72206973206e6f7420726567697374656064820152703932b21034b71022b4b3b2b72630bcb2b960791b608482015260a401610abc565b6000609b6000876001600160a01b03166001600160a01b0316815260200190815260200160002054905060006119528783888860200151611b43565b6001600160a01b0388166000908152609b60205260409020600184019055855190915061198290889083906141a3565b61198e87878686612fe9565b50505050505050565b6060600082516001600160401b038111156119b4576119b4614c31565b6040519080825280602002602001820160405280156119dd578160200160208202803683370190505b50905060005b83518110156109c6576001600160a01b03851660009081526098602052604081208551909190869084908110611a1b57611a1b615311565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110611a5657611a56615311565b6020908102919091010152611a6a8161533d565b90506119e3565b611a7a3361171d565b611afc5760405162461bcd60e51b815260206004820152604760248201527f44656c65676174696f6e4d616e616765722e7570646174654f70657261746f7260448201527f4d657461646174615552493a2063616c6c6572206d75737420626520616e206f6064820152663832b930ba37b960c91b608482015260a401610abc565b336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908383604051611b3792919061544a565b60405180910390a25050565b604080517f39111bc4a4d688e1f685123d7497d4615370152a8ee4a0593e647bd06ad8bb0b6020808301919091526001600160a01b0387811683850152851660608301526080820186905260a08083018590528351808403909101815260c0909201909252805191012060009081611bb961269c565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f190181529190528051602090910120979650505050505050565b6040516360f4062b60e01b81526001600160a01b03828116600483015260609182916000917f0000000000000000000000000000000000000000000000000000000000000000909116906360f4062b90602401602060405180830381865afa158015611c6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c90919061565c565b6040516394f649dd60e01b81526001600160a01b03868116600483015291925060009182917f0000000000000000000000000000000000000000000000000000000000000000909116906394f649dd90602401600060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d2891908101906156d0565b9150915060008313611d3f57909590945092505050565b606080835160001415611df9576040805160018082528183019092529060208083019080368337505060408051600180825281830190925292945090506020808301908036833701905050905073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac082600081518110611db457611db4615311565b60200260200101906001600160a01b031690816001600160a01b0316815250508481600081518110611de857611de8615311565b602002602001018181525050611fa7565b8351611e0690600161578a565b6001600160401b03811115611e1d57611e1d614c31565b604051908082528060200260200182016040528015611e46578160200160208202803683370190505b50915081516001600160401b03811115611e6257611e62614c31565b604051908082528060200260200182016040528015611e8b578160200160208202803683370190505b50905060005b8451811015611f2557848181518110611eac57611eac615311565b6020026020010151838281518110611ec657611ec6615311565b60200260200101906001600160a01b031690816001600160a01b031681525050838181518110611ef857611ef8615311565b6020026020010151828281518110611f1257611f12615311565b6020908102919091010152600101611e91565b5073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac08260018451611f4a91906157a2565b81518110611f5a57611f5a615311565b60200260200101906001600160a01b031690816001600160a01b031681525050848160018451611f8a91906157a2565b81518110611f9a57611f9a615311565b6020026020010181815250505b9097909650945050505050565b60665460609060019060029081161415611fe05760405162461bcd60e51b8152600401610abc90615358565b611fe98361155a565b6120695760405162461bcd60e51b8152602060048201526044602482018190527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a207374908201527f616b6572206d7573742062652064656c65676174656420746f20756e64656c656064820152636761746560e01b608482015260a401610abc565b6120728361171d565b156120e55760405162461bcd60e51b815260206004820152603d60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a206f7060448201527f657261746f72732063616e6e6f7420626520756e64656c6567617465640000006064820152608401610abc565b6001600160a01b0383166121615760405162461bcd60e51b815260206004820152603c60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a20636160448201527f6e6e6f7420756e64656c6567617465207a65726f2061646472657373000000006064820152608401610abc565b6001600160a01b038084166000818152609a6020526040902054909116903314806121945750336001600160a01b038216145b806121bb57506001600160a01b038181166000908152609960205260409020600101541633145b61222d5760405162461bcd60e51b815260206004820152603d60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a20636160448201527f6c6c65722063616e6e6f7420756e64656c6567617465207374616b65720000006064820152608401610abc565b60008061223986611bfc565b9092509050336001600160a01b0387161461228f57826001600160a01b0316866001600160a01b03167ff0eddf07e6ea14f388b47e1e94a0f464ecbd9eed4171130e0fc0e99fb4030a8a60405160405180910390a35b826001600160a01b0316866001600160a01b03167ffee30966a256b71e14bc0ebfc94315e28ef4a97a7131a9e2b7a310a73af4467660405160405180910390a36001600160a01b0386166000908152609a6020526040902080546001600160a01b0319169055815161231157604080516000815260208101909152945061246f565b81516001600160401b0381111561232a5761232a614c31565b604051908082528060200260200182016040528015612353578160200160208202803683370190505b50945060005b825181101561246d576040805160018082528183019092526000916020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508483815181106123b9576123b9615311565b6020026020010151826000815181106123d4576123d4615311565b60200260200101906001600160a01b031690816001600160a01b03168152505083838151811061240657612406615311565b60200260200101518160008151811061242157612421615311565b60200260200101818152505061243a89878b8585612836565b88848151811061244c5761244c615311565b602002602001018181525050505080806124659061533d565b915050612359565b505b50505050919050565b6124813361155a565b156124ff5760405162461bcd60e51b815260206004820152604260248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f3a20737460448201527f616b657220697320616c7265616479206163746976656c792064656c65676174606482015261195960f21b608482015260a401610abc565b6125088361171d565b6125895760405162461bcd60e51b815260206004820152604660248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f3a206f7060448201527f657261746f72206973206e6f74207265676973746572656420696e2045696765606482015265372630bcb2b960d11b608482015260a401610abc565b6110a333848484612fe9565b61259e3361171d565b61261c5760405162461bcd60e51b815260206004820152604360248201527f44656c65676174696f6e4d616e616765722e6d6f646966794f70657261746f7260448201527f44657461696c733a2063616c6c6572206d75737420626520616e206f706572616064820152623a37b960e91b608482015260a401610abc565b610fee3382612df6565b61262e6133f1565b6001600160a01b0381166126935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abc565b610fee816137f2565b60007f00000000000000000000000000000000000000000000000000000000000000004614156126cd575060975490565b6126d561375b565b905090565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561272d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127519190615479565b6001600160a01b0316336001600160a01b0316146127815760405162461bcd60e51b8152600401610abc90615496565b6066541981196066541916146127ff5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610abc565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020016111dc565b60006001600160a01b0386166128cd5760405162461bcd60e51b815260206004820152605060248201527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448201527f6e6451756575655769746864726177616c3a207374616b65722063616e6e6f7460648201526f206265207a65726f206164647265737360801b608482015260a401610abc565b82516129575760405162461bcd60e51b815260206004820152604d60248201527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448201527f6e6451756575655769746864726177616c3a207374726174656769657320636160648201526c6e6e6f7420626520656d70747960981b608482015260a401610abc565b60005b8351811015612d04576001600160a01b038616156129b0576129b0868886848151811061298957612989615311565b60200260200101518685815181106129a3576129a3615311565b6020026020010151613376565b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06001600160a01b03168482815181106129e0576129e0615311565b60200260200101516001600160a01b03161415612aa9577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663beffbb8988858481518110612a3957612a39615311565b60200260200101516040518363ffffffff1660e01b8152600401612a729291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b158015612a8c57600080fd5b505af1158015612aa0573d6000803e3d6000fd5b50505050612cfc565b846001600160a01b0316876001600160a01b03161480612b7b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639b4da03d858381518110612b0557612b05615311565b60200260200101516040518263ffffffff1660e01b8152600401612b3891906001600160a01b0391909116815260200190565b602060405180830381865afa158015612b55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b79919061553d565b155b612c475760405162461bcd60e51b8152602060048201526084602482018190527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448301527f6e6451756575655769746864726177616c3a2077697468647261776572206d7560648301527f73742062652073616d652061646472657373206173207374616b657220696620908201527f746869726450617274795472616e7366657273466f7262696464656e2061726560a482015263081cd95d60e21b60c482015260e401610abc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638c80d4e588868481518110612c8957612c89615311565b6020026020010151868581518110612ca357612ca3615311565b60200260200101516040518463ffffffff1660e01b8152600401612cc9939291906157b9565b600060405180830381600087803b158015612ce357600080fd5b505af1158015612cf7573d6000803e3d6000fd5b505050505b60010161295a565b506001600160a01b0386166000908152609f60205260408120805491829190612d2c8361533d565b919050555060006040518060e00160405280896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b031681526020018381526020014363ffffffff1681526020018681526020018581525090506000612d9482611641565b6000818152609e602052604090819020805460ff19166001179055519091507f9009ab153e8014fbfb02f2217f5cde7aa7f9ad734ae85ca3ee3f4ca2fdd499f990612de290839085906157dd565b60405180910390a198975050505050505050565b6213c680612e0a60608301604084016157f6565b63ffffffff161115612ebf5760405162461bcd60e51b815260206004820152606c60248201527f44656c65676174696f6e4d616e616765722e5f7365744f70657261746f72446560448201527f7461696c733a207374616b65724f70744f757457696e646f77426c6f636b732060648201527f63616e6e6f74206265203e204d41585f5354414b45525f4f50545f4f55545f5760848201526b494e444f575f424c4f434b5360a01b60a482015260c401610abc565b6001600160a01b0382166000908152609960205260409081902060010154600160a01b900463ffffffff1690612efb90606084019084016157f6565b63ffffffff161015612f915760405162461bcd60e51b815260206004820152605360248201527f44656c65676174696f6e4d616e616765722e5f7365744f70657261746f72446560448201527f7461696c733a207374616b65724f70744f757457696e646f77426c6f636b732060648201527218d85b9b9bdd08189948191958dc99585cd959606a1b608482015260a401610abc565b6001600160a01b03821660009081526099602052604090208190612fb58282615833565b505060405133907ffebe5cd24b2cbc7b065b9d0fdeb904461e4afcff57dd57acda1e7832031ba7ac90611b379084906153f8565b606654600090600190811614156130125760405162461bcd60e51b8152600401610abc90615358565b6001600160a01b038085166000908152609960205260409020600101541680158015906130485750336001600160a01b03821614155b801561305d5750336001600160a01b03861614155b156131ca5742846020015110156130dc5760405162461bcd60e51b815260206004820152603760248201527f44656c65676174696f6e4d616e616765722e5f64656c65676174653a2061707060448201527f726f766572207369676e617475726520657870697265640000000000000000006064820152608401610abc565b6001600160a01b0381166000908152609c6020908152604080832086845290915290205460ff16156131765760405162461bcd60e51b815260206004820152603760248201527f44656c65676174696f6e4d616e616765722e5f64656c65676174653a2061707060448201527f726f76657253616c7420616c7265616479207370656e740000000000000000006064820152608401610abc565b6001600160a01b0381166000908152609c6020908152604080832086845282528220805460ff191660011790558501516131b79088908890859088906109ce565b90506131c8828287600001516141a3565b505b6001600160a01b038681166000818152609a602052604080822080546001600160a01b031916948a169485179055517fc3ee9f2e5fda98e8066a1f745b2df9285f416fe98cf2559cd21484b3d87433049190a360008061322988611bfc565b9150915060005b825181101561136257613277888a85848151811061325057613250615311565b602002602001015185858151811061326a5761326a615311565b602002602001015161393e565b600101613230565b6001600160a01b03811661330d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610abc565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038085166000908152609860209081526040808320938616835292905290812080548392906133ad9084906157a2565b92505081905550836001600160a01b03167f6909600037b75d7b4733aedd815442b5ec018a827751c832aaff64eba5d6d2dd848484604051610f30939291906157b9565b6033546001600160a01b031633146117695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abc565b8281146134d35760405162461bcd60e51b815260206004820152604a60248201527f44656c65676174696f6e4d616e616765722e5f7365745374726174656779576960448201527f746864726177616c44656c6179426c6f636b733a20696e707574206c656e67746064820152690d040dad2e6dac2e8c6d60b31b608482015260a401610abc565b8260005b818110156136695760008686838181106134f3576134f3615311565b905060200201602081019061350891906149ff565b6001600160a01b038116600090815260a1602052604081205491925086868581811061353657613536615311565b90506020020135905062034bc08111156135fa5760405162461bcd60e51b815260206004820152607360248201527f44656c65676174696f6e4d616e616765722e5f7365745374726174656779576960448201527f746864726177616c44656c6179426c6f636b733a205f7769746864726177616c60648201527f44656c6179426c6f636b732063616e6e6f74206265203e204d41585f5749544860848201527244524157414c5f44454c41595f424c4f434b5360681b60a482015260c401610abc565b6001600160a01b038316600081815260a160209081526040918290208490558151928352820184905281018290527f0e7efa738e8b0ce6376a0c1af471655540d2e9a81647d7b09ed823018426576d9060600160405180910390a1505050806136629061533d565b90506134d7565b505050505050565b6065546001600160a01b031615801561369257506001600160a01b03821615155b6137145760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610abc565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26137578261327f565b5050565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62034bc08111156138fd5760405162461bcd60e51b815260206004820152607160248201527f44656c65676174696f6e4d616e616765722e5f7365744d696e5769746864726160448201527f77616c44656c6179426c6f636b733a205f6d696e5769746864726177616c446560648201527f6c6179426c6f636b732063616e6e6f74206265203e204d41585f5749544844526084820152704157414c5f44454c41595f424c4f434b5360781b60a482015260c401610abc565b609d5460408051918252602082018390527fafa003cd76f87ff9d62b35beea889920f33c0c42b8d45b74954d61d50f4b6b69910160405180910390a1609d55565b6001600160a01b0380851660009081526098602090815260408083209386168352929052908120805483929061397590849061578a565b92505081905550836001600160a01b03167f1ec042c965e2edd7107b51188ee0f383e22e76179041ab3a9d18ff151405166c848484604051610f30939291906157b9565b60006139c76105f387615896565b6000818152609e602052604090205490915060ff16613a485760405162461bcd60e51b815260206004820152604360248201526000805160206159c883398151915260448201527f645769746864726177616c3a20616374696f6e206973206e6f7420696e20717560648201526265756560e81b608482015260a401610abc565b609d544390613a5d60a0890160808a016157f6565b63ffffffff16613a6d919061578a565b1115613af55760405162461bcd60e51b815260206004820152605f60248201526000805160206159c883398151915260448201527f645769746864726177616c3a206d696e5769746864726177616c44656c61794260648201527f6c6f636b7320706572696f6420686173206e6f74207965742070617373656400608482015260a401610abc565b613b0560608701604088016149ff565b6001600160a01b0316336001600160a01b031614613b925760405162461bcd60e51b815260206004820152605060248201526000805160206159c883398151915260448201527f645769746864726177616c3a206f6e6c7920776974686472617765722063616e60648201526f1031b7b6b83632ba329030b1ba34b7b760811b608482015260a401610abc565b8115613c1457613ba560a08701876153af565b85149050613c145760405162461bcd60e51b815260206004820152604260248201526000805160206159c883398151915260448201527f645769746864726177616c3a20696e707574206c656e677468206d69736d61746064820152610c6d60f31b608482015260a401610abc565b6000818152609e60205260409020805460ff191690558115613d795760005b613c4060a08801886153af565b9050811015613d73574360a16000613c5b60a08b018b6153af565b85818110613c6b57613c6b615311565b9050602002016020810190613c8091906149ff565b6001600160a01b03168152602081019190915260400160002054613caa60a08a0160808b016157f6565b63ffffffff16613cba919061578a565b1115613cd85760405162461bcd60e51b8152600401610abc906158a2565b613d6b613ce860208901896149ff565b33613cf660a08b018b6153af565b85818110613d0657613d06615311565b9050602002016020810190613d1b91906149ff565b613d2860c08c018c6153af565b86818110613d3857613d38615311565b905060200201358a8a87818110613d5157613d51615311565b9050602002016020810190613d6691906149ff565b61435d565b600101613c33565b50614168565b336000908152609a60205260408120546001600160a01b0316905b613da160a08901896153af565b9050811015614165574360a16000613dbc60a08c018c6153af565b85818110613dcc57613dcc615311565b9050602002016020810190613de191906149ff565b6001600160a01b03168152602081019190915260400160002054613e0b60a08b0160808c016157f6565b63ffffffff16613e1b919061578a565b1115613e395760405162461bcd60e51b8152600401610abc906158a2565b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0613e5b60a08a018a6153af565b83818110613e6b57613e6b615311565b9050602002016020810190613e8091906149ff565b6001600160a01b03161415613fd0576000613e9e60208a018a6149ff565b905060006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016630e81073c83613edf60c08e018e6153af565b87818110613eef57613eef615311565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015260200291909101356024830152506044016020604051808303816000875af1158015613f43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f67919061565c565b6001600160a01b038084166000908152609a6020526040902054919250168015613fc857613fc88184613f9d60a08f018f6153af565b88818110613fad57613fad615311565b9050602002016020810190613fc291906149ff565b8561393e565b50505061415d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c4623ea13389898581811061401257614012615311565b905060200201602081019061402791906149ff565b61403460a08d018d6153af565b8681811061404457614044615311565b905060200201602081019061405991906149ff565b61406660c08e018e6153af565b8781811061407657614076615311565b60405160e088901b6001600160e01b03191681526001600160a01b03968716600482015294861660248601529290941660448401526020909102013560648201526084019050600060405180830381600087803b1580156140d657600080fd5b505af11580156140ea573d6000803e3d6000fd5b505050506001600160a01b0382161561415d5761415d823361410f60a08c018c6153af565b8581811061411f5761411f615311565b905060200201602081019061413491906149ff565b61414160c08d018d6153af565b8681811061415157614151615311565b9050602002013561393e565b600101613d94565b50505b6040518181527fc97098c2f658800b4df29001527f7324bcdffcf6e8751a699ab920a1eced5b1d9060200160405180910390a1505050505050565b6001600160a01b0383163b156142bd57604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e906141e3908690869060040161592a565b602060405180830381865afa158015614200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142249190615987565b6001600160e01b031916146110a35760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610abc565b826001600160a01b03166142d1838361449d565b6001600160a01b0316146110a35760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610abc565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014156144085760405162387b1360e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063387b1300906143d1908890889087906004016157b9565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50505050614496565b60405163c608c7f360e01b81526001600160a01b03858116600483015284811660248301526044820184905282811660648301527f0000000000000000000000000000000000000000000000000000000000000000169063c608c7f390608401600060405180830381600087803b15801561448257600080fd5b505af1158015611362573d6000803e3d6000fd5b5050505050565b60008060006144ac85856144b9565b915091506109c681614529565b6000808251604114156144f05760208301516040840151606085015160001a6144e4878285856146e4565b94509450505050614522565b82516040141561451a576020830151604084015161450f8683836147d1565b935093505050614522565b506000905060025b9250929050565b600081600481111561453d5761453d6159b1565b14156145465750565b600181600481111561455a5761455a6159b1565b14156145a85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610abc565b60028160048111156145bc576145bc6159b1565b141561460a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610abc565b600381600481111561461e5761461e6159b1565b14156146775760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610abc565b600481600481111561468b5761468b6159b1565b1415610fee5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610abc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561471b57506000905060036147c8565b8460ff16601b1415801561473357508460ff16601c14155b1561474457506000905060046147c8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614798573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166147c1576000600192509250506147c8565b9150600090505b94509492505050565b6000806001600160ff1b038316816147ee60ff86901c601b61578a565b90506147fc878288856146e4565b935093505050935093915050565b60008083601f84011261481c57600080fd5b5081356001600160401b0381111561483357600080fd5b6020830191508360208260051b850101111561452257600080fd5b6000806020838503121561486157600080fd5b82356001600160401b0381111561487757600080fd5b6148838582860161480a565b90969095509350505050565b6001600160a01b0381168114610fee57600080fd5b80356148af8161488f565b919050565b600080600080600060a086880312156148cc57600080fd5b85356148d78161488f565b945060208601356148e78161488f565b935060408601356148f78161488f565b94979396509394606081013594506080013592915050565b6020808252825182820181905260009190848201906040850190845b818110156149475783518352928401929184019160010161492b565b50909695505050505050565b60006060828403121561496557600080fd5b50919050565b60008083601f84011261497d57600080fd5b5081356001600160401b0381111561499457600080fd5b60208301915083602082850101111561452257600080fd5b6000806000608084860312156149c157600080fd5b6149cb8585614953565b925060608401356001600160401b038111156149e657600080fd5b6149f28682870161496b565b9497909650939450505050565b600060208284031215614a1157600080fd5b8135614a1c8161488f565b9392505050565b600080600060608486031215614a3857600080fd5b8335614a438161488f565b92506020840135614a538161488f565b929592945050506040919091013590565b600060208284031215614a7657600080fd5b5035919050565b60008060008060408587031215614a9357600080fd5b84356001600160401b0380821115614aaa57600080fd5b614ab68883890161480a565b90965094506020870135915080821115614acf57600080fd5b50614adc8782880161480a565b95989497509550505050565b60008060008060008060008060c0898b031215614b0457600080fd5b8835614b0f8161488f565b97506020890135614b1f8161488f565b9650604089013595506060890135945060808901356001600160401b0380821115614b4957600080fd5b614b558c838d0161480a565b909650945060a08b0135915080821115614b6e57600080fd5b50614b7b8b828c0161480a565b999c989b5096995094979396929594505050565b6000806000806000806000806080898b031215614bab57600080fd5b88356001600160401b0380821115614bc257600080fd5b614bce8c838d0161480a565b909a50985060208b0135915080821115614be757600080fd5b614bf38c838d0161480a565b909850965060408b0135915080821115614c0c57600080fd5b614c188c838d0161480a565b909650945060608b0135915080821115614b6e57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715614c6957614c69614c31565b60405290565b604080519081016001600160401b0381118282101715614c6957614c69614c31565b604051601f8201601f191681016001600160401b0381118282101715614cb957614cb9614c31565b604052919050565b63ffffffff81168114610fee57600080fd5b80356148af81614cc1565b60006001600160401b03821115614cf757614cf7614c31565b5060051b60200190565b600082601f830112614d1257600080fd5b81356020614d27614d2283614cde565b614c91565b82815260059290921b84018101918181019086841115614d4657600080fd5b8286015b84811015614d6a578035614d5d8161488f565b8352918301918301614d4a565b509695505050505050565b600082601f830112614d8657600080fd5b81356020614d96614d2283614cde565b82815260059290921b84018101918181019086841115614db557600080fd5b8286015b84811015614d6a5780358352918301918301614db9565b600060e08284031215614de257600080fd5b614dea614c47565b9050614df5826148a4565b8152614e03602083016148a4565b6020820152614e14604083016148a4565b604082015260608201356060820152614e2f60808301614cd3565b608082015260a08201356001600160401b0380821115614e4e57600080fd5b614e5a85838601614d01565b60a084015260c0840135915080821115614e7357600080fd5b50614e8084828501614d75565b60c08301525092915050565b600060208284031215614e9e57600080fd5b81356001600160401b03811115614eb457600080fd5b614ec084828501614dd0565b949350505050565b600060208284031215614eda57600080fd5b813560ff81168114614a1c57600080fd5b8015158114610fee57600080fd5b600080600080600060808688031215614f1157600080fd5b85356001600160401b0380821115614f2857600080fd5b9087019060e0828a031215614f3c57600080fd5b90955060208701359080821115614f5257600080fd5b50614f5f8882890161480a565b909550935050604086013591506060860135614f7a81614eeb565b809150509295509295909350565b60008060408385031215614f9b57600080fd5b8235614fa68161488f565b91506020830135614fb68161488f565b809150509250929050565b600060408284031215614fd357600080fd5b614fdb614c6f565b905081356001600160401b0380821115614ff457600080fd5b818401915084601f83011261500857600080fd5b813560208282111561501c5761501c614c31565b61502e601f8301601f19168201614c91565b9250818352868183860101111561504457600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600080600080600060a0868803121561508157600080fd5b853561508c8161488f565b9450602086013561509c8161488f565b935060408601356001600160401b03808211156150b857600080fd5b6150c489838a01614fc1565b945060608801359150808211156150da57600080fd5b506150e788828901614fc1565b95989497509295608001359392505050565b6000806040838503121561510c57600080fd5b82356151178161488f565b915060208301356001600160401b0381111561513257600080fd5b61513e85828601614d01565b9150509250929050565b600081518084526020808501945080840160005b838110156151785781518752958201959082019060010161515c565b509495945050505050565b602081526000614a1c6020830184615148565b600080602083850312156151a957600080fd5b82356001600160401b038111156151bf57600080fd5b6148838582860161496b565b600080604083850312156151de57600080fd5b82356151e98161488f565b946020939093013593505050565b6000806000806080858703121561520d57600080fd5b84356152188161488f565b935060208501359250604085013561522f8161488f565b9396929550929360600135925050565b600081518084526020808501945080840160005b838110156151785781516001600160a01b031687529582019590820190600101615253565b60408152600061528b604083018561523f565b82810360208401526112208185615148565b6000806000606084860312156152b257600080fd5b83356152bd8161488f565b925060208401356001600160401b038111156152d857600080fd5b6152e486828701614fc1565b925050604084013590509250925092565b60006060828403121561530757600080fd5b614a1c8383614953565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561535157615351615327565b5060010190565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b60008235605e198336030181126153a557600080fd5b9190910192915050565b6000808335601e198436030181126153c657600080fd5b8301803591506001600160401b038211156153e057600080fd5b6020019150600581901b360382131561452257600080fd5b6060810182356154078161488f565b6001600160a01b0390811683526020840135906154238261488f565b166020830152604083013561543781614cc1565b63ffffffff811660408401525092915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006020828403121561548b57600080fd5b8151614a1c8161488f565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60208082526037908201527f44656c65676174696f6e4d616e616765723a206f6e6c7953747261746567794d60408201527f616e616765724f72456967656e506f644d616e61676572000000000000000000606082015260800190565b60006020828403121561554f57600080fd5b8151614a1c81614eeb565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000823560de198336030181126153a557600080fd5b6000602082840312156155ca57600080fd5b8135614a1c81614eeb565b600060018060a01b03808351168452806020840151166020850152806040840151166040850152506060820151606084015263ffffffff608083015116608084015260a082015160e060a085015261563060e085018261523f565b905060c083015184820360c08601526112208282615148565b602081526000614a1c60208301846155d5565b60006020828403121561566e57600080fd5b5051919050565b600082601f83011261568657600080fd5b81516020615696614d2283614cde565b82815260059290921b840181019181810190868411156156b557600080fd5b8286015b84811015614d6a57805183529183019183016156b9565b600080604083850312156156e357600080fd5b82516001600160401b03808211156156fa57600080fd5b818501915085601f83011261570e57600080fd5b8151602061571e614d2283614cde565b82815260059290921b8401810191818101908984111561573d57600080fd5b948201945b838610156157645785516157558161488f565b82529482019490820190615742565b9188015191965090935050508082111561577d57600080fd5b5061513e85828601615675565b6000821982111561579d5761579d615327565b500190565b6000828210156157b4576157b4615327565b500390565b6001600160a01b039384168152919092166020820152604081019190915260600190565b828152604060208201526000614ec060408301846155d5565b60006020828403121561580857600080fd5b8135614a1c81614cc1565b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561583e8161488f565b6158488183615813565b5060018101602083013561585b8161488f565b6158658183615813565b50604083013561587481614cc1565b815463ffffffff60a01b191660a09190911b63ffffffff60a01b161790555050565b60006117513683614dd0565b6020808252606e908201526000805160206159c883398151915260408201527f645769746864726177616c3a207769746864726177616c44656c6179426c6f6360608201527f6b7320706572696f6420686173206e6f74207965742070617373656420666f7260808201526d207468697320737472617465677960901b60a082015260c00190565b82815260006020604081840152835180604085015260005b8181101561595e57858101830151858201606001528201615942565b81811115615970576000606083870101525b50601f01601f191692909201606001949350505050565b60006020828403121561599957600080fd5b81516001600160e01b031981168114614a1c57600080fd5b634e487b7160e01b600052602160045260246000fdfe44656c65676174696f6e4d616e616765722e5f636f6d706c6574655175657565a264697066735822122046f59d0774fea296e76e107662bfe5a0f076e0013aabe21beb6ded4a9b0f61a864736f6c634300080c0033", + Bin: "0x6101006040523480156200001257600080fd5b5060405162005c4638038062005c46833981016040819052620000359162000140565b6001600160a01b0380841660805280821660c052821660a0526200005862000065565b50504660e0525062000194565b600054610100900460ff1615620000d25760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000125576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013d57600080fd5b50565b6000806000606084860312156200015657600080fd5b8351620001638162000127565b6020850151909350620001768162000127565b6040850151909250620001898162000127565b809150509250925092565b60805160a05160c05160e051615a1d6200022960003960006126a00152600081816105b10152818161102e015281816113aa01528181611c23015281816129f901528181613eac0152614398015260006107620152600081816104f901528181610ffc0152818161137801528181611cb701528181612ac601528181612c4901528181613fd2015261443e0152615a1d6000f3fe608060405234801561001057600080fd5b50600436106103425760003560e01c8063635bbd10116101b8578063b7f06ebe11610104578063cf80873e116100a2578063f16172b01161007c578063f16172b014610908578063f2fde38b1461091b578063f698da251461092e578063fabc1cbc1461093657600080fd5b8063cf80873e146108c1578063da8be864146108e2578063eea9064b146108f557600080fd5b8063c488375a116100de578063c488375a146107de578063c5e480db146107fe578063c94b5111146108a4578063ca661c04146108b757600080fd5b8063b7f06ebe14610784578063bb45fef2146107a7578063c448feb8146107d557600080fd5b8063886f1195116101715780639104c3191161014b5780639104c3191461070f57806399be81c81461072a578063a17884841461073d578063b13442711461075d57600080fd5b8063886f1195146106cb5780638da5cb5b146106de57806390041347146106ef57600080fd5b8063635bbd101461063657806365da1264146106495780636d70f7ae14610672578063715018a614610685578063778e55f31461068d5780637f548071146106b857600080fd5b806328a573ae116102925780634665bcda11610230578063597b36da1161020a578063597b36da146105e55780635ac86ab7146105f85780635c975abb1461061b57806360d7faed1461062357600080fd5b80634665bcda146105ac5780634fc40b61146105d3578063595c6a67146105dd57600080fd5b806339b70e381161026c57806339b70e38146104f45780633cdeb5e0146105335780633e28391d14610562578063433773821461058557600080fd5b806328a573ae146104ae57806329c77d4f146104c157806333404396146104e157600080fd5b8063132d4967116102ff57806316928365116102d957806316928365146104285780631bbce0911461046157806320606b701461047457806322bf40e41461049b57600080fd5b8063132d4967146103ef578063136439dd146104025780631522bf021461041557600080fd5b80630449ca391461034757806304a4f9791461036d5780630b9f487a146103945780630dd8dd02146103a75780630f589e59146103c757806310d67a2f146103dc575b600080fd5b61035a61035536600461484e565b610949565b6040519081526020015b60405180910390f35b61035a7f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad81565b61035a6103a23660046148b4565b6109ce565b6103ba6103b536600461484e565b610a90565b604051610364919061490f565b6103da6103d53660046149ac565b610df9565b005b6103da6103ea3660046149ff565b610f3e565b6103da6103fd366004614a23565b610ff1565b6103da610410366004614a64565b6110a8565b6103da610423366004614a7d565b6111e7565b61035a6104363660046149ff565b6001600160a01b0316600090815260996020526040902060010154600160a01b900463ffffffff1690565b61035a61046f366004614a23565b6111fb565b61035a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6103da6104a9366004614ae8565b611229565b6103da6104bc366004614a23565b61136d565b61035a6104cf3660046149ff565b609b6020526000908152604090205481565b6103da6104ef366004614b8f565b61141d565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610364565b61051b6105413660046149ff565b6001600160a01b039081166000908152609960205260409020600101541690565b6105756105703660046149ff565b61155a565b6040519015158152602001610364565b61035a7f39111bc4a4d688e1f685123d7497d4615370152a8ee4a0593e647bd06ad8bb0b81565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b61035a6213c68081565b6103da61157a565b61035a6105f3366004614e8c565b611641565b610575610606366004614ec8565b606654600160ff9092169190911b9081161490565b60665461035a565b6103da610631366004614ef9565b611671565b6103da610644366004614a64565b61170c565b61051b6106573660046149ff565b609a602052600090815260409020546001600160a01b031681565b6105756106803660046149ff565b61171d565b6103da611757565b61035a61069b366004614f88565b609860209081526000928352604080842090915290825290205481565b6103da6106c6366004615069565b61176b565b60655461051b906001600160a01b031681565b6033546001600160a01b031661051b565b6107026106fd3660046150f9565b611997565b6040516103649190615183565b61051b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b6103da610738366004615196565b611a71565b61035a61074b3660046149ff565b609f6020526000908152604090205481565b61051b7f000000000000000000000000000000000000000000000000000000000000000081565b610575610792366004614a64565b609e6020526000908152604090205460ff1681565b6105756107b53660046151cb565b609c60209081526000928352604080842090915290825290205460ff1681565b61035a609d5481565b61035a6107ec3660046149ff565b60a16020526000908152604090205481565b61086e61080c3660046149ff565b6040805160608082018352600080835260208084018290529284018190526001600160a01b03948516815260998352839020835191820184528054851682526001015493841691810191909152600160a01b90920463ffffffff169082015290565b6040805182516001600160a01b039081168252602080850151909116908201529181015163ffffffff1690820152606001610364565b61035a6108b23660046151f7565b611b43565b61035a62034bc081565b6108d46108cf3660046149ff565b611bfc565b604051610364929190615278565b6103ba6108f03660046149ff565b611fb4565b6103da61090336600461529d565b612478565b6103da6109163660046152f5565b612595565b6103da6109293660046149ff565b612626565b61035a61269c565b6103da610944366004614a64565b6126da565b609d54600090815b838110156109c657600060a1600087878581811061097157610971615311565b905060200201602081019061098691906149ff565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828111156109b5578092505b506109bf8161533d565b9050610951565b509392505050565b604080517f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad6020808301919091526001600160a01b038681168385015288811660608401528716608083015260a0820185905260c08083018590528351808403909101815260e0909201909252805191012060009081610a4c61269c565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f19018152919052805160209091012098975050505050505050565b60665460609060019060029081161415610ac55760405162461bcd60e51b8152600401610abc90615358565b60405180910390fd5b6000836001600160401b03811115610adf57610adf614c31565b604051908082528060200260200182016040528015610b08578160200160208202803683370190505b50336000908152609a60205260408120549192506001600160a01b03909116905b85811015610dee57868682818110610b4357610b43615311565b9050602002810190610b55919061538f565b610b639060208101906153af565b9050878783818110610b7757610b77615311565b9050602002810190610b89919061538f565b610b9390806153af565b905014610c085760405162461bcd60e51b815260206004820152603860248201527f44656c65676174696f6e4d616e616765722e717565756557697468647261776160448201527f6c3a20696e707574206c656e677468206d69736d6174636800000000000000006064820152608401610abc565b33878783818110610c1b57610c1b615311565b9050602002810190610c2d919061538f565b610c3e9060608101906040016149ff565b6001600160a01b031614610cba5760405162461bcd60e51b815260206004820152603c60248201527f44656c65676174696f6e4d616e616765722e717565756557697468647261776160448201527f6c3a2077697468647261776572206d757374206265207374616b6572000000006064820152608401610abc565b610dbf3383898985818110610cd157610cd1615311565b9050602002810190610ce3919061538f565b610cf49060608101906040016149ff565b8a8a86818110610d0657610d06615311565b9050602002810190610d18919061538f565b610d2290806153af565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150889050818110610d6857610d68615311565b9050602002810190610d7a919061538f565b610d889060208101906153af565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061283692505050565b838281518110610dd157610dd1615311565b602090810291909101015280610de68161533d565b915050610b29565b509095945050505050565b610e023361155a565b15610e885760405162461bcd60e51b815260206004820152604a60248201527f44656c65676174696f6e4d616e616765722e726567697374657241734f70657260448201527f61746f723a2063616c6c657220697320616c7265616479206163746976656c796064820152690819195b1959d85d195960b21b608482015260a401610abc565b610e923384612df6565b604080518082019091526060815260006020820152610eb43380836000612fe9565b336001600160a01b03167f8e8485583a2310d41f7c82b9427d0bd49bad74bb9cff9d3402a29d8f9b28a0e285604051610eed91906153f8565b60405180910390a2336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908484604051610f3092919061544a565b60405180910390a250505050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190615479565b6001600160a01b0316336001600160a01b031614610fe55760405162461bcd60e51b8152600401610abc90615496565b610fee8161327f565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806110505750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b61106c5760405162461bcd60e51b8152600401610abc906154e0565b6110758361155a565b156110a3576001600160a01b038084166000908152609a6020526040902054166110a181858585613376565b505b505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156110f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611114919061553d565b6111305760405162461bcd60e51b8152600401610abc9061555a565b606654818116146111a95760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610abc565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6111ef6133f1565b6110a18484848461344b565b6001600160a01b0383166000908152609b602052604081205461122085828686611b43565b95945050505050565b600054610100900460ff16158080156112495750600054600160ff909116105b806112635750303b158015611263575060005460ff166001145b6112c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610abc565b6000805460ff1916600117905580156112e9576000805461ff0019166101001790555b6112f38888613671565b6112fb61375b565b609755611307896137f2565b61131086613844565b61131c8585858561344b565b8015611362576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113cc5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b6113e85760405162461bcd60e51b8152600401610abc906154e0565b6113f18361155a565b156110a3576001600160a01b038084166000908152609a6020526040902054166110a18185858561393e565b606654600290600490811614156114465760405162461bcd60e51b8152600401610abc90615358565b600260c95414156114995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abc565b600260c95560005b88811015611549576115398a8a838181106114be576114be615311565b90506020028101906114d091906155a2565b8989848181106114e2576114e2615311565b90506020028101906114f491906153af565b89898681811061150657611506615311565b9050602002013588888781811061151f5761151f615311565b905060200201602081019061153491906155b8565b6139b9565b6115428161533d565b90506114a1565b5050600160c9555050505050505050565b6001600160a01b039081166000908152609a602052604090205416151590565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e6919061553d565b6116025760405162461bcd60e51b8152600401610abc9061555a565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000816040516020016116549190615649565b604051602081830303815290604052805190602001209050919050565b6066546002906004908116141561169a5760405162461bcd60e51b8152600401610abc90615358565b600260c95414156116ed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abc565b600260c9556116ff86868686866139b9565b5050600160c95550505050565b6117146133f1565b610fee81613844565b60006001600160a01b0382161580159061175157506001600160a01b038083166000818152609a6020526040902054909116145b92915050565b61175f6133f1565b61176960006137f2565b565b42836020015110156117ef5760405162461bcd60e51b815260206004820152604160248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a207374616b6572207369676e6174757265206578706972656064820152601960fa1b608482015260a401610abc565b6117f88561155a565b156118815760405162461bcd60e51b815260206004820152604d60248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a207374616b657220697320616c726561647920616374697660648201526c195b1e4819195b1959d85d1959609a1b608482015260a401610abc565b61188a8461171d565b6119165760405162461bcd60e51b815260206004820152605160248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f4279536960448201527f676e61747572653a206f70657261746f72206973206e6f7420726567697374656064820152703932b21034b71022b4b3b2b72630bcb2b960791b608482015260a401610abc565b6000609b6000876001600160a01b03166001600160a01b0316815260200190815260200160002054905060006119528783888860200151611b43565b6001600160a01b0388166000908152609b60205260409020600184019055855190915061198290889083906141a3565b61198e87878686612fe9565b50505050505050565b6060600082516001600160401b038111156119b4576119b4614c31565b6040519080825280602002602001820160405280156119dd578160200160208202803683370190505b50905060005b83518110156109c6576001600160a01b03851660009081526098602052604081208551909190869084908110611a1b57611a1b615311565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110611a5657611a56615311565b6020908102919091010152611a6a8161533d565b90506119e3565b611a7a3361171d565b611afc5760405162461bcd60e51b815260206004820152604760248201527f44656c65676174696f6e4d616e616765722e7570646174654f70657261746f7260448201527f4d657461646174615552493a2063616c6c6572206d75737420626520616e206f6064820152663832b930ba37b960c91b608482015260a401610abc565b336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908383604051611b3792919061544a565b60405180910390a25050565b604080517f39111bc4a4d688e1f685123d7497d4615370152a8ee4a0593e647bd06ad8bb0b6020808301919091526001600160a01b0387811683850152851660608301526080820186905260a08083018590528351808403909101815260c0909201909252805191012060009081611bb961269c565b60405161190160f01b602082015260228101919091526042810183905260620160408051808303601f190181529190528051602090910120979650505050505050565b6040516360f4062b60e01b81526001600160a01b03828116600483015260609182916000917f0000000000000000000000000000000000000000000000000000000000000000909116906360f4062b90602401602060405180830381865afa158015611c6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c90919061565c565b6040516394f649dd60e01b81526001600160a01b03868116600483015291925060009182917f0000000000000000000000000000000000000000000000000000000000000000909116906394f649dd90602401600060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d2891908101906156d0565b9150915060008313611d3f57909590945092505050565b606080835160001415611df9576040805160018082528183019092529060208083019080368337505060408051600180825281830190925292945090506020808301908036833701905050905073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac082600081518110611db457611db4615311565b60200260200101906001600160a01b031690816001600160a01b0316815250508481600081518110611de857611de8615311565b602002602001018181525050611fa7565b8351611e0690600161578a565b6001600160401b03811115611e1d57611e1d614c31565b604051908082528060200260200182016040528015611e46578160200160208202803683370190505b50915081516001600160401b03811115611e6257611e62614c31565b604051908082528060200260200182016040528015611e8b578160200160208202803683370190505b50905060005b8451811015611f2557848181518110611eac57611eac615311565b6020026020010151838281518110611ec657611ec6615311565b60200260200101906001600160a01b031690816001600160a01b031681525050838181518110611ef857611ef8615311565b6020026020010151828281518110611f1257611f12615311565b6020908102919091010152600101611e91565b5073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac08260018451611f4a91906157a2565b81518110611f5a57611f5a615311565b60200260200101906001600160a01b031690816001600160a01b031681525050848160018451611f8a91906157a2565b81518110611f9a57611f9a615311565b6020026020010181815250505b9097909650945050505050565b60665460609060019060029081161415611fe05760405162461bcd60e51b8152600401610abc90615358565b611fe98361155a565b6120695760405162461bcd60e51b8152602060048201526044602482018190527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a207374908201527f616b6572206d7573742062652064656c65676174656420746f20756e64656c656064820152636761746560e01b608482015260a401610abc565b6120728361171d565b156120e55760405162461bcd60e51b815260206004820152603d60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a206f7060448201527f657261746f72732063616e6e6f7420626520756e64656c6567617465640000006064820152608401610abc565b6001600160a01b0383166121615760405162461bcd60e51b815260206004820152603c60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a20636160448201527f6e6e6f7420756e64656c6567617465207a65726f2061646472657373000000006064820152608401610abc565b6001600160a01b038084166000818152609a6020526040902054909116903314806121945750336001600160a01b038216145b806121bb57506001600160a01b038181166000908152609960205260409020600101541633145b61222d5760405162461bcd60e51b815260206004820152603d60248201527f44656c65676174696f6e4d616e616765722e756e64656c65676174653a20636160448201527f6c6c65722063616e6e6f7420756e64656c6567617465207374616b65720000006064820152608401610abc565b60008061223986611bfc565b9092509050336001600160a01b0387161461228f57826001600160a01b0316866001600160a01b03167ff0eddf07e6ea14f388b47e1e94a0f464ecbd9eed4171130e0fc0e99fb4030a8a60405160405180910390a35b826001600160a01b0316866001600160a01b03167ffee30966a256b71e14bc0ebfc94315e28ef4a97a7131a9e2b7a310a73af4467660405160405180910390a36001600160a01b0386166000908152609a6020526040902080546001600160a01b0319169055815161231157604080516000815260208101909152945061246f565b81516001600160401b0381111561232a5761232a614c31565b604051908082528060200260200182016040528015612353578160200160208202803683370190505b50945060005b825181101561246d576040805160018082528183019092526000916020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508483815181106123b9576123b9615311565b6020026020010151826000815181106123d4576123d4615311565b60200260200101906001600160a01b031690816001600160a01b03168152505083838151811061240657612406615311565b60200260200101518160008151811061242157612421615311565b60200260200101818152505061243a89878b8585612836565b88848151811061244c5761244c615311565b602002602001018181525050505080806124659061533d565b915050612359565b505b50505050919050565b6124813361155a565b156124ff5760405162461bcd60e51b815260206004820152604260248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f3a20737460448201527f616b657220697320616c7265616479206163746976656c792064656c65676174606482015261195960f21b608482015260a401610abc565b6125088361171d565b6125895760405162461bcd60e51b815260206004820152604660248201527f44656c65676174696f6e4d616e616765722e64656c6567617465546f3a206f7060448201527f657261746f72206973206e6f74207265676973746572656420696e2045696765606482015265372630bcb2b960d11b608482015260a401610abc565b6110a333848484612fe9565b61259e3361171d565b61261c5760405162461bcd60e51b815260206004820152604360248201527f44656c65676174696f6e4d616e616765722e6d6f646966794f70657261746f7260448201527f44657461696c733a2063616c6c6572206d75737420626520616e206f706572616064820152623a37b960e91b608482015260a401610abc565b610fee3382612df6565b61262e6133f1565b6001600160a01b0381166126935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abc565b610fee816137f2565b60007f00000000000000000000000000000000000000000000000000000000000000004614156126cd575060975490565b6126d561375b565b905090565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561272d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127519190615479565b6001600160a01b0316336001600160a01b0316146127815760405162461bcd60e51b8152600401610abc90615496565b6066541981196066541916146127ff5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610abc565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020016111dc565b60006001600160a01b0386166128cd5760405162461bcd60e51b815260206004820152605060248201527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448201527f6e6451756575655769746864726177616c3a207374616b65722063616e6e6f7460648201526f206265207a65726f206164647265737360801b608482015260a401610abc565b82516129575760405162461bcd60e51b815260206004820152604d60248201527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448201527f6e6451756575655769746864726177616c3a207374726174656769657320636160648201526c6e6e6f7420626520656d70747960981b608482015260a401610abc565b60005b8351811015612d04576001600160a01b038616156129b0576129b0868886848151811061298957612989615311565b60200260200101518685815181106129a3576129a3615311565b6020026020010151613376565b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06001600160a01b03168482815181106129e0576129e0615311565b60200260200101516001600160a01b03161415612aa9577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663beffbb8988858481518110612a3957612a39615311565b60200260200101516040518363ffffffff1660e01b8152600401612a729291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b158015612a8c57600080fd5b505af1158015612aa0573d6000803e3d6000fd5b50505050612cfc565b846001600160a01b0316876001600160a01b03161480612b7b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639b4da03d858381518110612b0557612b05615311565b60200260200101516040518263ffffffff1660e01b8152600401612b3891906001600160a01b0391909116815260200190565b602060405180830381865afa158015612b55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b79919061553d565b155b612c475760405162461bcd60e51b8152602060048201526084602482018190527f44656c65676174696f6e4d616e616765722e5f72656d6f76655368617265734160448301527f6e6451756575655769746864726177616c3a2077697468647261776572206d7560648301527f73742062652073616d652061646472657373206173207374616b657220696620908201527f746869726450617274795472616e7366657273466f7262696464656e2061726560a482015263081cd95d60e21b60c482015260e401610abc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638c80d4e588868481518110612c8957612c89615311565b6020026020010151868581518110612ca357612ca3615311565b60200260200101516040518463ffffffff1660e01b8152600401612cc9939291906157b9565b600060405180830381600087803b158015612ce357600080fd5b505af1158015612cf7573d6000803e3d6000fd5b505050505b60010161295a565b506001600160a01b0386166000908152609f60205260408120805491829190612d2c8361533d565b919050555060006040518060e00160405280896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b031681526020018381526020014363ffffffff1681526020018681526020018581525090506000612d9482611641565b6000818152609e602052604090819020805460ff19166001179055519091507f9009ab153e8014fbfb02f2217f5cde7aa7f9ad734ae85ca3ee3f4ca2fdd499f990612de290839085906157dd565b60405180910390a198975050505050505050565b6213c680612e0a60608301604084016157f6565b63ffffffff161115612ebf5760405162461bcd60e51b815260206004820152606c60248201527f44656c65676174696f6e4d616e616765722e5f7365744f70657261746f72446560448201527f7461696c733a207374616b65724f70744f757457696e646f77426c6f636b732060648201527f63616e6e6f74206265203e204d41585f5354414b45525f4f50545f4f55545f5760848201526b494e444f575f424c4f434b5360a01b60a482015260c401610abc565b6001600160a01b0382166000908152609960205260409081902060010154600160a01b900463ffffffff1690612efb90606084019084016157f6565b63ffffffff161015612f915760405162461bcd60e51b815260206004820152605360248201527f44656c65676174696f6e4d616e616765722e5f7365744f70657261746f72446560448201527f7461696c733a207374616b65724f70744f757457696e646f77426c6f636b732060648201527218d85b9b9bdd08189948191958dc99585cd959606a1b608482015260a401610abc565b6001600160a01b03821660009081526099602052604090208190612fb58282615833565b505060405133907ffebe5cd24b2cbc7b065b9d0fdeb904461e4afcff57dd57acda1e7832031ba7ac90611b379084906153f8565b606654600090600190811614156130125760405162461bcd60e51b8152600401610abc90615358565b6001600160a01b038085166000908152609960205260409020600101541680158015906130485750336001600160a01b03821614155b801561305d5750336001600160a01b03861614155b156131ca5742846020015110156130dc5760405162461bcd60e51b815260206004820152603760248201527f44656c65676174696f6e4d616e616765722e5f64656c65676174653a2061707060448201527f726f766572207369676e617475726520657870697265640000000000000000006064820152608401610abc565b6001600160a01b0381166000908152609c6020908152604080832086845290915290205460ff16156131765760405162461bcd60e51b815260206004820152603760248201527f44656c65676174696f6e4d616e616765722e5f64656c65676174653a2061707060448201527f726f76657253616c7420616c7265616479207370656e740000000000000000006064820152608401610abc565b6001600160a01b0381166000908152609c6020908152604080832086845282528220805460ff191660011790558501516131b79088908890859088906109ce565b90506131c8828287600001516141a3565b505b6001600160a01b038681166000818152609a602052604080822080546001600160a01b031916948a169485179055517fc3ee9f2e5fda98e8066a1f745b2df9285f416fe98cf2559cd21484b3d87433049190a360008061322988611bfc565b9150915060005b825181101561136257613277888a85848151811061325057613250615311565b602002602001015185858151811061326a5761326a615311565b602002602001015161393e565b600101613230565b6001600160a01b03811661330d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610abc565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038085166000908152609860209081526040808320938616835292905290812080548392906133ad9084906157a2565b92505081905550836001600160a01b03167f6909600037b75d7b4733aedd815442b5ec018a827751c832aaff64eba5d6d2dd848484604051610f30939291906157b9565b6033546001600160a01b031633146117695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abc565b8281146134d35760405162461bcd60e51b815260206004820152604a60248201527f44656c65676174696f6e4d616e616765722e5f7365745374726174656779576960448201527f746864726177616c44656c6179426c6f636b733a20696e707574206c656e67746064820152690d040dad2e6dac2e8c6d60b31b608482015260a401610abc565b8260005b818110156136695760008686838181106134f3576134f3615311565b905060200201602081019061350891906149ff565b6001600160a01b038116600090815260a1602052604081205491925086868581811061353657613536615311565b90506020020135905062034bc08111156135fa5760405162461bcd60e51b815260206004820152607360248201527f44656c65676174696f6e4d616e616765722e5f7365745374726174656779576960448201527f746864726177616c44656c6179426c6f636b733a205f7769746864726177616c60648201527f44656c6179426c6f636b732063616e6e6f74206265203e204d41585f5749544860848201527244524157414c5f44454c41595f424c4f434b5360681b60a482015260c401610abc565b6001600160a01b038316600081815260a160209081526040918290208490558151928352820184905281018290527f0e7efa738e8b0ce6376a0c1af471655540d2e9a81647d7b09ed823018426576d9060600160405180910390a1505050806136629061533d565b90506134d7565b505050505050565b6065546001600160a01b031615801561369257506001600160a01b03821615155b6137145760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610abc565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26137578261327f565b5050565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62034bc08111156138fd5760405162461bcd60e51b815260206004820152607160248201527f44656c65676174696f6e4d616e616765722e5f7365744d696e5769746864726160448201527f77616c44656c6179426c6f636b733a205f6d696e5769746864726177616c446560648201527f6c6179426c6f636b732063616e6e6f74206265203e204d41585f5749544844526084820152704157414c5f44454c41595f424c4f434b5360781b60a482015260c401610abc565b609d5460408051918252602082018390527fafa003cd76f87ff9d62b35beea889920f33c0c42b8d45b74954d61d50f4b6b69910160405180910390a1609d55565b6001600160a01b0380851660009081526098602090815260408083209386168352929052908120805483929061397590849061578a565b92505081905550836001600160a01b03167f1ec042c965e2edd7107b51188ee0f383e22e76179041ab3a9d18ff151405166c848484604051610f30939291906157b9565b60006139c76105f387615896565b6000818152609e602052604090205490915060ff16613a485760405162461bcd60e51b815260206004820152604360248201526000805160206159c883398151915260448201527f645769746864726177616c3a20616374696f6e206973206e6f7420696e20717560648201526265756560e81b608482015260a401610abc565b609d544390613a5d60a0890160808a016157f6565b63ffffffff16613a6d919061578a565b1115613af55760405162461bcd60e51b815260206004820152605f60248201526000805160206159c883398151915260448201527f645769746864726177616c3a206d696e5769746864726177616c44656c61794260648201527f6c6f636b7320706572696f6420686173206e6f74207965742070617373656400608482015260a401610abc565b613b0560608701604088016149ff565b6001600160a01b0316336001600160a01b031614613b925760405162461bcd60e51b815260206004820152605060248201526000805160206159c883398151915260448201527f645769746864726177616c3a206f6e6c7920776974686472617765722063616e60648201526f1031b7b6b83632ba329030b1ba34b7b760811b608482015260a401610abc565b8115613c1457613ba560a08701876153af565b85149050613c145760405162461bcd60e51b815260206004820152604260248201526000805160206159c883398151915260448201527f645769746864726177616c3a20696e707574206c656e677468206d69736d61746064820152610c6d60f31b608482015260a401610abc565b6000818152609e60205260409020805460ff191690558115613d795760005b613c4060a08801886153af565b9050811015613d73574360a16000613c5b60a08b018b6153af565b85818110613c6b57613c6b615311565b9050602002016020810190613c8091906149ff565b6001600160a01b03168152602081019190915260400160002054613caa60a08a0160808b016157f6565b63ffffffff16613cba919061578a565b1115613cd85760405162461bcd60e51b8152600401610abc906158a2565b613d6b613ce860208901896149ff565b33613cf660a08b018b6153af565b85818110613d0657613d06615311565b9050602002016020810190613d1b91906149ff565b613d2860c08c018c6153af565b86818110613d3857613d38615311565b905060200201358a8a87818110613d5157613d51615311565b9050602002016020810190613d6691906149ff565b61435d565b600101613c33565b50614168565b336000908152609a60205260408120546001600160a01b0316905b613da160a08901896153af565b9050811015614165574360a16000613dbc60a08c018c6153af565b85818110613dcc57613dcc615311565b9050602002016020810190613de191906149ff565b6001600160a01b03168152602081019190915260400160002054613e0b60a08b0160808c016157f6565b63ffffffff16613e1b919061578a565b1115613e395760405162461bcd60e51b8152600401610abc906158a2565b73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0613e5b60a08a018a6153af565b83818110613e6b57613e6b615311565b9050602002016020810190613e8091906149ff565b6001600160a01b03161415613fd0576000613e9e60208a018a6149ff565b905060006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016630e81073c83613edf60c08e018e6153af565b87818110613eef57613eef615311565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015260200291909101356024830152506044016020604051808303816000875af1158015613f43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f67919061565c565b6001600160a01b038084166000908152609a6020526040902054919250168015613fc857613fc88184613f9d60a08f018f6153af565b88818110613fad57613fad615311565b9050602002016020810190613fc291906149ff565b8561393e565b50505061415d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c4623ea13389898581811061401257614012615311565b905060200201602081019061402791906149ff565b61403460a08d018d6153af565b8681811061404457614044615311565b905060200201602081019061405991906149ff565b61406660c08e018e6153af565b8781811061407657614076615311565b60405160e088901b6001600160e01b03191681526001600160a01b03968716600482015294861660248601529290941660448401526020909102013560648201526084019050600060405180830381600087803b1580156140d657600080fd5b505af11580156140ea573d6000803e3d6000fd5b505050506001600160a01b0382161561415d5761415d823361410f60a08c018c6153af565b8581811061411f5761411f615311565b905060200201602081019061413491906149ff565b61414160c08d018d6153af565b8681811061415157614151615311565b9050602002013561393e565b600101613d94565b50505b6040518181527fc97098c2f658800b4df29001527f7324bcdffcf6e8751a699ab920a1eced5b1d9060200160405180910390a1505050505050565b6001600160a01b0383163b156142bd57604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e906141e3908690869060040161592a565b602060405180830381865afa158015614200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142249190615987565b6001600160e01b031916146110a35760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610abc565b826001600160a01b03166142d1838361449d565b6001600160a01b0316146110a35760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610abc565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014156144085760405162387b1360e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063387b1300906143d1908890889087906004016157b9565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50505050614496565b60405163c608c7f360e01b81526001600160a01b03858116600483015284811660248301526044820184905282811660648301527f0000000000000000000000000000000000000000000000000000000000000000169063c608c7f390608401600060405180830381600087803b15801561448257600080fd5b505af1158015611362573d6000803e3d6000fd5b5050505050565b60008060006144ac85856144b9565b915091506109c681614529565b6000808251604114156144f05760208301516040840151606085015160001a6144e4878285856146e4565b94509450505050614522565b82516040141561451a576020830151604084015161450f8683836147d1565b935093505050614522565b506000905060025b9250929050565b600081600481111561453d5761453d6159b1565b14156145465750565b600181600481111561455a5761455a6159b1565b14156145a85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610abc565b60028160048111156145bc576145bc6159b1565b141561460a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610abc565b600381600481111561461e5761461e6159b1565b14156146775760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610abc565b600481600481111561468b5761468b6159b1565b1415610fee5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610abc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561471b57506000905060036147c8565b8460ff16601b1415801561473357508460ff16601c14155b1561474457506000905060046147c8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614798573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166147c1576000600192509250506147c8565b9150600090505b94509492505050565b6000806001600160ff1b038316816147ee60ff86901c601b61578a565b90506147fc878288856146e4565b935093505050935093915050565b60008083601f84011261481c57600080fd5b5081356001600160401b0381111561483357600080fd5b6020830191508360208260051b850101111561452257600080fd5b6000806020838503121561486157600080fd5b82356001600160401b0381111561487757600080fd5b6148838582860161480a565b90969095509350505050565b6001600160a01b0381168114610fee57600080fd5b80356148af8161488f565b919050565b600080600080600060a086880312156148cc57600080fd5b85356148d78161488f565b945060208601356148e78161488f565b935060408601356148f78161488f565b94979396509394606081013594506080013592915050565b6020808252825182820181905260009190848201906040850190845b818110156149475783518352928401929184019160010161492b565b50909695505050505050565b60006060828403121561496557600080fd5b50919050565b60008083601f84011261497d57600080fd5b5081356001600160401b0381111561499457600080fd5b60208301915083602082850101111561452257600080fd5b6000806000608084860312156149c157600080fd5b6149cb8585614953565b925060608401356001600160401b038111156149e657600080fd5b6149f28682870161496b565b9497909650939450505050565b600060208284031215614a1157600080fd5b8135614a1c8161488f565b9392505050565b600080600060608486031215614a3857600080fd5b8335614a438161488f565b92506020840135614a538161488f565b929592945050506040919091013590565b600060208284031215614a7657600080fd5b5035919050565b60008060008060408587031215614a9357600080fd5b84356001600160401b0380821115614aaa57600080fd5b614ab68883890161480a565b90965094506020870135915080821115614acf57600080fd5b50614adc8782880161480a565b95989497509550505050565b60008060008060008060008060c0898b031215614b0457600080fd5b8835614b0f8161488f565b97506020890135614b1f8161488f565b9650604089013595506060890135945060808901356001600160401b0380821115614b4957600080fd5b614b558c838d0161480a565b909650945060a08b0135915080821115614b6e57600080fd5b50614b7b8b828c0161480a565b999c989b5096995094979396929594505050565b6000806000806000806000806080898b031215614bab57600080fd5b88356001600160401b0380821115614bc257600080fd5b614bce8c838d0161480a565b909a50985060208b0135915080821115614be757600080fd5b614bf38c838d0161480a565b909850965060408b0135915080821115614c0c57600080fd5b614c188c838d0161480a565b909650945060608b0135915080821115614b6e57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715614c6957614c69614c31565b60405290565b604080519081016001600160401b0381118282101715614c6957614c69614c31565b604051601f8201601f191681016001600160401b0381118282101715614cb957614cb9614c31565b604052919050565b63ffffffff81168114610fee57600080fd5b80356148af81614cc1565b60006001600160401b03821115614cf757614cf7614c31565b5060051b60200190565b600082601f830112614d1257600080fd5b81356020614d27614d2283614cde565b614c91565b82815260059290921b84018101918181019086841115614d4657600080fd5b8286015b84811015614d6a578035614d5d8161488f565b8352918301918301614d4a565b509695505050505050565b600082601f830112614d8657600080fd5b81356020614d96614d2283614cde565b82815260059290921b84018101918181019086841115614db557600080fd5b8286015b84811015614d6a5780358352918301918301614db9565b600060e08284031215614de257600080fd5b614dea614c47565b9050614df5826148a4565b8152614e03602083016148a4565b6020820152614e14604083016148a4565b604082015260608201356060820152614e2f60808301614cd3565b608082015260a08201356001600160401b0380821115614e4e57600080fd5b614e5a85838601614d01565b60a084015260c0840135915080821115614e7357600080fd5b50614e8084828501614d75565b60c08301525092915050565b600060208284031215614e9e57600080fd5b81356001600160401b03811115614eb457600080fd5b614ec084828501614dd0565b949350505050565b600060208284031215614eda57600080fd5b813560ff81168114614a1c57600080fd5b8015158114610fee57600080fd5b600080600080600060808688031215614f1157600080fd5b85356001600160401b0380821115614f2857600080fd5b9087019060e0828a031215614f3c57600080fd5b90955060208701359080821115614f5257600080fd5b50614f5f8882890161480a565b909550935050604086013591506060860135614f7a81614eeb565b809150509295509295909350565b60008060408385031215614f9b57600080fd5b8235614fa68161488f565b91506020830135614fb68161488f565b809150509250929050565b600060408284031215614fd357600080fd5b614fdb614c6f565b905081356001600160401b0380821115614ff457600080fd5b818401915084601f83011261500857600080fd5b813560208282111561501c5761501c614c31565b61502e601f8301601f19168201614c91565b9250818352868183860101111561504457600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600080600080600060a0868803121561508157600080fd5b853561508c8161488f565b9450602086013561509c8161488f565b935060408601356001600160401b03808211156150b857600080fd5b6150c489838a01614fc1565b945060608801359150808211156150da57600080fd5b506150e788828901614fc1565b95989497509295608001359392505050565b6000806040838503121561510c57600080fd5b82356151178161488f565b915060208301356001600160401b0381111561513257600080fd5b61513e85828601614d01565b9150509250929050565b600081518084526020808501945080840160005b838110156151785781518752958201959082019060010161515c565b509495945050505050565b602081526000614a1c6020830184615148565b600080602083850312156151a957600080fd5b82356001600160401b038111156151bf57600080fd5b6148838582860161496b565b600080604083850312156151de57600080fd5b82356151e98161488f565b946020939093013593505050565b6000806000806080858703121561520d57600080fd5b84356152188161488f565b935060208501359250604085013561522f8161488f565b9396929550929360600135925050565b600081518084526020808501945080840160005b838110156151785781516001600160a01b031687529582019590820190600101615253565b60408152600061528b604083018561523f565b82810360208401526112208185615148565b6000806000606084860312156152b257600080fd5b83356152bd8161488f565b925060208401356001600160401b038111156152d857600080fd5b6152e486828701614fc1565b925050604084013590509250925092565b60006060828403121561530757600080fd5b614a1c8383614953565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561535157615351615327565b5060010190565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b60008235605e198336030181126153a557600080fd5b9190910192915050565b6000808335601e198436030181126153c657600080fd5b8301803591506001600160401b038211156153e057600080fd5b6020019150600581901b360382131561452257600080fd5b6060810182356154078161488f565b6001600160a01b0390811683526020840135906154238261488f565b166020830152604083013561543781614cc1565b63ffffffff811660408401525092915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60006020828403121561548b57600080fd5b8151614a1c8161488f565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60208082526037908201527f44656c65676174696f6e4d616e616765723a206f6e6c7953747261746567794d60408201527f616e616765724f72456967656e506f644d616e61676572000000000000000000606082015260800190565b60006020828403121561554f57600080fd5b8151614a1c81614eeb565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000823560de198336030181126153a557600080fd5b6000602082840312156155ca57600080fd5b8135614a1c81614eeb565b600060018060a01b03808351168452806020840151166020850152806040840151166040850152506060820151606084015263ffffffff608083015116608084015260a082015160e060a085015261563060e085018261523f565b905060c083015184820360c08601526112208282615148565b602081526000614a1c60208301846155d5565b60006020828403121561566e57600080fd5b5051919050565b600082601f83011261568657600080fd5b81516020615696614d2283614cde565b82815260059290921b840181019181810190868411156156b557600080fd5b8286015b84811015614d6a57805183529183019183016156b9565b600080604083850312156156e357600080fd5b82516001600160401b03808211156156fa57600080fd5b818501915085601f83011261570e57600080fd5b8151602061571e614d2283614cde565b82815260059290921b8401810191818101908984111561573d57600080fd5b948201945b838610156157645785516157558161488f565b82529482019490820190615742565b9188015191965090935050508082111561577d57600080fd5b5061513e85828601615675565b6000821982111561579d5761579d615327565b500190565b6000828210156157b4576157b4615327565b500390565b6001600160a01b039384168152919092166020820152604081019190915260600190565b828152604060208201526000614ec060408301846155d5565b60006020828403121561580857600080fd5b8135614a1c81614cc1565b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561583e8161488f565b6158488183615813565b5060018101602083013561585b8161488f565b6158658183615813565b50604083013561587481614cc1565b815463ffffffff60a01b191660a09190911b63ffffffff60a01b161790555050565b60006117513683614dd0565b6020808252606e908201526000805160206159c883398151915260408201527f645769746864726177616c3a207769746864726177616c44656c6179426c6f6360608201527f6b7320706572696f6420686173206e6f74207965742070617373656420666f7260808201526d207468697320737472617465677960901b60a082015260c00190565b82815260006020604081840152835180604085015260005b8181101561595e57858101830151858201606001528201615942565b81811115615970576000606083870101525b50601f01601f191692909201606001949350505050565b60006020828403121561599957600080fd5b81516001600160e01b031981168114614a1c57600080fd5b634e487b7160e01b600052602160045260246000fdfe44656c65676174696f6e4d616e616765722e5f636f6d706c6574655175657565a26469706673582212207c9f7d63f5abb5e51a7cd379ad9da412363d7dadad5c388cd17316ac188438b364736f6c634300080c0033", } // DelegationManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/DelegationManagerStorage/binding.go b/pkg/bindings/DelegationManagerStorage/binding.go index 3930e4310..9629208eb 100644 --- a/pkg/bindings/DelegationManagerStorage/binding.go +++ b/pkg/bindings/DelegationManagerStorage/binding.go @@ -62,7 +62,7 @@ type ISignatureUtilsSignatureWithExpiry struct { // DelegationManagerStorageMetaData contains all meta data concerning the DelegationManagerStorage contract. var DelegationManagerStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_WITHDRAWAL_DELAY_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKER_DELEGATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCurrentStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_stakerNonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"middlewareTimesIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"middlewareTimesIndexes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateToBySignature\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalDelay\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"queuedWithdrawalParams\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"registeringOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerOptOutWindowBlocks\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MinWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDetailsModified\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_WITHDRAWAL_DELAY_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKER_DELEGATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCurrentStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_stakerNonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"middlewareTimesIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"middlewareTimesIndexes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateToBySignature\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDelegatableShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalDelay\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingWithdrawals\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"queuedWithdrawalParams\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"registeringOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"newMinWithdrawalDelayBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"withdrawalDelayBlocks\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerOptOutWindowBlocks\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MinWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDetailsModified\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false}]", } // DelegationManagerStorageABI is the input ABI used to generate the binding from. @@ -676,6 +676,38 @@ func (_DelegationManagerStorage *DelegationManagerStorageCallerSession) EigenPod return _DelegationManagerStorage.Contract.EigenPodManager(&_DelegationManagerStorage.CallOpts) } +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_DelegationManagerStorage *DelegationManagerStorageCaller) GetDelegatableShares(opts *bind.CallOpts, staker common.Address) ([]common.Address, []*big.Int, error) { + var out []interface{} + err := _DelegationManagerStorage.contract.Call(opts, &out, "getDelegatableShares", staker) + + if err != nil { + return *new([]common.Address), *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return out0, out1, err + +} + +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_DelegationManagerStorage *DelegationManagerStorageSession) GetDelegatableShares(staker common.Address) ([]common.Address, []*big.Int, error) { + return _DelegationManagerStorage.Contract.GetDelegatableShares(&_DelegationManagerStorage.CallOpts, staker) +} + +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_DelegationManagerStorage *DelegationManagerStorageCallerSession) GetDelegatableShares(staker common.Address) ([]common.Address, []*big.Int, error) { + return _DelegationManagerStorage.Contract.GetDelegatableShares(&_DelegationManagerStorage.CallOpts, staker) +} + // GetOperatorShares is a free data retrieval call binding the contract method 0x90041347. // // Solidity: function getOperatorShares(address operator, address[] strategies) view returns(uint256[]) @@ -1268,6 +1300,48 @@ func (_DelegationManagerStorage *DelegationManagerStorageTransactorSession) Regi return _DelegationManagerStorage.Contract.RegisterAsOperator(&_DelegationManagerStorage.TransactOpts, registeringOperatorDetails, metadataURI) } +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageTransactor) SetMinWithdrawalDelayBlocks(opts *bind.TransactOpts, newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.contract.Transact(opts, "setMinWithdrawalDelayBlocks", newMinWithdrawalDelayBlocks) +} + +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageSession) SetMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.Contract.SetMinWithdrawalDelayBlocks(&_DelegationManagerStorage.TransactOpts, newMinWithdrawalDelayBlocks) +} + +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageTransactorSession) SetMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.Contract.SetMinWithdrawalDelayBlocks(&_DelegationManagerStorage.TransactOpts, newMinWithdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageTransactor) SetStrategyWithdrawalDelayBlocks(opts *bind.TransactOpts, strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.contract.Transact(opts, "setStrategyWithdrawalDelayBlocks", strategies, withdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageSession) SetStrategyWithdrawalDelayBlocks(strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.Contract.SetStrategyWithdrawalDelayBlocks(&_DelegationManagerStorage.TransactOpts, strategies, withdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_DelegationManagerStorage *DelegationManagerStorageTransactorSession) SetStrategyWithdrawalDelayBlocks(strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _DelegationManagerStorage.Contract.SetStrategyWithdrawalDelayBlocks(&_DelegationManagerStorage.TransactOpts, strategies, withdrawalDelayBlocks) +} + // Undelegate is a paid mutator transaction binding the contract method 0xda8be864. // // Solidity: function undelegate(address staker) returns(bytes32[] withdrawalRoot) diff --git a/pkg/bindings/EIP1271SignatureUtils/binding.go b/pkg/bindings/EIP1271SignatureUtils/binding.go index d5903bc37..abbaa9efe 100644 --- a/pkg/bindings/EIP1271SignatureUtils/binding.go +++ b/pkg/bindings/EIP1271SignatureUtils/binding.go @@ -32,7 +32,7 @@ var ( // EIP1271SignatureUtilsMetaData contains all meta data concerning the EIP1271SignatureUtils contract. var EIP1271SignatureUtilsMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209832fdd04d36d0bbe78b7b9457ca6759978d3e81a33602cb69f518c735ee384664736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220926c199693a39c05f8a5ab24a79bb7ecae2822c00923f2be9c289645d15f8c4164736f6c634300080c0033", } // EIP1271SignatureUtilsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Eigen/binding.go b/pkg/bindings/Eigen/binding.go index 419305571..4265d9cab 100644 --- a/pkg/bindings/Eigen/binding.go +++ b/pkg/bindings/Eigen/binding.go @@ -38,7 +38,7 @@ type ERC20VotesUpgradeableCheckpoint struct { // EigenMetaData contains all meta data concerning the Eigen contract. var EigenMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bEIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedFrom\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bEIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pos\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"components\":[{\"name\":\"fromBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"votes\",\"type\":\"uint224\",\"internalType\":\"uint224\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegate\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateBySig\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegates\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"inputs\":[{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"mintingAllowances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"mintAllowedAfters\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mintAllowedAfter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mintingAllowance\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"multisend\",\"inputs\":[{\"name\":\"receivers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"amounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numCheckpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unwrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateChanged\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"inputs\":[{\"name\":\"delegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"previousBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Mint\",\"inputs\":[{\"name\":\"minter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferRestrictionsDisabled\",\"inputs\":[],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200342538038062003425833981016040819052620000349162000113565b6001600160a01b0381166080526200004b62000052565b5062000145565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000111576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012657600080fd5b81516001600160a01b03811681146200013e57600080fd5b9392505050565b6080516132b66200016f6000396000818161034801528181611475015261156401526132b66000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806381b9716111610146578063a9059cbb116100c3578063dd62ed3e11610087578063dd62ed3e146105c5578063de0e9a3e146105d8578063ea598cb0146105eb578063eb415f45146105fe578063f1127ed814610606578063f2fde38b1461064357600080fd5b8063a9059cbb14610566578063aad41a4114610579578063b8c255941461058c578063c3cda5201461059f578063d505accf146105b257600080fd5b806395d89b411161010a57806395d89b411461051b5780639ab24eb0146105235780639aec4bae14610536578063a457c2d714610540578063a7d1195d1461055357600080fd5b806381b971611461049c57806384b0196e146104bd5780638da5cb5b146104d85780638e539e8c146104e957806391ddadf4146104fc57600080fd5b80633a46b1a8116101df5780635c19a95c116101a35780635c19a95c146103f95780636fcfff451461040c57806370a0823114610434578063715018a61461045d57806378aa33ba146104655780637ecebe001461048957600080fd5b80633a46b1a8146103305780633f4da4c6146103435780634bf5d7e91461038257806353957125146103ac578063587cde1e146103cd57600080fd5b80631ffacdef116102265780631ffacdef146102e057806323b872dd146102f3578063313ce567146103065780633644e51514610315578063395093511461031d57600080fd5b80630455e6941461026357806306fdde031461029c578063095ea7b3146102b15780631249c58b146102c457806318160ddd146102ce575b600080fd5b610287610271366004612b8a565b6101336020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102a4610656565b6040516102939190612bf2565b6102876102bf366004612c05565b6106e8565b6102cc610700565b005b6067545b604051908152602001610293565b6102cc6102ee366004612c3d565b61084b565b610287610301366004612c74565b6108b4565b60405160128152602001610293565b6102d26108d8565b61028761032b366004612c05565b6108e7565b6102d261033e366004612c05565b610909565b61036a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610293565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b60208201526102a4565b6102d26103ba366004612b8a565b6101306020526000908152604090205481565b61036a6103db366004612b8a565b6001600160a01b03908116600090815260fe60205260409020541690565b6102cc610407366004612b8a565b61098e565b61041f61041a366004612b8a565b61099b565b60405163ffffffff9091168152602001610293565b6102d2610442366004612b8a565b6001600160a01b031660009081526065602052604090205490565b6102cc6109c3565b610287610473366004612b8a565b6101346020526000908152604090205460ff1681565b6102d2610497366004612b8a565b6109d7565b6102d26104aa366004612b8a565b6101316020526000908152604090205481565b6104c56109f5565b6040516102939796959493929190612cb0565b6033546001600160a01b031661036a565b6102d26104f7366004612d46565b610a93565b610504610afb565b60405165ffffffffffff9091168152602001610293565b6102a4610b06565b6102d2610531366004612b8a565b610b15565b6102d26101325481565b61028761054e366004612c05565b610b97565b6102cc610561366004612e35565b610c12565b610287610574366004612c05565b61103f565b6102cc610587366004612f78565b61104d565b6102cc61059a366004612c3d565b611128565b6102cc6105ad366004612ff5565b611189565b6102cc6105c036600461304d565b6112bf565b6102d26105d33660046130b7565b611423565b6102cc6105e6366004612d46565b61144e565b6102cc6105f9366004612d46565b611542565b6102cc61163b565b6106196106143660046130ea565b611704565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610293565b6102cc610651366004612b8a565b611788565b6060606880546106659061311f565b80601f01602080910402602001604051908101604052809291908181526020018280546106919061311f565b80156106de5780601f106106b3576101008083540402835291602001916106de565b820191906000526020600020905b8154815290600101906020018083116106c157829003601f168201915b5050505050905090565b6000336106f68185856117fe565b5060019392505050565b336000908152610131602052604090205461077a5760405162461bcd60e51b815260206004820152602f60248201527f456967656e2e6d696e743a206d73672e73656e64657220686173206e6f206d6960448201526e6e74696e6720616c6c6f77616e636560881b60648201526084015b60405180910390fd5b336000908152610130602052604090205442116107f35760405162461bcd60e51b815260206004820152603160248201527f456967656e2e6d696e743a206d73672e73656e646572206973206e6f7420616c6044820152701b1bddd959081d1bc81b5a5b9d081e595d607a1b6064820152608401610771565b336000818152610131602052604081208054919055906108139082611922565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a250565b6108536119b3565b6001600160a01b03821660008181526101336020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b6000336108c2858285611a0d565b6108cd858585611a81565b506001949350505050565b60006108e2611c3d565b905090565b6000336106f68185856108fa8383611423565b610904919061316a565b6117fe565b6000610913610afb565b65ffffffffffff1682106109655760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610771565b6001600160a01b038316600090815260ff602052604090206109879083611c47565b9392505050565b6109983382611d30565b50565b6001600160a01b038116600090815260ff60205260408120546109bd90611daa565b92915050565b6109cb6119b3565b6109d56000611e13565b565b6001600160a01b038116600090815260cb60205260408120546109bd565b6000606080600080600060606097546000801b148015610a155750609854155b610a595760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610771565b610a61611e65565b610a69611e74565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610a9d610afb565b65ffffffffffff168210610aef5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610771565b6109bd61010083611c47565b60006108e242611e83565b6060606980546106659061311f565b6001600160a01b038116600090815260ff60205260408120548015610b84576001600160a01b038316600090815260ff6020526040902080546000198301908110610b6257610b62613182565b60009182526020909120015464010000000090046001600160e01b0316610b87565b60005b6001600160e01b03169392505050565b60003381610ba58286611423565b905083811015610c055760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610771565b6108cd82868684036117fe565b600054610100900460ff1615808015610c325750600054600160ff909116105b80610c4c5750303b158015610c4c575060005460ff166001145b610caf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610771565b6000805460ff191660011790558015610cd2576000805461ff0019166101001790555b610cda611eea565b610d1e6040518060400160405280600581526020016422b4b3b2b760d91b8152506040518060400160405280600581526020016422a4a3a2a760d91b815250611f19565b610d2785611e13565b610d4d6040518060400160405280600581526020016422a4a3a2a760d91b815250611f4e565b8251845114610dd45760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74696e67416c6c6f77616e636573206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610771565b8151845114610e5b5760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74416c6c6f776564416674657273206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610771565b60005b8451811015610fea57838181518110610e7957610e79613182565b60200260200101516101316000878481518110610e9857610e98613182565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550828181518110610ed657610ed6613182565b60200260200101516101306000878481518110610ef557610ef5613182565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555060016101336000878481518110610f3a57610f3a613182565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550848181518110610f8b57610f8b613182565b60200260200101516001600160a01b03167fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed28436222716001604051610fd0911515815260200190565b60405180910390a280610fe281613198565b915050610e5e565b50600019610132558015611038576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000336106f6818585611a81565b8281146110c25760405162461bcd60e51b815260206004820152603e60248201527f456967656e2e6d756c746973656e643a2072656365697665727320616e64206160448201527f6d6f756e7473206d757374206265207468652073616d65206c656e67746800006064820152608401610771565b60005b8381101561103857611116338686848181106110e3576110e3613182565b90506020020160208101906110f89190612b8a565b85858581811061110a5761110a613182565b90506020020135611a81565b8061112081613198565b9150506110c5565b6111306119b3565b6001600160a01b03821660008181526101346020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b91016108a8565b834211156111d95760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610771565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906112539061124b9060a00160405160208183030381529060405280519060200120611f98565b858585611fc5565b905061125e81611fed565b86146112ac5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610771565b6112b68188611d30565b50505050505050565b8342111561130f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610771565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861133e8c611fed565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061139982611f98565b905060006113a982878787611fc5565b9050896001600160a01b0316816001600160a01b03161461140c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610771565b6114178a8a8a6117fe565b50505050505050505050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b611459333083611a81565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156114c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ea91906131b3565b6109985760405162461bcd60e51b8152602060048201526024808201527f456967656e2e756e777261703a2062454947454e207472616e736665722066616044820152631a5b195960e21b6064820152608401610771565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156115b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d991906131b3565b6116305760405162461bcd60e51b815260206004820152602260248201527f456967656e2e777261703a2062454947454e207472616e73666572206661696c604482015261195960f21b6064820152608401610771565b610998303383611a81565b6116436119b3565b60001961013254146116d35760405162461bcd60e51b815260206004820152604d60248201527f456967656e2e64697361626c655472616e736665725265737472696374696f6e60448201527f733a207472616e73666572207265737472696374696f6e732061726520616c7260648201526c1958591e48191a5cd8589b1959609a1b608482015260a401610771565b60006101328190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff841690811061174857611748613182565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6117906119b3565b6001600160a01b0381166117f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610771565b61099881611e13565b6001600160a01b0383166118605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610771565b6001600160a01b0382166118c15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610771565b6001600160a01b0383811660008181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b61192c8282612015565b6067546001600160e01b03101561199e5760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610771565b6119ad6101006120ea836120f6565b50505050565b6033546001600160a01b031633146109d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610771565b6000611a198484611423565b905060001981146119ad5781811015611a745760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610771565b6119ad84848484036117fe565b6001600160a01b038316611ae55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610771565b6001600160a01b038216611b475760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610771565b611b5283838361226b565b6001600160a01b03831660009081526065602052604090205481811015611bca5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610771565b6001600160a01b0380851660008181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611c2a9086815260200190565b60405180910390a36119ad848484612365565b60006108e2612397565b815460009081816005811115611ca1576000611c628461240b565b611c6c90856131d0565b600088815260209020909150869082015463ffffffff161115611c9157809150611c9f565b611c9c81600161316a565b92505b505b80821015611cee576000611cb583836124f0565b600088815260209020909150869082015463ffffffff161115611cda57809150611ce8565b611ce581600161316a565b92505b50611ca1565b8015611d1a576000868152602090208101600019015464010000000090046001600160e01b0316611d1d565b60005b6001600160e01b03169695505050505050565b6001600160a01b03828116600081815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46119ad82848361250b565b600063ffffffff821115611e0f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610771565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060609980546106659061311f565b6060609a80546106659061311f565b600065ffffffffffff821115611e0f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610771565b600054610100900460ff16611f115760405162461bcd60e51b8152600401610771906131e7565b6109d5612648565b600054610100900460ff16611f405760405162461bcd60e51b8152600401610771906131e7565b611f4a8282612678565b5050565b600054610100900460ff16611f755760405162461bcd60e51b8152600401610771906131e7565b61099881604051806040016040528060018152602001603160f81b8152506126c6565b60006109bd611fa5611c3d565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611fd687878787612723565b91509150611fe3816127e7565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b6001600160a01b03821661206b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610771565b6120776000838361226b565b8060676000828254612089919061316a565b90915550506001600160a01b0382166000818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611f4a60008383612365565b6000610987828461316a565b825460009081908181156121435760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152612158565b60408051808201909152600080825260208201525b905080602001516001600160e01b0316935061217884868863ffffffff16565b92506000821180156121a2575061218d610afb565b65ffffffffffff16816000015163ffffffff16145b156121e7576121b083612935565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff909216919091179055612261565b86604051806040016040528061220b6121fe610afb565b65ffffffffffff16611daa565b63ffffffff16815260200161221f86612935565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b610132544211612360576001600160a01b038316158061229357506001600160a01b03831630145b806122a657506001600160a01b03821630145b806122ca57506001600160a01b0383166000908152610133602052604090205460ff165b806122ee57506001600160a01b0382166000908152610134602052604090205460ff165b6123605760405162461bcd60e51b815260206004820152603a60248201527f456967656e2e5f6265666f7265546f6b656e5472616e736665723a2066726f6d60448201527f206f7220746f206d7573742062652077686974656c69737465640000000000006064820152608401610771565b505050565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546123609291821691168361250b565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6123c261299e565b6123ca6129f7565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008161241a57506000919050565b6000600161242784612a28565b901c6001901b9050600181848161244057612440613232565b048201901c9050600181848161245857612458613232565b048201901c9050600181848161247057612470613232565b048201901c9050600181848161248857612488613232565b048201901c905060018184816124a0576124a0613232565b048201901c905060018184816124b8576124b8613232565b048201901c905060018184816124d0576124d0613232565b048201901c9050610987818285816124ea576124ea613232565b04612abc565b60006124ff6002848418613248565b6109879084841661316a565b816001600160a01b0316836001600160a01b03161415801561252d5750600081115b15612360576001600160a01b038316156125bb576001600160a01b038316600090815260ff60205260408120819061256890612ad2856120f6565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516125b0929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615612360576001600160a01b038216600090815260ff6020526040812081906125f1906120ea856120f6565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612639929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff1661266f5760405162461bcd60e51b8152600401610771906131e7565b6109d533611e13565b600054610100900460ff1661269f5760405162461bcd60e51b8152600401610771906131e7565b81516126b2906068906020850190612ade565b508051612360906069906020840190612ade565b600054610100900460ff166126ed5760405162461bcd60e51b8152600401610771906131e7565b8151612700906099906020850190612ade565b50805161271490609a906020840190612ade565b50506000609781905560985550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561275a57506000905060036127de565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127ae573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127d7576000600192509250506127de565b9150600090505b94509492505050565b60008160048111156127fb576127fb61326a565b14156128045750565b60018160048111156128185761281861326a565b14156128665760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610771565b600281600481111561287a5761287a61326a565b14156128c85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610771565b60038160048111156128dc576128dc61326a565b14156109985760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610771565b60006001600160e01b03821115611e0f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610771565b6000806129a9611e65565b8051909150156129c0578051602090910120919050565b60975480156129cf5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080612a02611e74565b805190915015612a19578051602090910120919050565b60985480156129cf5792915050565b600080608083901c15612a3d57608092831c92015b604083901c15612a4f57604092831c92015b602083901c15612a6157602092831c92015b601083901c15612a7357601092831c92015b600883901c15612a8557600892831c92015b600483901c15612a9757600492831c92015b600283901c15612aa957600292831c92015b600183901c156109bd5760010192915050565b6000818310612acb5781610987565b5090919050565b600061098782846131d0565b828054612aea9061311f565b90600052602060002090601f016020900481019282612b0c5760008555612b52565b82601f10612b2557805160ff1916838001178555612b52565b82800160010185558215612b52579182015b82811115612b52578251825591602001919060010190612b37565b50611e0f9291505b80821115611e0f5760008155600101612b5a565b80356001600160a01b0381168114612b8557600080fd5b919050565b600060208284031215612b9c57600080fd5b61098782612b6e565b6000815180845260005b81811015612bcb57602081850181015186830182015201612baf565b81811115612bdd576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006109876020830184612ba5565b60008060408385031215612c1857600080fd5b612c2183612b6e565b946020939093013593505050565b801515811461099857600080fd5b60008060408385031215612c5057600080fd5b612c5983612b6e565b91506020830135612c6981612c2f565b809150509250929050565b600080600060608486031215612c8957600080fd5b612c9284612b6e565b9250612ca060208501612b6e565b9150604084013590509250925092565b60ff60f81b881681526000602060e081840152612cd060e084018a612ba5565b8381036040850152612ce2818a612ba5565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612d3457835183529284019291840191600101612d18565b50909c9b505050505050505050505050565b600060208284031215612d5857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612d9e57612d9e612d5f565b604052919050565b600067ffffffffffffffff821115612dc057612dc0612d5f565b5060051b60200190565b600082601f830112612ddb57600080fd5b81356020612df0612deb83612da6565b612d75565b82815260059290921b84018101918181019086841115612e0f57600080fd5b8286015b84811015612e2a5780358352918301918301612e13565b509695505050505050565b60008060008060808587031215612e4b57600080fd5b612e5485612b6e565b935060208086013567ffffffffffffffff80821115612e7257600080fd5b818801915088601f830112612e8657600080fd5b8135612e94612deb82612da6565b81815260059190911b8301840190848101908b831115612eb357600080fd5b938501935b82851015612ed857612ec985612b6e565b82529385019390850190612eb8565b975050506040880135925080831115612ef057600080fd5b612efc89848a01612dca565b94506060880135925080831115612f1257600080fd5b5050612f2087828801612dca565b91505092959194509250565b60008083601f840112612f3e57600080fd5b50813567ffffffffffffffff811115612f5657600080fd5b6020830191508360208260051b8501011115612f7157600080fd5b9250929050565b60008060008060408587031215612f8e57600080fd5b843567ffffffffffffffff80821115612fa657600080fd5b612fb288838901612f2c565b90965094506020870135915080821115612fcb57600080fd5b50612fd887828801612f2c565b95989497509550505050565b803560ff81168114612b8557600080fd5b60008060008060008060c0878903121561300e57600080fd5b61301787612b6e565b9550602087013594506040870135935061303360608801612fe4565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561306857600080fd5b61307188612b6e565b965061307f60208901612b6e565b9550604088013594506060880135935061309b60808901612fe4565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156130ca57600080fd5b6130d383612b6e565b91506130e160208401612b6e565b90509250929050565b600080604083850312156130fd57600080fd5b61310683612b6e565b9150602083013563ffffffff81168114612c6957600080fd5b600181811c9082168061313357607f821691505b6020821081141561200f57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561317d5761317d613154565b500190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156131ac576131ac613154565b5060010190565b6000602082840312156131c557600080fd5b815161098781612c2f565b6000828210156131e2576131e2613154565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261326557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e4ee2d6f1ea92311c558c0a9f0569a6bf43ef4fd4d69cf13ea69ec8c5e2bf86a64736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b506040516200361c3803806200361c833981016040819052620000349162000113565b6001600160a01b0381166080526200004b62000052565b5062000145565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000111576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012657600080fd5b81516001600160a01b03811681146200013e57600080fd5b9392505050565b6080516134a6620001766000396000818161034c01528181610853015281816114fc01526115eb01526134a66000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806381b9716111610146578063a9059cbb116100c3578063dd62ed3e11610087578063dd62ed3e146105c9578063de0e9a3e146105dc578063ea598cb0146105ef578063eb415f4514610602578063f1127ed81461060a578063f2fde38b1461064757600080fd5b8063a9059cbb1461056a578063aad41a411461057d578063b8c2559414610590578063c3cda520146105a3578063d505accf146105b657600080fd5b806395d89b411161010a57806395d89b411461051f5780639ab24eb0146105275780639aec4bae1461053a578063a457c2d714610544578063a7d1195d1461055757600080fd5b806381b97161146104a057806384b0196e146104c15780638da5cb5b146104dc5780638e539e8c146104ed57806391ddadf41461050057600080fd5b80633a46b1a8116101df5780635c19a95c116101a35780635c19a95c146103fd5780636fcfff451461041057806370a0823114610438578063715018a61461046157806378aa33ba146104695780637ecebe001461048d57600080fd5b80633a46b1a8146103345780633f4da4c6146103475780634bf5d7e91461038657806353957125146103b0578063587cde1e146103d157600080fd5b80631ffacdef116102265780631ffacdef146102e457806323b872dd146102f7578063313ce5671461030a5780633644e51514610319578063395093511461032157600080fd5b80630455e6941461026357806306fdde031461029c578063095ea7b3146102b15780631249c58b146102c457806318160ddd146102ce575b600080fd5b610287610271366004612d61565b6101336020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102a461065a565b6040516102939190612dc9565b6102876102bf366004612ddc565b6106ec565b6102cc610704565b005b6102d661084f565b604051908152602001610293565b6102cc6102f2366004612e14565b6108d8565b610287610305366004612e4b565b610941565b60405160128152602001610293565b6102d6610965565b61028761032f366004612ddc565b61096f565b6102d6610342366004612ddc565b610991565b61036e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610293565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b60208201526102a4565b6102d66103be366004612d61565b6101306020526000908152604090205481565b61036e6103df366004612d61565b6001600160a01b03908116600090815260fe60205260409020541690565b6102cc61040b366004612d61565b610a16565b61042361041e366004612d61565b610a23565b60405163ffffffff9091168152602001610293565b6102d6610446366004612d61565b6001600160a01b031660009081526065602052604090205490565b6102cc610a4b565b610287610477366004612d61565b6101346020526000908152604090205460ff1681565b6102d661049b366004612d61565b610a5f565b6102d66104ae366004612d61565b6101316020526000908152604090205481565b6104c9610a7d565b6040516102939796959493929190612e87565b6033546001600160a01b031661036e565b6102d66104fb366004612f1d565b610b1b565b610508610b83565b60405165ffffffffffff9091168152602001610293565b6102a4610b8e565b6102d6610535366004612d61565b610b9d565b6102d66101325481565b610287610552366004612ddc565b610c1f565b6102cc61056536600461300c565b610c9a565b610287610578366004612ddc565b6110c7565b6102cc61058b36600461314f565b6110d5565b6102cc61059e366004612e14565b6111b0565b6102cc6105b13660046131cc565b611211565b6102cc6105c4366004613224565b611347565b6102d66105d736600461328e565b6114ab565b6102cc6105ea366004612f1d565b6114d6565b6102cc6105fd366004612f1d565b6115c9565b6102cc6116c1565b61061d6106183660046132c1565b61178a565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610293565b6102cc610655366004612d61565b61180e565b606060688054610669906132f6565b80601f0160208091040260200160405190810160405280929190818152602001828054610695906132f6565b80156106e25780601f106106b7576101008083540402835291602001916106e2565b820191906000526020600020905b8154815290600101906020018083116106c557829003601f168201915b5050505050905090565b6000336106fa818585611884565b5060019392505050565b336000908152610131602052604090205461077e5760405162461bcd60e51b815260206004820152602f60248201527f456967656e2e6d696e743a206d73672e73656e64657220686173206e6f206d6960448201526e6e74696e6720616c6c6f77616e636560881b60648201526084015b60405180910390fd5b336000908152610130602052604090205442116107f75760405162461bcd60e51b815260206004820152603160248201527f456967656e2e6d696e743a206d73672e73656e646572206973206e6f7420616c6044820152701b1bddd959081d1bc81b5a5b9d081e595d607a1b6064820152608401610775565b3360008181526101316020526040812080549190559061081790826119a8565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d3919061332b565b905090565b6108e0611a3e565b6001600160a01b03821660008181526101336020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b60003361094f858285611a98565b61095a858585611b0c565b506001949350505050565b60006108d3611cc8565b6000336106fa81858561098283836114ab565b61098c919061335a565b611884565b600061099b610b83565b65ffffffffffff1682106109ed5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610775565b6001600160a01b038316600090815260ff60205260409020610a0f9083611cd2565b9392505050565b610a203382611dbb565b50565b6001600160a01b038116600090815260ff6020526040812054610a4590611e35565b92915050565b610a53611a3e565b610a5d6000611e9e565b565b6001600160a01b038116600090815260cb6020526040812054610a45565b6000606080600080600060606097546000801b148015610a9d5750609854155b610ae15760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610775565b610ae9611ef0565b610af1611eff565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610b25610b83565b65ffffffffffff168210610b775760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610775565b610a4561010083611cd2565b60006108d342611f0e565b606060698054610669906132f6565b6001600160a01b038116600090815260ff60205260408120548015610c0c576001600160a01b038316600090815260ff6020526040902080546000198301908110610bea57610bea613372565b60009182526020909120015464010000000090046001600160e01b0316610c0f565b60005b6001600160e01b03169392505050565b60003381610c2d82866114ab565b905083811015610c8d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610775565b61095a8286868403611884565b600054610100900460ff1615808015610cba5750600054600160ff909116105b80610cd45750303b158015610cd4575060005460ff166001145b610d375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610775565b6000805460ff191660011790558015610d5a576000805461ff0019166101001790555b610d62611f75565b610da66040518060400160405280600581526020016422b4b3b2b760d91b8152506040518060400160405280600581526020016422a4a3a2a760d91b815250611fa4565b610daf85611e9e565b610dd56040518060400160405280600581526020016422a4a3a2a760d91b815250611fd9565b8251845114610e5c5760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74696e67416c6c6f77616e636573206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610775565b8151845114610ee35760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74416c6c6f776564416674657273206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610775565b60005b845181101561107257838181518110610f0157610f01613372565b60200260200101516101316000878481518110610f2057610f20613372565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550828181518110610f5e57610f5e613372565b60200260200101516101306000878481518110610f7d57610f7d613372565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555060016101336000878481518110610fc257610fc2613372565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555084818151811061101357611013613372565b60200260200101516001600160a01b03167fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed28436222716001604051611058911515815260200190565b60405180910390a28061106a81613388565b915050610ee6565b506000196101325580156110c0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000336106fa818585611b0c565b82811461114a5760405162461bcd60e51b815260206004820152603e60248201527f456967656e2e6d756c746973656e643a2072656365697665727320616e64206160448201527f6d6f756e7473206d757374206265207468652073616d65206c656e67746800006064820152608401610775565b60005b838110156110c05761119e3386868481811061116b5761116b613372565b90506020020160208101906111809190612d61565b85858581811061119257611192613372565b90506020020135611b0c565b806111a881613388565b91505061114d565b6111b8611a3e565b6001600160a01b03821660008181526101346020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b9101610935565b834211156112615760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610775565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906112db906112d39060a00160405160208183030381529060405280519060200120612023565b858585612050565b90506112e681612078565b86146113345760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610775565b61133e8188611dbb565b50505050505050565b834211156113975760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610775565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113c68c612078565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061142182612023565b9050600061143182878787612050565b9050896001600160a01b0316816001600160a01b0316146114945760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610775565b61149f8a8a8a611884565b50505050505050505050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b6114e033826120a0565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561154d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157191906133a3565b610a205760405162461bcd60e51b8152602060048201526024808201527f456967656e2e756e777261703a2062454947454e207472616e736665722066616044820152631a5b195960e21b6064820152608401610775565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561163c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166091906133a3565b6116b75760405162461bcd60e51b815260206004820152602260248201527f456967656e2e777261703a2062454947454e207472616e73666572206661696c604482015261195960f21b6064820152608401610775565b610a2033826119a8565b6116c9611a3e565b60001961013254146117595760405162461bcd60e51b815260206004820152604d60248201527f456967656e2e64697361626c655472616e736665725265737472696374696f6e60448201527f733a207472616e73666572207265737472696374696f6e732061726520616c7260648201526c1958591e48191a5cd8589b1959609a1b608482015260a401610775565b60006101328190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff84169081106117ce576117ce613372565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b611816611a3e565b6001600160a01b03811661187b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610775565b610a2081611e9e565b6001600160a01b0383166118e65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610775565b6001600160a01b0382166119475760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610775565b6001600160a01b0383811660008181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6119b282826120b9565b6001600160e01b036119c261084f565b1115611a295760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610775565b611a3861010061218e8361219a565b50505050565b6033546001600160a01b03163314610a5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610775565b6000611aa484846114ab565b90506000198114611a385781811015611aff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610775565b611a388484848403611884565b6001600160a01b038316611b705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610775565b6001600160a01b038216611bd25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610775565b611bdd83838361230f565b6001600160a01b03831660009081526065602052604090205481811015611c555760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610775565b6001600160a01b0380851660008181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cb59086815260200190565b60405180910390a3611a388484846123f5565b60006108d3612427565b815460009081816005811115611d2c576000611ced8461249b565b611cf790856133c0565b600088815260209020909150869082015463ffffffff161115611d1c57809150611d2a565b611d2781600161335a565b92505b505b80821015611d79576000611d408383612580565b600088815260209020909150869082015463ffffffff161115611d6557809150611d73565b611d7081600161335a565b92505b50611d2c565b8015611da5576000868152602090208101600019015464010000000090046001600160e01b0316611da8565b60005b6001600160e01b03169695505050505050565b6001600160a01b03828116600081815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611a3882848361259b565b600063ffffffff821115611e9a5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610775565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060998054610669906132f6565b6060609a8054610669906132f6565b600065ffffffffffff821115611e9a5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610775565b600054610100900460ff16611f9c5760405162461bcd60e51b8152600401610775906133d7565b610a5d6126d8565b600054610100900460ff16611fcb5760405162461bcd60e51b8152600401610775906133d7565b611fd58282612708565b5050565b600054610100900460ff166120005760405162461bcd60e51b8152600401610775906133d7565b610a2081604051806040016040528060018152602001603160f81b815250612756565b6000610a45612030611cc8565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000612061878787876127b3565b9150915061206e81612877565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b6120aa82826129c5565b611a38610100612b0c8361219a565b6001600160a01b03821661210f5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610775565b61211b6000838361230f565b806067600082825461212d919061335a565b90915550506001600160a01b0382166000818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611fd5600083836123f5565b6000610a0f828461335a565b825460009081908181156121e75760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b031660208201526121fc565b60408051808201909152600080825260208201525b905080602001516001600160e01b0316935061221c84868863ffffffff16565b92506000821180156122465750612231610b83565b65ffffffffffff16816000015163ffffffff16145b1561228b5761225483612b18565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff909216919091179055612305565b8660405180604001604052806122af6122a2610b83565b65ffffffffffff16611e35565b63ffffffff1681526020016122c386612b18565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b6101325442116123f0576001600160a01b038316158061233657506001600160a01b038216155b8061235a57506001600160a01b0383166000908152610133602052604090205460ff165b8061237e57506001600160a01b0382166000908152610134602052604090205460ff165b6123f05760405162461bcd60e51b815260206004820152603a60248201527f456967656e2e5f6265666f7265546f6b656e5472616e736665723a2066726f6d60448201527f206f7220746f206d7573742062652077686974656c69737465640000000000006064820152608401610775565b505050565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546123f09291821691168361259b565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f612452612b81565b61245a612bda565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000816124aa57506000919050565b600060016124b784612c0b565b901c6001901b905060018184816124d0576124d0613422565b048201901c905060018184816124e8576124e8613422565b048201901c9050600181848161250057612500613422565b048201901c9050600181848161251857612518613422565b048201901c9050600181848161253057612530613422565b048201901c9050600181848161254857612548613422565b048201901c9050600181848161256057612560613422565b048201901c9050610a0f8182858161257a5761257a613422565b04612c9f565b600061258f6002848418613438565b610a0f9084841661335a565b816001600160a01b0316836001600160a01b0316141580156125bd5750600081115b156123f0576001600160a01b0383161561264b576001600160a01b038316600090815260ff6020526040812081906125f890612b0c8561219a565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612640929190918252602082015260400190565b60405180910390a250505b6001600160a01b038216156123f0576001600160a01b038216600090815260ff6020526040812081906126819061218e8561219a565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516126c9929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff166126ff5760405162461bcd60e51b8152600401610775906133d7565b610a5d33611e9e565b600054610100900460ff1661272f5760405162461bcd60e51b8152600401610775906133d7565b8151612742906068906020850190612cb5565b5080516123f0906069906020840190612cb5565b600054610100900460ff1661277d5760405162461bcd60e51b8152600401610775906133d7565b8151612790906099906020850190612cb5565b5080516127a490609a906020840190612cb5565b50506000609781905560985550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156127ea575060009050600361286e565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561283e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166128675760006001925092505061286e565b9150600090505b94509492505050565b600081600481111561288b5761288b61345a565b14156128945750565b60018160048111156128a8576128a861345a565b14156128f65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610775565b600281600481111561290a5761290a61345a565b14156129585760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610775565b600381600481111561296c5761296c61345a565b1415610a205760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610775565b6001600160a01b038216612a255760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610775565b612a318260008361230f565b6001600160a01b03821660009081526065602052604090205481811015612aa55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610775565b6001600160a01b03831660008181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36123f0836000846123f5565b6000610a0f82846133c0565b60006001600160e01b03821115611e9a5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610775565b600080612b8c611ef0565b805190915015612ba3578051602090910120919050565b6097548015612bb25792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080612be5611eff565b805190915015612bfc578051602090910120919050565b6098548015612bb25792915050565b600080608083901c15612c2057608092831c92015b604083901c15612c3257604092831c92015b602083901c15612c4457602092831c92015b601083901c15612c5657601092831c92015b600883901c15612c6857600892831c92015b600483901c15612c7a57600492831c92015b600283901c15612c8c57600292831c92015b600183901c15610a455760010192915050565b6000818310612cae5781610a0f565b5090919050565b828054612cc1906132f6565b90600052602060002090601f016020900481019282612ce35760008555612d29565b82601f10612cfc57805160ff1916838001178555612d29565b82800160010185558215612d29579182015b82811115612d29578251825591602001919060010190612d0e565b50611e9a9291505b80821115611e9a5760008155600101612d31565b80356001600160a01b0381168114612d5c57600080fd5b919050565b600060208284031215612d7357600080fd5b610a0f82612d45565b6000815180845260005b81811015612da257602081850181015186830182015201612d86565b81811115612db4576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610a0f6020830184612d7c565b60008060408385031215612def57600080fd5b612df883612d45565b946020939093013593505050565b8015158114610a2057600080fd5b60008060408385031215612e2757600080fd5b612e3083612d45565b91506020830135612e4081612e06565b809150509250929050565b600080600060608486031215612e6057600080fd5b612e6984612d45565b9250612e7760208501612d45565b9150604084013590509250925092565b60ff60f81b881681526000602060e081840152612ea760e084018a612d7c565b8381036040850152612eb9818a612d7c565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612f0b57835183529284019291840191600101612eef565b50909c9b505050505050505050505050565b600060208284031215612f2f57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612f7557612f75612f36565b604052919050565b600067ffffffffffffffff821115612f9757612f97612f36565b5060051b60200190565b600082601f830112612fb257600080fd5b81356020612fc7612fc283612f7d565b612f4c565b82815260059290921b84018101918181019086841115612fe657600080fd5b8286015b848110156130015780358352918301918301612fea565b509695505050505050565b6000806000806080858703121561302257600080fd5b61302b85612d45565b935060208086013567ffffffffffffffff8082111561304957600080fd5b818801915088601f83011261305d57600080fd5b813561306b612fc282612f7d565b81815260059190911b8301840190848101908b83111561308a57600080fd5b938501935b828510156130af576130a085612d45565b8252938501939085019061308f565b9750505060408801359250808311156130c757600080fd5b6130d389848a01612fa1565b945060608801359250808311156130e957600080fd5b50506130f787828801612fa1565b91505092959194509250565b60008083601f84011261311557600080fd5b50813567ffffffffffffffff81111561312d57600080fd5b6020830191508360208260051b850101111561314857600080fd5b9250929050565b6000806000806040858703121561316557600080fd5b843567ffffffffffffffff8082111561317d57600080fd5b61318988838901613103565b909650945060208701359150808211156131a257600080fd5b506131af87828801613103565b95989497509550505050565b803560ff81168114612d5c57600080fd5b60008060008060008060c087890312156131e557600080fd5b6131ee87612d45565b9550602087013594506040870135935061320a606088016131bb565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561323f57600080fd5b61324888612d45565b965061325660208901612d45565b95506040880135945060608801359350613272608089016131bb565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156132a157600080fd5b6132aa83612d45565b91506132b860208401612d45565b90509250929050565b600080604083850312156132d457600080fd5b6132dd83612d45565b9150602083013563ffffffff81168114612e4057600080fd5b600181811c9082168061330a57607f821691505b6020821081141561209a57634e487b7160e01b600052602260045260246000fd5b60006020828403121561333d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561336d5761336d613344565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561339c5761339c613344565b5060010190565b6000602082840312156133b557600080fd5b8151610a0f81612e06565b6000828210156133d2576133d2613344565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261345557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220d1dcb7c856ff6f6de88b3cdcf035671168123867408b6d8c69768aa50b85aeae64736f6c634300080c0033", } // EigenABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenPod/binding.go b/pkg/bindings/EigenPod/binding.go index 7016ff63f..8debf93c2 100644 --- a/pkg/bindings/EigenPod/binding.go +++ b/pkg/bindings/EigenPod/binding.go @@ -73,7 +73,7 @@ type IEigenPodValidatorInfo struct { // EigenPodMetaData contains all meta data concerning the EigenPod contract. var EigenPodMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_ethPOS\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"},{\"name\":\"_eigenPodManager\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"},{\"name\":\"_GENESIS_TIME\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"GENESIS_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activeValidatorCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBalanceExitedGwei\",\"inputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentCheckpoint\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPod.Checkpoint\",\"components\":[{\"name\":\"beaconBlockRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proofsRemaining\",\"type\":\"uint24\",\"internalType\":\"uint24\"},{\"name\":\"podBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"balanceDeltasGwei\",\"type\":\"int128\",\"internalType\":\"int128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentCheckpointTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ethPOS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBlockRoot\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastCheckpointTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"podOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proofSubmitter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recoverTokens\",\"inputs\":[{\"name\":\"tokenList\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"amountsToWithdraw\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setProofSubmitter\",\"inputs\":[{\"name\":\"newProofSubmitter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"depositDataRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"startCheckpoint\",\"inputs\":[{\"name\":\"revertIfNoBalance\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validatorPubkeyHashToInfo\",\"inputs\":[{\"name\":\"validatorPubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPod.ValidatorInfo\",\"components\":[{\"name\":\"validatorIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"restakedBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastCheckpointedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPod.VALIDATOR_STATUS\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorPubkeyToInfo\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPod.ValidatorInfo\",\"components\":[{\"name\":\"validatorIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"restakedBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastCheckpointedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPod.VALIDATOR_STATUS\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorStatus\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPod.VALIDATOR_STATUS\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorStatus\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPod.VALIDATOR_STATUS\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCheckpointProofs\",\"inputs\":[{\"name\":\"balanceContainerProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.BalanceContainerProof\",\"components\":[{\"name\":\"balanceContainerRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"proofs\",\"type\":\"tuple[]\",\"internalType\":\"structBeaconChainProofs.BalanceProof[]\",\"components\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"balanceRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyStaleBalance\",\"inputs\":[{\"name\":\"beaconTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"stateRootProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.StateRootProof\",\"components\":[{\"name\":\"beaconStateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"proof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.ValidatorProof\",\"components\":[{\"name\":\"validatorFields\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyWithdrawalCredentials\",\"inputs\":[{\"name\":\"beaconTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"stateRootProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.StateRootProof\",\"components\":[{\"name\":\"beaconStateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"validatorIndices\",\"type\":\"uint40[]\",\"internalType\":\"uint40[]\"},{\"name\":\"validatorFieldsProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"validatorFields\",\"type\":\"bytes32[][]\",\"internalType\":\"bytes32[][]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawRestakedBeaconChainETH\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amountWei\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawableRestakedExecutionLayerGwei\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"CheckpointCreated\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"beaconBlockRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validatorCount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CheckpointFinalized\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"totalShareDeltaWei\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EigenPodStaked\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NonBeaconChainETHReceived\",\"inputs\":[{\"name\":\"amountReceived\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProofSubmitterUpdated\",\"inputs\":[{\"name\":\"prevProofSubmitter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newProofSubmitter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RestakedBeaconChainETHWithdrawn\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorBalanceUpdated\",\"inputs\":[{\"name\":\"validatorIndex\",\"type\":\"uint40\",\"indexed\":false,\"internalType\":\"uint40\"},{\"name\":\"balanceTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"newValidatorBalanceGwei\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorCheckpointed\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"validatorIndex\",\"type\":\"uint40\",\"indexed\":true,\"internalType\":\"uint40\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorRestaked\",\"inputs\":[{\"name\":\"validatorIndex\",\"type\":\"uint40\",\"indexed\":false,\"internalType\":\"uint40\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorWithdrawn\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"validatorIndex\",\"type\":\"uint40\",\"indexed\":true,\"internalType\":\"uint40\"}],\"anonymous\":false}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162004ad038038062004ad0833981016040819052620000349162000142565b6001600160a01b03808416608052821660a0526001600160401b03811660c0526200005e62000067565b505050620001a1565b600054610100900460ff1615620000d45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000127576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013f57600080fd5b50565b6000806000606084860312156200015857600080fd5b8351620001658162000129565b6020850151909350620001788162000129565b60408501519092506001600160401b03811681146200019657600080fd5b809150509250925092565b60805160a05160c0516148b26200021e60003960006105ff0152600081816102bd0152818161063a015281816106ec01528181610abf01528181610d6c015281816110f40152818161119c0152818161143c015281816118db01528181611a8401526131250152600081816104b8015261126701526148b26000f3fe60806040526004361061016a5760003560e01c80636fcd0e53116100d1578063c49074421161008a578063dda3346c11610064578063dda3346c1461058d578063ee94d67c146105ad578063f074ba62146105cd578063f2882461146105ed57600080fd5b8063c49074421461052d578063c4d66de81461054d578063d06d55871461056d57600080fd5b80636fcd0e53146104425780637439841f1461046f57806374cdd798146104a657806388676cad146104da5780639b4e4634146104fa578063b522538a1461050d57600080fd5b80634665bcda116101235780634665bcda146102ab57806347d28372146102df57806352396a591461039f57806358753357146103d557806358eaee79146103f55780636c0d2d5a1461042257600080fd5b8063039157d2146101a95780630b18ff66146101cb5780632340e8d3146102085780633474aa161461022c5780633f65cf191461026457806342ecff2a1461028457600080fd5b366101a4576040513481527f6fdd3dbdb173299608c0aa9f368735857c8842b581f8389238bf05bd04b3bf499060200160405180910390a1005b600080fd5b3480156101b557600080fd5b506101c96101c4366004613b66565b610621565b005b3480156101d757600080fd5b506033546101eb906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561021457600080fd5b5061021e60395481565b6040519081526020016101ff565b34801561023857600080fd5b5060345461024c906001600160401b031681565b6040516001600160401b0390911681526020016101ff565b34801561027057600080fd5b506101c961027f366004613c24565b610a67565b34801561029057600080fd5b50603a5461024c90600160401b90046001600160401b031681565b3480156102b757600080fd5b506101eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102eb57600080fd5b5061035b6040805160808101825260008082526020820181905291810182905260608101919091525060408051608081018252603c548152603d5462ffffff811660208301526001600160401b03630100000082041692820192909252600160581b909104600f0b606082015290565b6040516101ff91908151815260208083015162ffffff16908201526040808301516001600160401b031690820152606091820151600f0b9181019190915260800190565b3480156103ab57600080fd5b5061024c6103ba366004613cf2565b603b602052600090815260409020546001600160401b031681565b3480156103e157600080fd5b50603e546101eb906001600160a01b031681565b34801561040157600080fd5b50610415610410366004613d4e565b610dd6565b6040516101ff9190613dc7565b34801561042e57600080fd5b5061021e61043d366004613cf2565b610e3b565b34801561044e57600080fd5b5061046261045d366004613dd5565b610fef565b6040516101ff9190613dee565b34801561047b57600080fd5b5061041561048a366004613dd5565b600090815260366020526040902054600160c01b900460ff1690565b3480156104b257600080fd5b506101eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e657600080fd5b506101c96104f5366004613e44565b61109c565b6101c9610508366004613e61565b611191565b34801561051957600080fd5b50610462610528366004613d4e565b61133e565b34801561053957600080fd5b506101c9610548366004613ef4565b611431565b34801561055957600080fd5b506101c9610568366004613f20565b61166e565b34801561057957600080fd5b506101c9610588366004613f20565b611805565b34801561059957600080fd5b506101c96105a8366004614011565b611898565b3480156105b957600080fd5b50603a5461024c906001600160401b031681565b3480156105d957600080fd5b506101c96105e83660046140e2565b611a6b565b3480156105f957600080fd5b5061024c7f000000000000000000000000000000000000000000000000000000000000000081565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ad919061414a565b156106d35760405162461bcd60e51b81526004016106ca90614167565b60405180910390fd5b604051635ac86ab760e01b8152600860048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f919061414a565b1561077c5760405162461bcd60e51b81526004016106ca90614167565b60006107c261078b85806141c4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ebe92505050565b6000818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561083157610831613d8f565b600281111561084257610842613d8f565b81525050905080604001516001600160401b0316876001600160401b0316116108d5576040805162461bcd60e51b81526020600482015260248101919091527f456967656e506f642e7665726966795374616c6542616c616e63653a2070726f60448201527f6f66206973206f6c646572207468616e206c61737420636865636b706f696e7460648201526084016106ca565b6001816060015160028111156108ed576108ed613d8f565b146109575760405162461bcd60e51b815260206004820152603460248201527f456967656e506f642e7665726966795374616c6542616c616e63653a2076616c604482015273696461746f72206973206e6f742061637469766560601b60648201526084016106ca565b61099b61096486806141c4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ee292505050565b610a1f5760405162461bcd60e51b815260206004820152604960248201527f456967656e506f642e7665726966795374616c6542616c616e63653a2076616c60448201527f696461746f72206d75737420626520736c617368656420746f206265206d61726064820152686b6564207374616c6560b81b608482015260a4016106ca565b610a31610a2b88610e3b565b87611f0c565b610a548635610a4087806141c4565b610a4d60208a018a61420d565b8651612067565b610a5e600061227e565b50505050505050565b6033546001600160a01b0316331480610a8a5750603e546001600160a01b031633145b610aa65760405162461bcd60e51b81526004016106ca90614253565b604051635ac86ab760e01b8152600260048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b32919061414a565b15610b4f5760405162461bcd60e51b81526004016106ca90614167565b8584148015610b5d57508382145b610bed5760405162461bcd60e51b815260206004820152605560248201527f456967656e506f642e7665726966795769746864726177616c43726564656e7460448201527f69616c733a2076616c696461746f72496e646963657320616e642070726f6f666064820152740e640daeae6e840c4ca40e6c2daca40d8cadccee8d605b1b608482015260a4016106ca565b603a546001600160401b03600160401b9091048116908a1611610c8d5760405162461bcd60e51b815260206004820152604c60248201527f456967656e506f642e7665726966795769746864726177616c43726564656e7460448201527f69616c733a207370656369666965642074696d657374616d7020697320746f6f60648201526b0819985c881a5b881c185cdd60a21b608482015260a4016106ca565b610c9f610c998a610e3b565b89611f0c565b6000805b87811015610d4257610d248a358a8a84818110610cc257610cc26142c7565b9050602002016020810190610cd791906142dd565b898985818110610ce957610ce96142c7565b9050602002810190610cfb919061420d565b898987818110610d0d57610d0d6142c7565b9050602002810190610d1f91906141c4565b612514565b610d2e908361431a565b915080610d3a81614332565b915050610ca3565b5060335460405163030b147160e61b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063c2c51c4090604401600060405180830381600087803b158015610db257600080fd5b505af1158015610dc6573d6000803e3d6000fd5b5050505050505050505050505050565b600080610e1884848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612afa92505050565b600090815260366020526040902054600160c01b900460ff169150505b92915050565b6000610e4a611fff600c61434d565b610e5d6001600160401b0384164261436c565b10610ec65760405162461bcd60e51b815260206004820152603360248201527f456967656e506f642e676574506172656e74426c6f636b526f6f743a2074696d604482015272657374616d70206f7574206f662072616e676560681b60648201526084016106ca565b604080516001600160401b03841660208201526000918291720f3df6d732807ef1319fb7b8bb8522d0beac02910160408051601f1981840301815290829052610f0e916143b3565b600060405180830381855afa9150503d8060008114610f49576040519150601f19603f3d011682016040523d82523d6000602084013e610f4e565b606091505b5091509150818015610f61575060008151115b610fd35760405162461bcd60e51b815260206004820152603860248201527f456967656e506f642e676574506172656e74426c6f636b526f6f743a20696e7660448201527f616c696420626c6f636b20726f6f742072657475726e6564000000000000000060648201526084016106ca565b80806020019051810190610fe791906143cf565b949350505050565b6110176040805160808101825260008082526020820181905291810182905290606082015290565b600082815260366020908152604091829020825160808101845281546001600160401b038082168352600160401b8204811694830194909452600160801b810490931693810193909352906060830190600160c01b900460ff16600281111561108257611082613d8f565b600281111561109357611093613d8f565b90525092915050565b6033546001600160a01b03163314806110bf5750603e546001600160a01b031633145b6110db5760405162461bcd60e51b81526004016106ca90614253565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611167919061414a565b156111845760405162461bcd60e51b81526004016106ca90614167565b61118d8261227e565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111d95760405162461bcd60e51b81526004016106ca906143e8565b346801bc16d674ec800000146112655760405162461bcd60e51b8152602060048201526044602482018190527f456967656e506f642e7374616b653a206d75737420696e697469616c6c792073908201527f74616b6520666f7220616e792076616c696461746f72207769746820333220656064820152633a3432b960e11b608482015260a4016106ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663228951186801bc16d674ec80000087876112a8612bf4565b8888886040518863ffffffff1660e01b81526004016112cc9695949392919061448e565b6000604051808303818588803b1580156112e557600080fd5b505af11580156112f9573d6000803e3d6000fd5b50505050507f606865b7934a25d4aed43f6cdb426403353fa4b3009c4d228407474581b01e23858560405161132f9291906144dd565b60405180910390a15050505050565b6113666040805160808101825260008082526020820181905291810182905290606082015290565b603660006113a985858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612afa92505050565b81526020808201929092526040908101600020815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b81049094169281019290925290916060830190600160c01b900460ff16600281111561141657611416613d8f565b600281111561142757611427613d8f565b9052509392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114795760405162461bcd60e51b81526004016106ca906143e8565b611487633b9aca0082614507565b156115115760405162461bcd60e51b815260206004820152604e60248201527f456967656e506f642e776974686472617752657374616b6564426561636f6e4360448201527f6861696e4554483a20616d6f756e74576569206d75737420626520612077686f60648201526d1b194811ddd95a48185b5bdd5b9d60921b608482015260a4016106ca565b6000611521633b9aca008361451b565b6034549091506001600160401b0390811690821611156115da5760405162461bcd60e51b815260206004820152606260248201527f456967656e506f642e776974686472617752657374616b6564426561636f6e4360448201527f6861696e4554483a20616d6f756e74477765692065786365656473207769746860648201527f6472617761626c6552657374616b6564457865637574696f6e4c617965724777608482015261656960f01b60a482015260c4016106ca565b603480548291906000906115f89084906001600160401b031661452f565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550826001600160a01b03167f8947fd2ce07ef9cc302c4e8f0461015615d91ce851564839e91cc804c2f49d8e8360405161165791815260200190565b60405180910390a26116698383612c39565b505050565b600054610100900460ff161580801561168e5750600054600160ff909116105b806116a85750303b1580156116a8575060005460ff166001145b61170b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ca565b6000805460ff19166001179055801561172e576000805461ff0019166101001790555b6001600160a01b0382166117a15760405162461bcd60e51b815260206004820152603460248201527f456967656e506f642e696e697469616c697a653a20706f644f776e65722063616044820152736e6e6f74206265207a65726f206164647265737360601b60648201526084016106ca565b603380546001600160a01b0319166001600160a01b038416179055801561118d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6033546001600160a01b0316331461182f5760405162461bcd60e51b81526004016106ca90614557565b603e54604080516001600160a01b03928316815291831660208301527ffb8129080a19d34dceac04ba253fc50304dc86c729bd63cdca4a969ad19a5eac910160405180910390a1603e80546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146118c25760405162461bcd60e51b81526004016106ca90614557565b604051635ac86ab760e01b8152600560048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561192a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194e919061414a565b1561196b5760405162461bcd60e51b81526004016106ca90614167565b82518451146119f65760405162461bcd60e51b815260206004820152604b60248201527f456967656e506f642e7265636f766572546f6b656e733a20746f6b656e4c697360448201527f7420616e6420616d6f756e7473546f5769746864726177206d7573742062652060648201526a0e6c2daca40d8cadccee8d60ab1b608482015260a4016106ca565b60005b8451811015611a6457611a5283858381518110611a1857611a186142c7565b6020026020010151878481518110611a3257611a326142c7565b60200260200101516001600160a01b0316612d529092919063ffffffff16565b80611a5c81614332565b9150506119f9565b5050505050565b604051635ac86ab760e01b8152600760048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af7919061414a565b15611b145760405162461bcd60e51b81526004016106ca90614167565b603a54600160401b90046001600160401b031680611bc05760405162461bcd60e51b815260206004820152605860248201527f456967656e506f642e766572696679436865636b706f696e7450726f6f66733a60448201527f206d75737420686176652061637469766520636865636b706f696e7420746f2060648201527f706572666f726d20636865636b706f696e742070726f6f660000000000000000608482015260a4016106ca565b60408051608081018252603c54808252603d5462ffffff811660208401526001600160401b03630100000082041693830193909352600160581b909204600f0b606082015290611c109087612da4565b6000805b85811015611e645736878783818110611c2f57611c2f6142c7565b9050602002810190611c41919061459f565b80356000908152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff166002811115611cb257611cb2613d8f565b6002811115611cc357611cc3613d8f565b9052509050600181606001516002811115611ce057611ce0613d8f565b14611cec575050611e52565b856001600160401b031681604001516001600160401b031610611d10575050611e52565b600080611d2083898e3587612f20565b602089018051929450909250611d35826145b5565b62ffffff16905250606087018051839190611d519083906145d4565b600f0b905250611d618187614623565b84356000908152603660209081526040918290208651815492880151938801516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b0319909516919092161792909217928316821781556060870151939950869390929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115611e0657611e06613d8f565b021790555050835160405164ffffffffff90911691506001600160401b038a16907fa91c59033c3423e18b54d0acecebb4972f9ea95aedf5f4cae3b677b02eaf3a3f90600090a3505050505b80611e5c81614332565b915050611c14565b506001600160401b038084166000908152603b6020526040812080548493919291611e9191859116614623565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550610a5e82613042565b600081600081518110611ed357611ed36142c7565b60200260200101519050919050565b600081600381518110611ef757611ef76142c7565b60200260200101516000801b14159050919050565b611f186003602061434d565b611f25602083018361420d565b905014611f9a5760405162461bcd60e51b815260206004820152603d60248201527f426561636f6e436861696e50726f6f66732e7665726966795374617465526f6f60448201527f743a2050726f6f662068617320696e636f7272656374206c656e67746800000060648201526084016106ca565b611fea611faa602083018361420d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086925050843590506003613249565b61118d5760405162461bcd60e51b815260206004820152604260248201527f426561636f6e436861696e50726f6f66732e7665726966795374617465526f6f60448201527f743a20496e76616c696420737461746520726f6f74206d65726b6c652070726f60648201526137b360f11b608482015260a4016106ca565b600884146120e25760405162461bcd60e51b815260206004820152604e602482015260008051602061485d83398151915260448201527f724669656c64733a2056616c696461746f72206669656c64732068617320696e60648201526d0c6dee4e4cac6e840d8cadccee8d60931b608482015260a4016106ca565b60056120f06028600161431a565b6120fa919061431a565b61210590602061434d565b82146121735760405162461bcd60e51b8152602060048201526043602482015260008051602061485d83398151915260448201527f724669656c64733a2050726f6f662068617320696e636f7272656374206c656e6064820152620cee8d60eb1b608482015260a4016106ca565b60006121b186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061326192505050565b9050600064ffffffffff83166121c96028600161431a565b600b901b17905061221485858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c9250869150859050613249565b6122745760405162461bcd60e51b815260206004820152603d602482015260008051602061485d83398151915260448201527f724669656c64733a20496e76616c6964206d65726b6c652070726f6f6600000060648201526084016106ca565b5050505050505050565b603a54600160401b90046001600160401b03161561231f5760405162461bcd60e51b815260206004820152605260248201527f456967656e506f642e5f7374617274436865636b706f696e743a206d7573742060448201527f66696e6973682070726576696f757320636865636b706f696e74206265666f72606482015271329039ba30b93a34b7339030b737ba3432b960711b608482015260a4016106ca565b603a54426001600160401b03908116911614156123a45760405162461bcd60e51b815260206004820152603f60248201527f456967656e506f642e5f7374617274436865636b706f696e743a2063616e6e6f60448201527f7420636865636b706f696e7420747769636520696e206f6e6520626c6f636b0060648201526084016106ca565b6034546000906001600160401b03166123c1633b9aca004761451b565b6123cb919061452f565b90508180156123e157506001600160401b038116155b156124545760405162461bcd60e51b815260206004820152603d60248201527f456967656e506f642e5f7374617274436865636b706f696e743a206e6f20626160448201527f6c616e636520617661696c61626c6520746f20636865636b706f696e7400000060648201526084016106ca565b6000604051806080016040528061246a42610e3b565b815260200160395462ffffff168152602001836001600160401b031681526020016000600f0b815250905042603a60086101000a8154816001600160401b0302191690836001600160401b031602179055506124c581613042565b805160208083015160405162ffffff90911681526001600160401b034216917f575796133bbed337e5b39aa49a30dc2556a91e0c6c2af4b7b886ae77ebef1076910160405180910390a3505050565b600080612553848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ebe92505050565b6000818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff1660028111156125c2576125c2613d8f565b60028111156125d3576125d3613d8f565b90525090506000816060015160028111156125f0576125f0613d8f565b146126815760405162461bcd60e51b8152602060048201526061602482015260008051602061483d83398151915260448201527f7469616c733a2076616c696461746f72206d75737420626520696e616374697660648201527f6520746f2070726f7665207769746864726177616c2063726564656e7469616c6084820152607360f81b60a482015260c4016106ca565b6001600160401b0380166126c786868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061350e92505050565b6001600160401b031614156127505760405162461bcd60e51b8152602060048201526055602482015260008051602061483d83398151915260448201527f7469616c733a2076616c696461746f72206d75737420626520696e207468652060648201527470726f63657373206f662061637469766174696e6760581b608482015260a4016106ca565b6001600160401b03801661279686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061353392505050565b6001600160401b03161461280e5760405162461bcd60e51b81526020600482015260446024820181905260008051602061483d833981519152908201527f7469616c733a2076616c696461746f72206d757374206e6f742062652065786960648201526374696e6760e01b608482015260a4016106ca565b612816612bf4565b61281f9061464e565b61285b86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061354b92505050565b146128ca5760405162461bcd60e51b8152602060048201526045602482015260008051602061483d83398151915260448201527f7469616c733a2070726f6f66206973206e6f7420666f72207468697320456967606482015264195b941bd960da1b608482015260a4016106ca565b600061290886868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061356092505050565b90506129188a87878b8b8e612067565b6039805490600061292883614332565b9091555050603a54600090600160401b90046001600160401b03161561296057603a54600160401b90046001600160401b031661296d565b603a546001600160401b03165b6040805160808101825264ffffffffff8d1681526001600160401b03858116602083015283169181019190915290915060608101600190526000858152603660209081526040918290208351815492850151938501516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b031990951691909216179290921792831682178155606084015190929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115612a4357612a43613d8f565b02179055505060405164ffffffffff8c1681527f2d0800bbc377ea54a08c5db6a87aafff5e3e9c8fead0eda110e40e0c10441449915060200160405180910390a16040805164ffffffffff8c1681526001600160401b03838116602083015284168183015290517f0e5fac175b83177cc047381e030d8fb3b42b37bd1c025e22c280facad62c32df9181900360600190a1612aeb633b9aca006001600160401b03841661434d565b9b9a5050505050505050505050565b60008151603014612b835760405162461bcd60e51b815260206004820152604760248201527f456967656e506f642e5f63616c63756c61746556616c696461746f725075626b60448201527f657948617368206d75737420626520612034382d6279746520424c53207075626064820152666c6963206b657960c81b608482015260a4016106ca565b604051600290612b9a908490600090602001614672565b60408051601f1981840301815290829052612bb4916143b3565b602060405180830381855afa158015612bd1573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610e3591906143cf565b60408051600160f81b60208201526000602182015230606090811b6bffffffffffffffffffffffff1916602c8301529101604051602081830303815290604052905090565b80471015612c895760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106ca565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612cd6576040519150601f19603f3d011682016040523d82523d6000602084013e612cdb565b606091505b50509050806116695760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106ca565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611669908490613578565b612db06005600361431a565b612dbb90602061434d565b612dc8602083018361420d565b905014612e4b5760405162461bcd60e51b8152602060048201526044602482018190527f426561636f6e436861696e50726f6f66732e76657269667942616c616e636543908201527f6f6e7461696e65723a2050726f6f662068617320696e636f7272656374206c656064820152630dccee8d60e31b608482015260a4016106ca565b606c612e9c612e5d602084018461420d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250508535905084613249565b6116695760405162461bcd60e51b815260206004820152604960248201527f426561636f6e436861696e50726f6f66732e76657269667942616c616e63654360448201527f6f6e7461696e65723a20696e76616c69642062616c616e636520636f6e7461696064820152683732b910383937b7b360b91b608482015260a4016106ca565b83516020850151600091829182612f3887848861364a565b9050816001600160401b0316816001600160401b031614612fb257612f5d81836137c1565b6040805164ffffffffff861681526001600160401b038b8116602083015284168183015290519196507f0e5fac175b83177cc047381e030d8fb3b42b37bd1c025e22c280facad62c32df919081900360600190a15b6001600160401b0380821660208b0181905290891660408b01526130365760398054906000612fe0836146a1565b9091555050600260608a0152612ff5856146b8565b93508264ffffffffff16886001600160401b03167f2a02361ffa66cf2c2da4682c2355a6adcaa9f6c227b6e6563e68480f9587626a60405160405180910390a35b50505094509492505050565b602081015162ffffff166131c9576000633b9aca00826060015183604001516001600160401b031661307491906145d4565b600f0b61308191906146df565b60408301516034805492935090916000906130a69084906001600160401b0316614623565b82546101009290920a6001600160401b03818102199093169183160217909155603a8054600160401b81049092166001600160801b0319909216919091179055506000603c55603d80546001600160d81b031916905560335460405163030b147160e61b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063c2c51c4090604401600060405180830381600087803b15801561316b57600080fd5b505af115801561317f573d6000803e3d6000fd5b5050603a546040518481526001600160401b0390911692507f525408c201bc1576eb44116f6478f1c2a54775b19a043bcfdc708364f74f8e44915060200160405180910390a25050565b8051603c556020810151603d8054604084015160608501516fffffffffffffffffffffffffffffffff16600160581b026fffffffffffffffffffffffffffffffff60581b196001600160401b039092166301000000026affffffffffffffffffffff1990931662ffffff9095169490941791909117169190911790555b50565b6000836132578685856137d9565b1495945050505050565b60008060028351613272919061451b565b90506000816001600160401b0381111561328e5761328e613f3d565b6040519080825280602002602001820160405280156132b7578160200160208202803683370190505b50905060005b828110156133be576002856132d2838361434d565b815181106132e2576132e26142c7565b6020026020010151868360026132f8919061434d565b61330390600161431a565b81518110613313576133136142c7565b6020026020010151604051602001613335929190918252602082015260400190565b60408051601f198184030181529082905261334f916143b3565b602060405180830381855afa15801561336c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061338f91906143cf565b8282815181106133a1576133a16142c7565b6020908102919091010152806133b681614332565b9150506132bd565b506133ca60028361451b565b91505b81156134ea5760005b828110156134d7576002826133eb838361434d565b815181106133fb576133fb6142c7565b602002602001015183836002613411919061434d565b61341c90600161431a565b8151811061342c5761342c6142c7565b602002602001015160405160200161344e929190918252602082015260400190565b60408051601f1981840301815290829052613468916143b3565b602060405180830381855afa158015613485573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906134a891906143cf565b8282815181106134ba576134ba6142c7565b6020908102919091010152806134cf81614332565b9150506133d6565b506134e360028361451b565b91506133cd565b806000815181106134fd576134fd6142c7565b602002602001015192505050919050565b6000610e3582600581518110613526576135266142c7565b6020026020010151613925565b6000610e3582600681518110613526576135266142c7565b600081600181518110611ed357611ed36142c7565b6000610e3582600281518110613526576135266142c7565b60006135cd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661398c9092919063ffffffff16565b80519091501561166957808060200190518101906135eb919061414a565b6116695760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106ca565b60006136586026600161431a565b61366390602061434d565b613670604084018461420d565b9050146136e15760405162461bcd60e51b81526020600482015260446024820181905260008051602061485d833981519152908201527f7242616c616e63653a2050726f6f662068617320696e636f7272656374206c656064820152630dccee8d60e31b608482015260a4016106ca565b60006136ee600485614764565b64ffffffffff169050613748613707604085018561420d565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508992505050602086013584613249565b6137a85760405162461bcd60e51b815260206004820152603e602482015260008051602061485d83398151915260448201527f7242616c616e63653a20496e76616c6964206d65726b6c652070726f6f66000060648201526084016106ca565b6137b683602001358561399b565b9150505b9392505050565b60006137ba6001600160401b03808416908516614788565b600083516000141580156137f85750602084516137f69190614507565b155b6138875760405162461bcd60e51b815260206004820152605460248201527f4d65726b6c652e70726f63657373496e636c7573696f6e50726f6f665368613260448201527f35363a2070726f6f66206c656e6774682073686f756c642062652061206e6f6e60648201527316bd32b9379036bab63a34b836329037b310199960611b608482015260a4016106ca565b604080516020808201909252848152905b8551811161391b576138ab600285614507565b6138de578151600052808601516020526020826040600060026107d05a03fa6138d357600080fd5b600284049350613909565b8086015160005281516020526020826040600060026107d05a03fa61390257600080fd5b6002840493505b61391460208261431a565b9050613898565b5051949350505050565b60f881901c60e882901c61ff00161760d882901c62ff0000161760c882901c63ff000000161764ff0000000060b883901c161765ff000000000060a883901c161766ff000000000000609883901c161767ff0000000000000060889290921c919091161790565b6060610fe784846000856139c8565b6000806139a96004846147d8565b6139b49060406147fc565b64ffffffffff169050610fe784821b613925565b606082471015613a295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106ca565b6001600160a01b0385163b613a805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106ca565b600080866001600160a01b03168587604051613a9c91906143b3565b60006040518083038185875af1925050503d8060008114613ad9576040519150601f19603f3d011682016040523d82523d6000602084013e613ade565b606091505b5091509150613aee828286613af9565b979650505050505050565b60608315613b085750816137ba565b825115613b185782518084602001fd5b8160405162461bcd60e51b81526004016106ca9190614829565b80356001600160401b0381168114613b4957600080fd5b919050565b600060408284031215613b6057600080fd5b50919050565b600080600060608486031215613b7b57600080fd5b613b8484613b32565b925060208401356001600160401b0380821115613ba057600080fd5b613bac87838801613b4e565b93506040860135915080821115613bc257600080fd5b50613bcf86828701613b4e565b9150509250925092565b60008083601f840112613beb57600080fd5b5081356001600160401b03811115613c0257600080fd5b6020830191508360208260051b8501011115613c1d57600080fd5b9250929050565b60008060008060008060008060a0898b031215613c4057600080fd5b613c4989613b32565b975060208901356001600160401b0380821115613c6557600080fd5b613c718c838d01613b4e565b985060408b0135915080821115613c8757600080fd5b613c938c838d01613bd9565b909850965060608b0135915080821115613cac57600080fd5b613cb88c838d01613bd9565b909650945060808b0135915080821115613cd157600080fd5b50613cde8b828c01613bd9565b999c989b5096995094979396929594505050565b600060208284031215613d0457600080fd5b6137ba82613b32565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b602083019150836020828501011115613c1d57600080fd5b60008060208385031215613d6157600080fd5b82356001600160401b03811115613d7757600080fd5b613d8385828601613d0d565b90969095509350505050565b634e487b7160e01b600052602160045260246000fd5b60038110613dc357634e487b7160e01b600052602160045260246000fd5b9052565b60208101610e358284613da5565b600060208284031215613de757600080fd5b5035919050565b60006080820190506001600160401b03808451168352806020850151166020840152806040850151166040840152506060830151613e2f6060840182613da5565b5092915050565b801515811461324657600080fd5b600060208284031215613e5657600080fd5b81356137ba81613e36565b600080600080600060608688031215613e7957600080fd5b85356001600160401b0380821115613e9057600080fd5b613e9c89838a01613d0d565b90975095506020880135915080821115613eb557600080fd5b50613ec288828901613d0d565b96999598509660400135949350505050565b6001600160a01b038116811461324657600080fd5b8035613b4981613ed4565b60008060408385031215613f0757600080fd5b8235613f1281613ed4565b946020939093013593505050565b600060208284031215613f3257600080fd5b81356137ba81613ed4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613f7b57613f7b613f3d565b604052919050565b60006001600160401b03821115613f9c57613f9c613f3d565b5060051b60200190565b600082601f830112613fb757600080fd5b81356020613fcc613fc783613f83565b613f53565b82815260059290921b84018101918181019086841115613feb57600080fd5b8286015b848110156140065780358352918301918301613fef565b509695505050505050565b60008060006060848603121561402657600080fd5b83356001600160401b038082111561403d57600080fd5b818601915086601f83011261405157600080fd5b81356020614061613fc783613f83565b82815260059290921b8401810191818101908a84111561408057600080fd5b948201945b838610156140a757853561409881613ed4565b82529482019490820190614085565b975050870135925050808211156140bd57600080fd5b506140ca86828701613fa6565b9250506140d960408501613ee9565b90509250925092565b6000806000604084860312156140f757600080fd5b83356001600160401b038082111561410e57600080fd5b61411a87838801613b4e565b9450602086013591508082111561413057600080fd5b5061413d86828701613bd9565b9497909650939450505050565b60006020828403121561415c57600080fd5b81516137ba81613e36565b6020808252603e908201527f456967656e506f642e6f6e6c795768656e4e6f745061757365643a20696e646560408201527f782069732070617573656420696e20456967656e506f644d616e616765720000606082015260800190565b6000808335601e198436030181126141db57600080fd5b8301803591506001600160401b038211156141f557600080fd5b6020019150600581901b3603821315613c1d57600080fd5b6000808335601e1984360301811261422457600080fd5b8301803591506001600160401b0382111561423e57600080fd5b602001915036819003821315613c1d57600080fd5b6020808252604e908201527f456967656e506f642e6f6e6c794f776e65724f7250726f6f665375626d69747460408201527f65723a2063616c6c6572206973206e6f7420706f64206f776e6572206f72207060608201526d3937b7b31039bab136b4ba3a32b960911b608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156142ef57600080fd5b813564ffffffffff811681146137ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561432d5761432d614304565b500190565b600060001982141561434657614346614304565b5060010190565b600081600019048311821515161561436757614367614304565b500290565b60008282101561437e5761437e614304565b500390565b60005b8381101561439e578181015183820152602001614386565b838111156143ad576000848401525b50505050565b600082516143c5818460208701614383565b9190910192915050565b6000602082840312156143e157600080fd5b5051919050565b60208082526031908201527f456967656e506f642e6f6e6c79456967656e506f644d616e616765723a206e6f6040820152703a1032b4b3b2b72837b226b0b730b3b2b960791b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845261447a816020860160208601614383565b601f01601f19169290920160200192915050565b6080815260006144a260808301888a614439565b82810360208401526144b48188614462565b905082810360408401526144c9818688614439565b915050826060830152979650505050505050565b602081526000610fe7602083018486614439565b634e487b7160e01b600052601260045260246000fd5b600082614516576145166144f1565b500690565b60008261452a5761452a6144f1565b500490565b60006001600160401b038381169083168181101561454f5761454f614304565b039392505050565b60208082526028908201527f456967656e506f642e6f6e6c79456967656e506f644f776e65723a206e6f74206040820152673837b227bbb732b960c11b606082015260800190565b60008235605e198336030181126143c557600080fd5b600062ffffff8216806145ca576145ca614304565b6000190192915050565b600081600f0b83600f0b600082128260016001607f1b03038213811516156145fe576145fe614304565b8260016001607f1b031903821281161561461a5761461a614304565b50019392505050565b60006001600160401b0380831681851680830382111561464557614645614304565b01949350505050565b80516020808301519190811015613b605760001960209190910360031b1b16919050565b60008351614684818460208801614383565b6001600160801b0319939093169190920190815260100192915050565b6000816146b0576146b0614304565b506000190190565b600081600f0b60016001607f1b03198114156146d6576146d6614304565b60000392915050565b60006001600160ff1b038184138284138082168684048611161561470557614705614304565b600160ff1b600087128281168783058912161561472457614724614304565b6000871292508782058712848416161561474057614740614304565b8785058712818416161561475657614756614304565b505050929093029392505050565b600064ffffffffff8084168061477c5761477c6144f1565b92169190910492915050565b600081600f0b83600f0b600081128160016001607f1b0319018312811516156147b3576147b3614304565b8160016001607f1b030183138116156147ce576147ce614304565b5090039392505050565b600064ffffffffff808416806147f0576147f06144f1565b92169190910692915050565b600064ffffffffff8083168185168183048111821515161561482057614820614304565b02949350505050565b6020815260006137ba602083018461446256fe456967656e506f642e5f7665726966795769746864726177616c43726564656e426561636f6e436861696e50726f6f66732e76657269667956616c696461746fa2646970667358221220721ae261e7ea8172633ca39b5c47509345abd9d23c9a1d07374863ca537d102264736f6c634300080c0033", + Bin: "0x60e06040523480156200001157600080fd5b5060405162004ad038038062004ad0833981016040819052620000349162000142565b6001600160a01b03808416608052821660a0526001600160401b03811660c0526200005e62000067565b505050620001a1565b600054610100900460ff1615620000d45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000127576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013f57600080fd5b50565b6000806000606084860312156200015857600080fd5b8351620001658162000129565b6020850151909350620001788162000129565b60408501519092506001600160401b03811681146200019657600080fd5b809150509250925092565b60805160a05160c0516148b26200021e60003960006105ff0152600081816102bd0152818161063a015281816106ec01528181610abf01528181610d6c015281816110f40152818161119c0152818161143c015281816118db01528181611a8401526131250152600081816104b8015261126701526148b26000f3fe60806040526004361061016a5760003560e01c80636fcd0e53116100d1578063c49074421161008a578063dda3346c11610064578063dda3346c1461058d578063ee94d67c146105ad578063f074ba62146105cd578063f2882461146105ed57600080fd5b8063c49074421461052d578063c4d66de81461054d578063d06d55871461056d57600080fd5b80636fcd0e53146104425780637439841f1461046f57806374cdd798146104a657806388676cad146104da5780639b4e4634146104fa578063b522538a1461050d57600080fd5b80634665bcda116101235780634665bcda146102ab57806347d28372146102df57806352396a591461039f57806358753357146103d557806358eaee79146103f55780636c0d2d5a1461042257600080fd5b8063039157d2146101a95780630b18ff66146101cb5780632340e8d3146102085780633474aa161461022c5780633f65cf191461026457806342ecff2a1461028457600080fd5b366101a4576040513481527f6fdd3dbdb173299608c0aa9f368735857c8842b581f8389238bf05bd04b3bf499060200160405180910390a1005b600080fd5b3480156101b557600080fd5b506101c96101c4366004613b66565b610621565b005b3480156101d757600080fd5b506033546101eb906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561021457600080fd5b5061021e60395481565b6040519081526020016101ff565b34801561023857600080fd5b5060345461024c906001600160401b031681565b6040516001600160401b0390911681526020016101ff565b34801561027057600080fd5b506101c961027f366004613c24565b610a67565b34801561029057600080fd5b50603a5461024c90600160401b90046001600160401b031681565b3480156102b757600080fd5b506101eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102eb57600080fd5b5061035b6040805160808101825260008082526020820181905291810182905260608101919091525060408051608081018252603c548152603d5462ffffff811660208301526001600160401b03630100000082041692820192909252600160581b909104600f0b606082015290565b6040516101ff91908151815260208083015162ffffff16908201526040808301516001600160401b031690820152606091820151600f0b9181019190915260800190565b3480156103ab57600080fd5b5061024c6103ba366004613cf2565b603b602052600090815260409020546001600160401b031681565b3480156103e157600080fd5b50603e546101eb906001600160a01b031681565b34801561040157600080fd5b50610415610410366004613d4e565b610dd6565b6040516101ff9190613dc7565b34801561042e57600080fd5b5061021e61043d366004613cf2565b610e3b565b34801561044e57600080fd5b5061046261045d366004613dd5565b610fef565b6040516101ff9190613dee565b34801561047b57600080fd5b5061041561048a366004613dd5565b600090815260366020526040902054600160c01b900460ff1690565b3480156104b257600080fd5b506101eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e657600080fd5b506101c96104f5366004613e44565b61109c565b6101c9610508366004613e61565b611191565b34801561051957600080fd5b50610462610528366004613d4e565b61133e565b34801561053957600080fd5b506101c9610548366004613ef4565b611431565b34801561055957600080fd5b506101c9610568366004613f20565b61166e565b34801561057957600080fd5b506101c9610588366004613f20565b611805565b34801561059957600080fd5b506101c96105a8366004614011565b611898565b3480156105b957600080fd5b50603a5461024c906001600160401b031681565b3480156105d957600080fd5b506101c96105e83660046140e2565b611a6b565b3480156105f957600080fd5b5061024c7f000000000000000000000000000000000000000000000000000000000000000081565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ad919061414a565b156106d35760405162461bcd60e51b81526004016106ca90614167565b60405180910390fd5b604051635ac86ab760e01b8152600860048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f919061414a565b1561077c5760405162461bcd60e51b81526004016106ca90614167565b60006107c261078b85806141c4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ebe92505050565b6000818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561083157610831613d8f565b600281111561084257610842613d8f565b81525050905080604001516001600160401b0316876001600160401b0316116108d5576040805162461bcd60e51b81526020600482015260248101919091527f456967656e506f642e7665726966795374616c6542616c616e63653a2070726f60448201527f6f66206973206f6c646572207468616e206c61737420636865636b706f696e7460648201526084016106ca565b6001816060015160028111156108ed576108ed613d8f565b146109575760405162461bcd60e51b815260206004820152603460248201527f456967656e506f642e7665726966795374616c6542616c616e63653a2076616c604482015273696461746f72206973206e6f742061637469766560601b60648201526084016106ca565b61099b61096486806141c4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ee292505050565b610a1f5760405162461bcd60e51b815260206004820152604960248201527f456967656e506f642e7665726966795374616c6542616c616e63653a2076616c60448201527f696461746f72206d75737420626520736c617368656420746f206265206d61726064820152686b6564207374616c6560b81b608482015260a4016106ca565b610a31610a2b88610e3b565b87611f0c565b610a548635610a4087806141c4565b610a4d60208a018a61420d565b8651612067565b610a5e600061227e565b50505050505050565b6033546001600160a01b0316331480610a8a5750603e546001600160a01b031633145b610aa65760405162461bcd60e51b81526004016106ca90614253565b604051635ac86ab760e01b8152600260048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b32919061414a565b15610b4f5760405162461bcd60e51b81526004016106ca90614167565b8584148015610b5d57508382145b610bed5760405162461bcd60e51b815260206004820152605560248201527f456967656e506f642e7665726966795769746864726177616c43726564656e7460448201527f69616c733a2076616c696461746f72496e646963657320616e642070726f6f666064820152740e640daeae6e840c4ca40e6c2daca40d8cadccee8d605b1b608482015260a4016106ca565b603a546001600160401b03600160401b9091048116908a1611610c8d5760405162461bcd60e51b815260206004820152604c60248201527f456967656e506f642e7665726966795769746864726177616c43726564656e7460448201527f69616c733a207370656369666965642074696d657374616d7020697320746f6f60648201526b0819985c881a5b881c185cdd60a21b608482015260a4016106ca565b610c9f610c998a610e3b565b89611f0c565b6000805b87811015610d4257610d248a358a8a84818110610cc257610cc26142c7565b9050602002016020810190610cd791906142dd565b898985818110610ce957610ce96142c7565b9050602002810190610cfb919061420d565b898987818110610d0d57610d0d6142c7565b9050602002810190610d1f91906141c4565b612514565b610d2e908361431a565b915080610d3a81614332565b915050610ca3565b5060335460405163030b147160e61b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063c2c51c4090604401600060405180830381600087803b158015610db257600080fd5b505af1158015610dc6573d6000803e3d6000fd5b5050505050505050505050505050565b600080610e1884848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612afa92505050565b600090815260366020526040902054600160c01b900460ff169150505b92915050565b6000610e4a611fff600c61434d565b610e5d6001600160401b0384164261436c565b10610ec65760405162461bcd60e51b815260206004820152603360248201527f456967656e506f642e676574506172656e74426c6f636b526f6f743a2074696d604482015272657374616d70206f7574206f662072616e676560681b60648201526084016106ca565b604080516001600160401b03841660208201526000918291720f3df6d732807ef1319fb7b8bb8522d0beac02910160408051601f1981840301815290829052610f0e916143b3565b600060405180830381855afa9150503d8060008114610f49576040519150601f19603f3d011682016040523d82523d6000602084013e610f4e565b606091505b5091509150818015610f61575060008151115b610fd35760405162461bcd60e51b815260206004820152603860248201527f456967656e506f642e676574506172656e74426c6f636b526f6f743a20696e7660448201527f616c696420626c6f636b20726f6f742072657475726e6564000000000000000060648201526084016106ca565b80806020019051810190610fe791906143cf565b949350505050565b6110176040805160808101825260008082526020820181905291810182905290606082015290565b600082815260366020908152604091829020825160808101845281546001600160401b038082168352600160401b8204811694830194909452600160801b810490931693810193909352906060830190600160c01b900460ff16600281111561108257611082613d8f565b600281111561109357611093613d8f565b90525092915050565b6033546001600160a01b03163314806110bf5750603e546001600160a01b031633145b6110db5760405162461bcd60e51b81526004016106ca90614253565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611167919061414a565b156111845760405162461bcd60e51b81526004016106ca90614167565b61118d8261227e565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111d95760405162461bcd60e51b81526004016106ca906143e8565b346801bc16d674ec800000146112655760405162461bcd60e51b8152602060048201526044602482018190527f456967656e506f642e7374616b653a206d75737420696e697469616c6c792073908201527f74616b6520666f7220616e792076616c696461746f72207769746820333220656064820152633a3432b960e11b608482015260a4016106ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663228951186801bc16d674ec80000087876112a8612bf4565b8888886040518863ffffffff1660e01b81526004016112cc9695949392919061448e565b6000604051808303818588803b1580156112e557600080fd5b505af11580156112f9573d6000803e3d6000fd5b50505050507f606865b7934a25d4aed43f6cdb426403353fa4b3009c4d228407474581b01e23858560405161132f9291906144dd565b60405180910390a15050505050565b6113666040805160808101825260008082526020820181905291810182905290606082015290565b603660006113a985858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612afa92505050565b81526020808201929092526040908101600020815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b81049094169281019290925290916060830190600160c01b900460ff16600281111561141657611416613d8f565b600281111561142757611427613d8f565b9052509392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114795760405162461bcd60e51b81526004016106ca906143e8565b611487633b9aca0082614507565b156115115760405162461bcd60e51b815260206004820152604e60248201527f456967656e506f642e776974686472617752657374616b6564426561636f6e4360448201527f6861696e4554483a20616d6f756e74576569206d75737420626520612077686f60648201526d1b194811ddd95a48185b5bdd5b9d60921b608482015260a4016106ca565b6000611521633b9aca008361451b565b6034549091506001600160401b0390811690821611156115da5760405162461bcd60e51b815260206004820152606260248201527f456967656e506f642e776974686472617752657374616b6564426561636f6e4360448201527f6861696e4554483a20616d6f756e74477765692065786365656473207769746860648201527f6472617761626c6552657374616b6564457865637574696f6e4c617965724777608482015261656960f01b60a482015260c4016106ca565b603480548291906000906115f89084906001600160401b031661452f565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550826001600160a01b03167f8947fd2ce07ef9cc302c4e8f0461015615d91ce851564839e91cc804c2f49d8e8360405161165791815260200190565b60405180910390a26116698383612c39565b505050565b600054610100900460ff161580801561168e5750600054600160ff909116105b806116a85750303b1580156116a8575060005460ff166001145b61170b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ca565b6000805460ff19166001179055801561172e576000805461ff0019166101001790555b6001600160a01b0382166117a15760405162461bcd60e51b815260206004820152603460248201527f456967656e506f642e696e697469616c697a653a20706f644f776e65722063616044820152736e6e6f74206265207a65726f206164647265737360601b60648201526084016106ca565b603380546001600160a01b0319166001600160a01b038416179055801561118d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6033546001600160a01b0316331461182f5760405162461bcd60e51b81526004016106ca90614557565b603e54604080516001600160a01b03928316815291831660208301527ffb8129080a19d34dceac04ba253fc50304dc86c729bd63cdca4a969ad19a5eac910160405180910390a1603e80546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146118c25760405162461bcd60e51b81526004016106ca90614557565b604051635ac86ab760e01b8152600560048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561192a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194e919061414a565b1561196b5760405162461bcd60e51b81526004016106ca90614167565b82518451146119f65760405162461bcd60e51b815260206004820152604b60248201527f456967656e506f642e7265636f766572546f6b656e733a20746f6b656e4c697360448201527f7420616e6420616d6f756e7473546f5769746864726177206d7573742062652060648201526a0e6c2daca40d8cadccee8d60ab1b608482015260a4016106ca565b60005b8451811015611a6457611a5283858381518110611a1857611a186142c7565b6020026020010151878481518110611a3257611a326142c7565b60200260200101516001600160a01b0316612d529092919063ffffffff16565b80611a5c81614332565b9150506119f9565b5050505050565b604051635ac86ab760e01b8152600760048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af7919061414a565b15611b145760405162461bcd60e51b81526004016106ca90614167565b603a54600160401b90046001600160401b031680611bc05760405162461bcd60e51b815260206004820152605860248201527f456967656e506f642e766572696679436865636b706f696e7450726f6f66733a60448201527f206d75737420686176652061637469766520636865636b706f696e7420746f2060648201527f706572666f726d20636865636b706f696e742070726f6f660000000000000000608482015260a4016106ca565b60408051608081018252603c54808252603d5462ffffff811660208401526001600160401b03630100000082041693830193909352600160581b909204600f0b606082015290611c109087612da4565b6000805b85811015611e645736878783818110611c2f57611c2f6142c7565b9050602002810190611c41919061459f565b80356000908152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff166002811115611cb257611cb2613d8f565b6002811115611cc357611cc3613d8f565b9052509050600181606001516002811115611ce057611ce0613d8f565b14611cec575050611e52565b856001600160401b031681604001516001600160401b031610611d10575050611e52565b600080611d2083898e3587612f20565b602089018051929450909250611d35826145b5565b62ffffff16905250606087018051839190611d519083906145d4565b600f0b905250611d618187614623565b84356000908152603660209081526040918290208651815492880151938801516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b0319909516919092161792909217928316821781556060870151939950869390929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115611e0657611e06613d8f565b021790555050835160405164ffffffffff90911691506001600160401b038a16907fa91c59033c3423e18b54d0acecebb4972f9ea95aedf5f4cae3b677b02eaf3a3f90600090a3505050505b80611e5c81614332565b915050611c14565b506001600160401b038084166000908152603b6020526040812080548493919291611e9191859116614623565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550610a5e82613042565b600081600081518110611ed357611ed36142c7565b60200260200101519050919050565b600081600381518110611ef757611ef76142c7565b60200260200101516000801b14159050919050565b611f186003602061434d565b611f25602083018361420d565b905014611f9a5760405162461bcd60e51b815260206004820152603d60248201527f426561636f6e436861696e50726f6f66732e7665726966795374617465526f6f60448201527f743a2050726f6f662068617320696e636f7272656374206c656e67746800000060648201526084016106ca565b611fea611faa602083018361420d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086925050843590506003613249565b61118d5760405162461bcd60e51b815260206004820152604260248201527f426561636f6e436861696e50726f6f66732e7665726966795374617465526f6f60448201527f743a20496e76616c696420737461746520726f6f74206d65726b6c652070726f60648201526137b360f11b608482015260a4016106ca565b600884146120e25760405162461bcd60e51b815260206004820152604e602482015260008051602061485d83398151915260448201527f724669656c64733a2056616c696461746f72206669656c64732068617320696e60648201526d0c6dee4e4cac6e840d8cadccee8d60931b608482015260a4016106ca565b60056120f06028600161431a565b6120fa919061431a565b61210590602061434d565b82146121735760405162461bcd60e51b8152602060048201526043602482015260008051602061485d83398151915260448201527f724669656c64733a2050726f6f662068617320696e636f7272656374206c656e6064820152620cee8d60eb1b608482015260a4016106ca565b60006121b186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061326192505050565b9050600064ffffffffff83166121c96028600161431a565b600b901b17905061221485858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c9250869150859050613249565b6122745760405162461bcd60e51b815260206004820152603d602482015260008051602061485d83398151915260448201527f724669656c64733a20496e76616c6964206d65726b6c652070726f6f6600000060648201526084016106ca565b5050505050505050565b603a54600160401b90046001600160401b03161561231f5760405162461bcd60e51b815260206004820152605260248201527f456967656e506f642e5f7374617274436865636b706f696e743a206d7573742060448201527f66696e6973682070726576696f757320636865636b706f696e74206265666f72606482015271329039ba30b93a34b7339030b737ba3432b960711b608482015260a4016106ca565b603a54426001600160401b03908116911614156123a45760405162461bcd60e51b815260206004820152603f60248201527f456967656e506f642e5f7374617274436865636b706f696e743a2063616e6e6f60448201527f7420636865636b706f696e7420747769636520696e206f6e6520626c6f636b0060648201526084016106ca565b6034546000906001600160401b03166123c1633b9aca004761451b565b6123cb919061452f565b90508180156123e157506001600160401b038116155b156124545760405162461bcd60e51b815260206004820152603d60248201527f456967656e506f642e5f7374617274436865636b706f696e743a206e6f20626160448201527f6c616e636520617661696c61626c6520746f20636865636b706f696e7400000060648201526084016106ca565b6000604051806080016040528061246a42610e3b565b815260200160395462ffffff168152602001836001600160401b031681526020016000600f0b815250905042603a60086101000a8154816001600160401b0302191690836001600160401b031602179055506124c581613042565b805160208083015160405162ffffff90911681526001600160401b034216917f575796133bbed337e5b39aa49a30dc2556a91e0c6c2af4b7b886ae77ebef1076910160405180910390a3505050565b600080612553848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ebe92505050565b6000818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff1660028111156125c2576125c2613d8f565b60028111156125d3576125d3613d8f565b90525090506000816060015160028111156125f0576125f0613d8f565b146126815760405162461bcd60e51b8152602060048201526061602482015260008051602061483d83398151915260448201527f7469616c733a2076616c696461746f72206d75737420626520696e616374697660648201527f6520746f2070726f7665207769746864726177616c2063726564656e7469616c6084820152607360f81b60a482015260c4016106ca565b6001600160401b0380166126c786868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061350e92505050565b6001600160401b031614156127505760405162461bcd60e51b8152602060048201526055602482015260008051602061483d83398151915260448201527f7469616c733a2076616c696461746f72206d75737420626520696e207468652060648201527470726f63657373206f662061637469766174696e6760581b608482015260a4016106ca565b6001600160401b03801661279686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061353392505050565b6001600160401b03161461280e5760405162461bcd60e51b81526020600482015260446024820181905260008051602061483d833981519152908201527f7469616c733a2076616c696461746f72206d757374206e6f742062652065786960648201526374696e6760e01b608482015260a4016106ca565b612816612bf4565b61281f9061464e565b61285b86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061354b92505050565b146128ca5760405162461bcd60e51b8152602060048201526045602482015260008051602061483d83398151915260448201527f7469616c733a2070726f6f66206973206e6f7420666f72207468697320456967606482015264195b941bd960da1b608482015260a4016106ca565b600061290886868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061356092505050565b90506129188a87878b8b8e612067565b6039805490600061292883614332565b9091555050603a54600090600160401b90046001600160401b03161561296057603a54600160401b90046001600160401b031661296d565b603a546001600160401b03165b6040805160808101825264ffffffffff8d1681526001600160401b03858116602083015283169181019190915290915060608101600190526000858152603660209081526040918290208351815492850151938501516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b031990951691909216179290921792831682178155606084015190929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115612a4357612a43613d8f565b02179055505060405164ffffffffff8c1681527f2d0800bbc377ea54a08c5db6a87aafff5e3e9c8fead0eda110e40e0c10441449915060200160405180910390a16040805164ffffffffff8c1681526001600160401b03838116602083015284168183015290517f0e5fac175b83177cc047381e030d8fb3b42b37bd1c025e22c280facad62c32df9181900360600190a1612aeb633b9aca006001600160401b03841661434d565b9b9a5050505050505050505050565b60008151603014612b835760405162461bcd60e51b815260206004820152604760248201527f456967656e506f642e5f63616c63756c61746556616c696461746f725075626b60448201527f657948617368206d75737420626520612034382d6279746520424c53207075626064820152666c6963206b657960c81b608482015260a4016106ca565b604051600290612b9a908490600090602001614672565b60408051601f1981840301815290829052612bb4916143b3565b602060405180830381855afa158015612bd1573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610e3591906143cf565b60408051600160f81b60208201526000602182015230606090811b6bffffffffffffffffffffffff1916602c8301529101604051602081830303815290604052905090565b80471015612c895760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106ca565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612cd6576040519150601f19603f3d011682016040523d82523d6000602084013e612cdb565b606091505b50509050806116695760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106ca565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611669908490613578565b612db06005600361431a565b612dbb90602061434d565b612dc8602083018361420d565b905014612e4b5760405162461bcd60e51b8152602060048201526044602482018190527f426561636f6e436861696e50726f6f66732e76657269667942616c616e636543908201527f6f6e7461696e65723a2050726f6f662068617320696e636f7272656374206c656064820152630dccee8d60e31b608482015260a4016106ca565b606c612e9c612e5d602084018461420d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250508535905084613249565b6116695760405162461bcd60e51b815260206004820152604960248201527f426561636f6e436861696e50726f6f66732e76657269667942616c616e63654360448201527f6f6e7461696e65723a20696e76616c69642062616c616e636520636f6e7461696064820152683732b910383937b7b360b91b608482015260a4016106ca565b83516020850151600091829182612f3887848861364a565b9050816001600160401b0316816001600160401b031614612fb257612f5d81836137c1565b6040805164ffffffffff861681526001600160401b038b8116602083015284168183015290519196507f0e5fac175b83177cc047381e030d8fb3b42b37bd1c025e22c280facad62c32df919081900360600190a15b6001600160401b0380821660208b0181905290891660408b01526130365760398054906000612fe0836146a1565b9091555050600260608a0152612ff5856146b8565b93508264ffffffffff16886001600160401b03167f2a02361ffa66cf2c2da4682c2355a6adcaa9f6c227b6e6563e68480f9587626a60405160405180910390a35b50505094509492505050565b602081015162ffffff166131c9576000633b9aca00826060015183604001516001600160401b031661307491906145d4565b600f0b61308191906146df565b60408301516034805492935090916000906130a69084906001600160401b0316614623565b82546101009290920a6001600160401b03818102199093169183160217909155603a8054600160401b81049092166001600160801b0319909216919091179055506000603c55603d80546001600160d81b031916905560335460405163030b147160e61b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063c2c51c4090604401600060405180830381600087803b15801561316b57600080fd5b505af115801561317f573d6000803e3d6000fd5b5050603a546040518481526001600160401b0390911692507f525408c201bc1576eb44116f6478f1c2a54775b19a043bcfdc708364f74f8e44915060200160405180910390a25050565b8051603c556020810151603d8054604084015160608501516fffffffffffffffffffffffffffffffff16600160581b026fffffffffffffffffffffffffffffffff60581b196001600160401b039092166301000000026affffffffffffffffffffff1990931662ffffff9095169490941791909117169190911790555b50565b6000836132578685856137d9565b1495945050505050565b60008060028351613272919061451b565b90506000816001600160401b0381111561328e5761328e613f3d565b6040519080825280602002602001820160405280156132b7578160200160208202803683370190505b50905060005b828110156133be576002856132d2838361434d565b815181106132e2576132e26142c7565b6020026020010151868360026132f8919061434d565b61330390600161431a565b81518110613313576133136142c7565b6020026020010151604051602001613335929190918252602082015260400190565b60408051601f198184030181529082905261334f916143b3565b602060405180830381855afa15801561336c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061338f91906143cf565b8282815181106133a1576133a16142c7565b6020908102919091010152806133b681614332565b9150506132bd565b506133ca60028361451b565b91505b81156134ea5760005b828110156134d7576002826133eb838361434d565b815181106133fb576133fb6142c7565b602002602001015183836002613411919061434d565b61341c90600161431a565b8151811061342c5761342c6142c7565b602002602001015160405160200161344e929190918252602082015260400190565b60408051601f1981840301815290829052613468916143b3565b602060405180830381855afa158015613485573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906134a891906143cf565b8282815181106134ba576134ba6142c7565b6020908102919091010152806134cf81614332565b9150506133d6565b506134e360028361451b565b91506133cd565b806000815181106134fd576134fd6142c7565b602002602001015192505050919050565b6000610e3582600581518110613526576135266142c7565b6020026020010151613925565b6000610e3582600681518110613526576135266142c7565b600081600181518110611ed357611ed36142c7565b6000610e3582600281518110613526576135266142c7565b60006135cd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661398c9092919063ffffffff16565b80519091501561166957808060200190518101906135eb919061414a565b6116695760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106ca565b60006136586026600161431a565b61366390602061434d565b613670604084018461420d565b9050146136e15760405162461bcd60e51b81526020600482015260446024820181905260008051602061485d833981519152908201527f7242616c616e63653a2050726f6f662068617320696e636f7272656374206c656064820152630dccee8d60e31b608482015260a4016106ca565b60006136ee600485614764565b64ffffffffff169050613748613707604085018561420d565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508992505050602086013584613249565b6137a85760405162461bcd60e51b815260206004820152603e602482015260008051602061485d83398151915260448201527f7242616c616e63653a20496e76616c6964206d65726b6c652070726f6f66000060648201526084016106ca565b6137b683602001358561399b565b9150505b9392505050565b60006137ba6001600160401b03808416908516614788565b600083516000141580156137f85750602084516137f69190614507565b155b6138875760405162461bcd60e51b815260206004820152605460248201527f4d65726b6c652e70726f63657373496e636c7573696f6e50726f6f665368613260448201527f35363a2070726f6f66206c656e6774682073686f756c642062652061206e6f6e60648201527316bd32b9379036bab63a34b836329037b310199960611b608482015260a4016106ca565b604080516020808201909252848152905b8551811161391b576138ab600285614507565b6138de578151600052808601516020526020826040600060026107d05a03fa6138d357600080fd5b600284049350613909565b8086015160005281516020526020826040600060026107d05a03fa61390257600080fd5b6002840493505b61391460208261431a565b9050613898565b5051949350505050565b60f881901c60e882901c61ff00161760d882901c62ff0000161760c882901c63ff000000161764ff0000000060b883901c161765ff000000000060a883901c161766ff000000000000609883901c161767ff0000000000000060889290921c919091161790565b6060610fe784846000856139c8565b6000806139a96004846147d8565b6139b49060406147fc565b64ffffffffff169050610fe784821b613925565b606082471015613a295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106ca565b6001600160a01b0385163b613a805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106ca565b600080866001600160a01b03168587604051613a9c91906143b3565b60006040518083038185875af1925050503d8060008114613ad9576040519150601f19603f3d011682016040523d82523d6000602084013e613ade565b606091505b5091509150613aee828286613af9565b979650505050505050565b60608315613b085750816137ba565b825115613b185782518084602001fd5b8160405162461bcd60e51b81526004016106ca9190614829565b80356001600160401b0381168114613b4957600080fd5b919050565b600060408284031215613b6057600080fd5b50919050565b600080600060608486031215613b7b57600080fd5b613b8484613b32565b925060208401356001600160401b0380821115613ba057600080fd5b613bac87838801613b4e565b93506040860135915080821115613bc257600080fd5b50613bcf86828701613b4e565b9150509250925092565b60008083601f840112613beb57600080fd5b5081356001600160401b03811115613c0257600080fd5b6020830191508360208260051b8501011115613c1d57600080fd5b9250929050565b60008060008060008060008060a0898b031215613c4057600080fd5b613c4989613b32565b975060208901356001600160401b0380821115613c6557600080fd5b613c718c838d01613b4e565b985060408b0135915080821115613c8757600080fd5b613c938c838d01613bd9565b909850965060608b0135915080821115613cac57600080fd5b613cb88c838d01613bd9565b909650945060808b0135915080821115613cd157600080fd5b50613cde8b828c01613bd9565b999c989b5096995094979396929594505050565b600060208284031215613d0457600080fd5b6137ba82613b32565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b602083019150836020828501011115613c1d57600080fd5b60008060208385031215613d6157600080fd5b82356001600160401b03811115613d7757600080fd5b613d8385828601613d0d565b90969095509350505050565b634e487b7160e01b600052602160045260246000fd5b60038110613dc357634e487b7160e01b600052602160045260246000fd5b9052565b60208101610e358284613da5565b600060208284031215613de757600080fd5b5035919050565b60006080820190506001600160401b03808451168352806020850151166020840152806040850151166040840152506060830151613e2f6060840182613da5565b5092915050565b801515811461324657600080fd5b600060208284031215613e5657600080fd5b81356137ba81613e36565b600080600080600060608688031215613e7957600080fd5b85356001600160401b0380821115613e9057600080fd5b613e9c89838a01613d0d565b90975095506020880135915080821115613eb557600080fd5b50613ec288828901613d0d565b96999598509660400135949350505050565b6001600160a01b038116811461324657600080fd5b8035613b4981613ed4565b60008060408385031215613f0757600080fd5b8235613f1281613ed4565b946020939093013593505050565b600060208284031215613f3257600080fd5b81356137ba81613ed4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613f7b57613f7b613f3d565b604052919050565b60006001600160401b03821115613f9c57613f9c613f3d565b5060051b60200190565b600082601f830112613fb757600080fd5b81356020613fcc613fc783613f83565b613f53565b82815260059290921b84018101918181019086841115613feb57600080fd5b8286015b848110156140065780358352918301918301613fef565b509695505050505050565b60008060006060848603121561402657600080fd5b83356001600160401b038082111561403d57600080fd5b818601915086601f83011261405157600080fd5b81356020614061613fc783613f83565b82815260059290921b8401810191818101908a84111561408057600080fd5b948201945b838610156140a757853561409881613ed4565b82529482019490820190614085565b975050870135925050808211156140bd57600080fd5b506140ca86828701613fa6565b9250506140d960408501613ee9565b90509250925092565b6000806000604084860312156140f757600080fd5b83356001600160401b038082111561410e57600080fd5b61411a87838801613b4e565b9450602086013591508082111561413057600080fd5b5061413d86828701613bd9565b9497909650939450505050565b60006020828403121561415c57600080fd5b81516137ba81613e36565b6020808252603e908201527f456967656e506f642e6f6e6c795768656e4e6f745061757365643a20696e646560408201527f782069732070617573656420696e20456967656e506f644d616e616765720000606082015260800190565b6000808335601e198436030181126141db57600080fd5b8301803591506001600160401b038211156141f557600080fd5b6020019150600581901b3603821315613c1d57600080fd5b6000808335601e1984360301811261422457600080fd5b8301803591506001600160401b0382111561423e57600080fd5b602001915036819003821315613c1d57600080fd5b6020808252604e908201527f456967656e506f642e6f6e6c794f776e65724f7250726f6f665375626d69747460408201527f65723a2063616c6c6572206973206e6f7420706f64206f776e6572206f72207060608201526d3937b7b31039bab136b4ba3a32b960911b608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156142ef57600080fd5b813564ffffffffff811681146137ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561432d5761432d614304565b500190565b600060001982141561434657614346614304565b5060010190565b600081600019048311821515161561436757614367614304565b500290565b60008282101561437e5761437e614304565b500390565b60005b8381101561439e578181015183820152602001614386565b838111156143ad576000848401525b50505050565b600082516143c5818460208701614383565b9190910192915050565b6000602082840312156143e157600080fd5b5051919050565b60208082526031908201527f456967656e506f642e6f6e6c79456967656e506f644d616e616765723a206e6f6040820152703a1032b4b3b2b72837b226b0b730b3b2b960791b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845261447a816020860160208601614383565b601f01601f19169290920160200192915050565b6080815260006144a260808301888a614439565b82810360208401526144b48188614462565b905082810360408401526144c9818688614439565b915050826060830152979650505050505050565b602081526000610fe7602083018486614439565b634e487b7160e01b600052601260045260246000fd5b600082614516576145166144f1565b500690565b60008261452a5761452a6144f1565b500490565b60006001600160401b038381169083168181101561454f5761454f614304565b039392505050565b60208082526028908201527f456967656e506f642e6f6e6c79456967656e506f644f776e65723a206e6f74206040820152673837b227bbb732b960c11b606082015260800190565b60008235605e198336030181126143c557600080fd5b600062ffffff8216806145ca576145ca614304565b6000190192915050565b600081600f0b83600f0b600082128260016001607f1b03038213811516156145fe576145fe614304565b8260016001607f1b031903821281161561461a5761461a614304565b50019392505050565b60006001600160401b0380831681851680830382111561464557614645614304565b01949350505050565b80516020808301519190811015613b605760001960209190910360031b1b16919050565b60008351614684818460208801614383565b6001600160801b0319939093169190920190815260100192915050565b6000816146b0576146b0614304565b506000190190565b600081600f0b60016001607f1b03198114156146d6576146d6614304565b60000392915050565b60006001600160ff1b038184138284138082168684048611161561470557614705614304565b600160ff1b600087128281168783058912161561472457614724614304565b6000871292508782058712848416161561474057614740614304565b8785058712818416161561475657614756614304565b505050929093029392505050565b600064ffffffffff8084168061477c5761477c6144f1565b92169190910492915050565b600081600f0b83600f0b600081128160016001607f1b0319018312811516156147b3576147b3614304565b8160016001607f1b030183138116156147ce576147ce614304565b5090039392505050565b600064ffffffffff808416806147f0576147f06144f1565b92169190910692915050565b600064ffffffffff8083168185168183048111821515161561482057614820614304565b02949350505050565b6020815260006137ba602083018461446256fe456967656e506f642e5f7665726966795769746864726177616c43726564656e426561636f6e436861696e50726f6f66732e76657269667956616c696461746fa2646970667358221220b0faa2d78fce5a4c71c01cdc29ced31b41449b3cfa3cb48339fa5fcf5004251d64736f6c634300080c0033", } // EigenPodABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenPodManager/binding.go b/pkg/bindings/EigenPodManager/binding.go index 9b44ba82d..65d5a737b 100644 --- a/pkg/bindings/EigenPodManager/binding.go +++ b/pkg/bindings/EigenPodManager/binding.go @@ -32,7 +32,7 @@ var ( // EigenPodManagerMetaData contains all meta data concerning the EigenPodManager contract. var EigenPodManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_ethPOS\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"},{\"name\":\"_eigenPodBeacon\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"},{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_slasher\",\"type\":\"address\",\"internalType\":\"contractISlasher\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createPod\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodBeacon\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ethPOS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPod\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPod\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasPod\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_initPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"numPods\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownerToPod\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPod\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"podOwnerShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"int256\",\"internalType\":\"int256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recordBeaconChainETHBalanceUpdate\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sharesDelta\",\"type\":\"int256\",\"internalType\":\"int256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"depositDataRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"destination\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BeaconChainETHDeposited\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconChainETHWithdrawalCompleted\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"delegatedAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewTotalShares\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newTotalShares\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PodDeployed\",\"inputs\":[{\"name\":\"eigenPod\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PodSharesUpdated\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sharesDelta\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x6101206040523480156200001257600080fd5b50604051620031693803806200316983398101604081905262000035916200014b565b6001600160a01b0380861660805280851660a05280841660c05280831660e0528116610100526200006562000070565b5050505050620001cb565b600054610100900460ff1615620000dd5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000130576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200014857600080fd5b50565b600080600080600060a086880312156200016457600080fd5b8551620001718162000132565b6020870151909550620001848162000132565b6040870151909450620001978162000132565b6060870151909350620001aa8162000132565b6080870151909250620001bd8162000132565b809150509295509295909350565b60805160a05160c05160e05161010051612f286200024160003960008181610551015281816105fb01528181610b7901528181611313015281816117bf01526118af015260006104dd015260006102cf015260008181610263015281816112920152611e64015260006103af0152612f286000f3fe6080604052600436106101b75760003560e01c8063886f1195116100ec578063b13442711161008a578063ea4d3c9b11610064578063ea4d3c9b1461053f578063f2fde38b14610573578063f6848d2414610593578063fabc1cbc146105ce57600080fd5b8063b1344271146104cb578063beffbb89146104ff578063c2c51c401461051f57600080fd5b80639b4e4634116100c65780639b4e46341461044c5780639ba062751461045f578063a38406a314610495578063a6a509be146104b557600080fd5b8063886f1195146103e65780638da5cb5b146104065780639104c3191461042457600080fd5b8063595c6a671161015957806360f4062b1161013357806360f4062b1461035b578063715018a61461038857806374cdd7981461039d57806384d81062146103d157600080fd5b8063595c6a67146102f15780635ac86ab7146103065780635c975abb1461034657600080fd5b80631794bb3c116101955780631794bb3c14610231578063292b7b2b14610251578063387b13001461029d57806339b70e38146102bd57600080fd5b80630e81073c146101bc57806310d67a2f146101ef578063136439dd14610211575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046120fc565b6105ee565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061020f61020a366004612128565b61085d565b005b34801561021d57600080fd5b5061020f61022c366004612145565b610910565b34801561023d57600080fd5b5061020f61024c36600461215e565b610a4f565b34801561025d57600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e6565b3480156102a957600080fd5b5061020f6102b836600461215e565b610b6e565b3480156102c957600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b3480156102fd57600080fd5b5061020f610f82565b34801561031257600080fd5b5061033661032136600461219f565b606654600160ff9092169190911b9081161490565b60405190151581526020016101e6565b34801561035257600080fd5b506066546101dc565b34801561036757600080fd5b506101dc610376366004612128565b609b6020526000908152604090205481565b34801561039457600080fd5b5061020f611049565b3480156103a957600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b3480156103dd57600080fd5b5061028561105d565b3480156103f257600080fd5b50606554610285906001600160a01b031681565b34801561041257600080fd5b506033546001600160a01b0316610285565b34801561043057600080fd5b5061028573beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61020f61045a36600461220b565b611147565b34801561046b57600080fd5b5061028561047a366004612128565b6098602052600090815260409020546001600160a01b031681565b3480156104a157600080fd5b506102856104b0366004612128565b611236565b3480156104c157600080fd5b506101dc60995481565b3480156104d757600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b34801561050b57600080fd5b5061020f61051a3660046120fc565b611308565b34801561052b57600080fd5b5061020f61053a3660046120fc565b611547565b34801561054b57600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b34801561057f57600080fd5b5061020f61058e366004612128565b61197b565b34801561059f57600080fd5b506103366105ae366004612128565b6001600160a01b0390811660009081526098602052604090205416151590565b3480156105da57600080fd5b5061020f6105e9366004612145565b6119f1565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106415760405162461bcd60e51b81526004016106389061227f565b60405180910390fd5b6001600160a01b0383166106bd5760405162461bcd60e51b815260206004820152603a60248201527f456967656e506f644d616e616765722e6164645368617265733a20706f644f7760448201527f6e65722063616e6e6f74206265207a65726f20616464726573730000000000006064820152608401610638565b600082121561072b5760405162461bcd60e51b815260206004820152603460248201527f456967656e506f644d616e616765722e6164645368617265733a207368617265604482015273732063616e6e6f74206265206e6567617469766560601b6064820152608401610638565b610739633b9aca00836122f3565b156107ac5760405162461bcd60e51b815260206004820152603d60248201527f456967656e506f644d616e616765722e6164645368617265733a20736861726560448201527f73206d75737420626520612077686f6c65204777656920616d6f756e740000006064820152608401610638565b6001600160a01b0383166000908152609b6020526040812054906107d0848361231d565b6001600160a01b0386166000818152609b6020526040908190208390555191925090600080516020612eb38339815191529061080f9087815260200190565b60405180910390a2846001600160a01b03166000805160206125858339815191528260405161084091815260200190565b60405180910390a26108528282611b4d565b925050505b92915050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d4919061235e565b6001600160a01b0316336001600160a01b0316146109045760405162461bcd60e51b81526004016106389061237b565b61090d81611b8f565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c91906123c5565b6109985760405162461bcd60e51b8152600401610638906123e7565b60665481811614610a115760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610638565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600054610100900460ff1615808015610a6f5750600054600160ff909116105b80610a895750303b158015610a89575060005460ff166001145b610aec5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610638565b6000805460ff191660011790558015610b0f576000805461ff0019166101001790555b610b1884611c86565b610b228383611cd8565b8015610b68576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bb65760405162461bcd60e51b81526004016106389061227f565b6001600160a01b038316610c305760405162461bcd60e51b81526020600482015260476024820152600080516020612ed383398151915260448201527f546f6b656e733a20706f644f776e65722063616e6e6f74206265207a65726f206064820152666164647265737360c81b608482015260a401610638565b6001600160a01b038216610cad5760405162461bcd60e51b815260206004820152604a6024820152600080516020612ed383398151915260448201527f546f6b656e733a2064657374696e6174696f6e2063616e6e6f74206265207a65606482015269726f206164647265737360b01b608482015260a401610638565b6000811215610d1c5760405162461bcd60e51b81526020600482015260416024820152600080516020612ed383398151915260448201527f546f6b656e733a207368617265732063616e6e6f74206265206e6567617469766064820152606560f81b608482015260a401610638565b610d2a633b9aca00826122f3565b15610d9e5760405162461bcd60e51b815260206004820152604a6024820152600080516020612ed383398151915260448201527f546f6b656e733a20736861726573206d75737420626520612077686f6c6520476064820152691dd95a48185b5bdd5b9d60b21b608482015260a401610638565b6001600160a01b0383166000908152609b602052604081205490811215610f07576000610dca8261242f565b905080831115610e61576001600160a01b0385166000908152609b6020526040812055610df7818461244c565b9250846001600160a01b0316600080516020612eb383398151915282604051610e2291815260200190565b60405180910390a2846001600160a01b03166000805160206125858339815191526000604051610e5491815260200190565b60405180910390a2610f05565b6001600160a01b0385166000908152609b6020526040812054610e8590859061231d565b6001600160a01b0387166000818152609b6020526040908190208390555191925090600080516020612eb383398151915290610ec49087815260200190565b60405180910390a2856001600160a01b031660008051602061258583398151915282604051610ef591815260200190565b60405180910390a2505050505050565b505b6001600160a01b03848116600090815260986020526040908190205490516362483a2160e11b815285831660048201526024810185905291169063c490744290604401600060405180830381600087803b158015610f6457600080fd5b505af1158015610f78573d6000803e3d6000fd5b5050505050505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee91906123c5565b61100a5760405162461bcd60e51b8152600401610638906123e7565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b611051611dc2565b61105b6000611c86565b565b6066546000908190600190811614156110b45760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610638565b336000908152609860205260409020546001600160a01b0316156111365760405162461bcd60e51b815260206004820152603360248201527f456967656e506f644d616e616765722e637265617465506f643a2053656e64656044820152721c88185b1c9958591e481a185cc818481c1bd9606a1b6064820152608401610638565b6000611140611e1c565b9250505090565b6066546000906001908116141561119c5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610638565b336000908152609860205260409020546001600160a01b0316806111c5576111c2611e1c565b90505b6040516326d3918d60e21b81526001600160a01b03821690639b4e46349034906111fb908b908b908b908b908b9060040161248c565b6000604051808303818588803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b038082166000908152609860205260408120549091168061085757611301836001600160a01b031660001b60405180610940016040528061090e81526020016125a561090e9139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091526000606082015260800160408051601f19818403018152908290526112e69291602001612501565b60405160208183030381529060405280519060200120611f81565b9392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113505760405162461bcd60e51b81526004016106389061227f565b60008112156113c75760405162461bcd60e51b815260206004820152603760248201527f456967656e506f644d616e616765722e72656d6f76655368617265733a20736860448201527f617265732063616e6e6f74206265206e656761746976650000000000000000006064820152608401610638565b6113d5633b9aca00826122f3565b1561144a576040805162461bcd60e51b81526020600482015260248101919091527f456967656e506f644d616e616765722e72656d6f76655368617265733a20736860448201527f61726573206d75737420626520612077686f6c65204777656920616d6f756e746064820152608401610638565b6001600160a01b0382166000908152609b602052604081205461146e908390612516565b905060008112156114ff5760405162461bcd60e51b815260206004820152604f60248201527f456967656e506f644d616e616765722e72656d6f76655368617265733a20636160448201527f6e6e6f7420726573756c7420696e20706f64206f776e657220686176696e672060648201526e6e656761746976652073686172657360881b608482015260a401610638565b6001600160a01b0383166000818152609b602052604090819020839055516000805160206125858339815191529061153a9084815260200190565b60405180910390a2505050565b6001600160a01b0380831660009081526098602052604090205483911633146115c25760405162461bcd60e51b815260206004820152602760248201527f456967656e506f644d616e616765722e6f6e6c79456967656e506f643a206e6f6044820152661d0818481c1bd960ca1b6064820152608401610638565b600260c95414156116155760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610638565b600260c9556001600160a01b0383166116b15760405162461bcd60e51b815260206004820152605260248201527f456967656e506f644d616e616765722e7265636f7264426561636f6e4368616960448201527f6e45544842616c616e63655570646174653a20706f644f776e65722063616e6e6064820152716f74206265207a65726f206164647265737360701b608482015260a401610638565b6116bf633b9aca0083612555565b156117585760405162461bcd60e51b815260206004820152605a60248201527f456967656e506f644d616e616765722e7265636f7264426561636f6e4368616960448201527f6e45544842616c616e63655570646174653a2073686172657344656c7461206d60648201527f75737420626520612077686f6c65204777656920616d6f756e74000000000000608482015260a401610638565b6001600160a01b0383166000908152609b60205260408120549061177c848361231d565b6001600160a01b0386166000908152609b602052604081208290559091506117a48383611b4d565b9050801561190c57600081121561186f576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663132d49678773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06118038561242f565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561185257600080fd5b505af1158015611866573d6000803e3d6000fd5b5050505061190c565b604051631452b9d760e11b81526001600160a01b03878116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906328a573ae90606401600060405180830381600087803b1580156118f357600080fd5b505af1158015611907573d6000803e3d6000fd5b505050505b856001600160a01b0316600080516020612eb38339815191528660405161193591815260200190565b60405180910390a2856001600160a01b03166000805160206125858339815191528360405161196691815260200190565b60405180910390a25050600160c95550505050565b611983611dc2565b6001600160a01b0381166119e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610638565b61090d81611c86565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a68919061235e565b6001600160a01b0316336001600160a01b031614611a985760405162461bcd60e51b81526004016106389061237b565b606654198119606654191614611b165760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610638565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610a44565b6000808313611b6d5760008213611b6657506000610857565b5080610857565b60008213611b8557611b7e8361242f565b9050610857565b611b7e8383612516565b6001600160a01b038116611c1d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610638565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6065546001600160a01b0316158015611cf957506001600160a01b03821615155b611d7b5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610638565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2611dbe82611b8f565b5050565b6033546001600160a01b0316331461105b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610638565b6000609960008154611e2d90612569565b9091555060408051610940810190915261090e808252600091611ecc91839133916125a56020830139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091526000606082015260800160408051601f1981840301815290829052611eb89291602001612501565b604051602081830303815290604052611fdd565b60405163189acdbd60e31b81523360048201529091506001600160a01b0382169063c4d66de890602401600060405180830381600087803b158015611f1057600080fd5b505af1158015611f24573d6000803e3d6000fd5b50503360008181526098602052604080822080546001600160a01b0319166001600160a01b038816908117909155905192945092507f21c99d0db02213c32fff5b05cf0a718ab5f858802b91498f80d82270289d856a91a3919050565b604080516001600160f81b03196020808301919091526bffffffffffffffffffffffff193060601b1660218301526035820185905260558083018590528351808403909101815260759092019092528051910120600090611301565b600080844710156120305760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610638565b825161207e5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610638565b8383516020850187f590506001600160a01b0381166120df5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610638565b949350505050565b6001600160a01b038116811461090d57600080fd5b6000806040838503121561210f57600080fd5b823561211a816120e7565b946020939093013593505050565b60006020828403121561213a57600080fd5b8135611301816120e7565b60006020828403121561215757600080fd5b5035919050565b60008060006060848603121561217357600080fd5b833561217e816120e7565b9250602084013561218e816120e7565b929592945050506040919091013590565b6000602082840312156121b157600080fd5b813560ff8116811461130157600080fd5b60008083601f8401126121d457600080fd5b50813567ffffffffffffffff8111156121ec57600080fd5b60208301915083602082850101111561220457600080fd5b9250929050565b60008060008060006060868803121561222357600080fd5b853567ffffffffffffffff8082111561223b57600080fd5b61224789838a016121c2565b9097509550602088013591508082111561226057600080fd5b5061226d888289016121c2565b96999598509660400135949350505050565b602080825260409082018190527f456967656e506f644d616e616765722e6f6e6c7944656c65676174696f6e4d61908201527f6e616765723a206e6f74207468652044656c65676174696f6e4d616e61676572606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612302576123026122dd565b500690565b634e487b7160e01b600052601160045260246000fd5b600080821280156001600160ff1b038490038513161561233f5761233f612307565b600160ff1b839003841281161561235857612358612307565b50500190565b60006020828403121561237057600080fd5b8151611301816120e7565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b6000602082840312156123d757600080fd5b8151801515811461130157600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000600160ff1b82141561244557612445612307565b5060000390565b60008282101561245e5761245e612307565b500390565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006124a0606083018789612463565b82810360208401526124b3818688612463565b9150508260408301529695505050505050565b6000815160005b818110156124e757602081850181015186830152016124cd565b818111156124f6576000828601525b509290920192915050565b60006120df61251083866124c6565b846124c6565b60008083128015600160ff1b85018412161561253457612534612307565b6001600160ff1b038401831381161561254f5761254f612307565b50500390565b600082612564576125646122dd565b500790565b600060001982141561257d5761257d612307565b506001019056fed4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe077098608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65644e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c6193456967656e506f644d616e616765722e77697468647261775368617265734173a264697066735822122069d3a03119733341cd267e296785e37b1c350fc350d796fc97aa45c1e8213da664736f6c634300080c0033", + Bin: "0x6101206040523480156200001257600080fd5b50604051620031693803806200316983398101604081905262000035916200014b565b6001600160a01b0380861660805280851660a05280841660c05280831660e0528116610100526200006562000070565b5050505050620001cb565b600054610100900460ff1615620000dd5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000130576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200014857600080fd5b50565b600080600080600060a086880312156200016457600080fd5b8551620001718162000132565b6020870151909550620001848162000132565b6040870151909450620001978162000132565b6060870151909350620001aa8162000132565b6080870151909250620001bd8162000132565b809150509295509295909350565b60805160a05160c05160e05161010051612f286200024160003960008181610551015281816105fb01528181610b7901528181611313015281816117bf01526118af015260006104dd015260006102cf015260008181610263015281816112920152611e64015260006103af0152612f286000f3fe6080604052600436106101b75760003560e01c8063886f1195116100ec578063b13442711161008a578063ea4d3c9b11610064578063ea4d3c9b1461053f578063f2fde38b14610573578063f6848d2414610593578063fabc1cbc146105ce57600080fd5b8063b1344271146104cb578063beffbb89146104ff578063c2c51c401461051f57600080fd5b80639b4e4634116100c65780639b4e46341461044c5780639ba062751461045f578063a38406a314610495578063a6a509be146104b557600080fd5b8063886f1195146103e65780638da5cb5b146104065780639104c3191461042457600080fd5b8063595c6a671161015957806360f4062b1161013357806360f4062b1461035b578063715018a61461038857806374cdd7981461039d57806384d81062146103d157600080fd5b8063595c6a67146102f15780635ac86ab7146103065780635c975abb1461034657600080fd5b80631794bb3c116101955780631794bb3c14610231578063292b7b2b14610251578063387b13001461029d57806339b70e38146102bd57600080fd5b80630e81073c146101bc57806310d67a2f146101ef578063136439dd14610211575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046120fc565b6105ee565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061020f61020a366004612128565b61085d565b005b34801561021d57600080fd5b5061020f61022c366004612145565b610910565b34801561023d57600080fd5b5061020f61024c36600461215e565b610a4f565b34801561025d57600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e6565b3480156102a957600080fd5b5061020f6102b836600461215e565b610b6e565b3480156102c957600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b3480156102fd57600080fd5b5061020f610f82565b34801561031257600080fd5b5061033661032136600461219f565b606654600160ff9092169190911b9081161490565b60405190151581526020016101e6565b34801561035257600080fd5b506066546101dc565b34801561036757600080fd5b506101dc610376366004612128565b609b6020526000908152604090205481565b34801561039457600080fd5b5061020f611049565b3480156103a957600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b3480156103dd57600080fd5b5061028561105d565b3480156103f257600080fd5b50606554610285906001600160a01b031681565b34801561041257600080fd5b506033546001600160a01b0316610285565b34801561043057600080fd5b5061028573beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61020f61045a36600461220b565b611147565b34801561046b57600080fd5b5061028561047a366004612128565b6098602052600090815260409020546001600160a01b031681565b3480156104a157600080fd5b506102856104b0366004612128565b611236565b3480156104c157600080fd5b506101dc60995481565b3480156104d757600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b34801561050b57600080fd5b5061020f61051a3660046120fc565b611308565b34801561052b57600080fd5b5061020f61053a3660046120fc565b611547565b34801561054b57600080fd5b506102857f000000000000000000000000000000000000000000000000000000000000000081565b34801561057f57600080fd5b5061020f61058e366004612128565b61197b565b34801561059f57600080fd5b506103366105ae366004612128565b6001600160a01b0390811660009081526098602052604090205416151590565b3480156105da57600080fd5b5061020f6105e9366004612145565b6119f1565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106415760405162461bcd60e51b81526004016106389061227f565b60405180910390fd5b6001600160a01b0383166106bd5760405162461bcd60e51b815260206004820152603a60248201527f456967656e506f644d616e616765722e6164645368617265733a20706f644f7760448201527f6e65722063616e6e6f74206265207a65726f20616464726573730000000000006064820152608401610638565b600082121561072b5760405162461bcd60e51b815260206004820152603460248201527f456967656e506f644d616e616765722e6164645368617265733a207368617265604482015273732063616e6e6f74206265206e6567617469766560601b6064820152608401610638565b610739633b9aca00836122f3565b156107ac5760405162461bcd60e51b815260206004820152603d60248201527f456967656e506f644d616e616765722e6164645368617265733a20736861726560448201527f73206d75737420626520612077686f6c65204777656920616d6f756e740000006064820152608401610638565b6001600160a01b0383166000908152609b6020526040812054906107d0848361231d565b6001600160a01b0386166000818152609b6020526040908190208390555191925090600080516020612eb38339815191529061080f9087815260200190565b60405180910390a2846001600160a01b03166000805160206125858339815191528260405161084091815260200190565b60405180910390a26108528282611b4d565b925050505b92915050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d4919061235e565b6001600160a01b0316336001600160a01b0316146109045760405162461bcd60e51b81526004016106389061237b565b61090d81611b8f565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c91906123c5565b6109985760405162461bcd60e51b8152600401610638906123e7565b60665481811614610a115760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610638565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600054610100900460ff1615808015610a6f5750600054600160ff909116105b80610a895750303b158015610a89575060005460ff166001145b610aec5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610638565b6000805460ff191660011790558015610b0f576000805461ff0019166101001790555b610b1884611c86565b610b228383611cd8565b8015610b68576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bb65760405162461bcd60e51b81526004016106389061227f565b6001600160a01b038316610c305760405162461bcd60e51b81526020600482015260476024820152600080516020612ed383398151915260448201527f546f6b656e733a20706f644f776e65722063616e6e6f74206265207a65726f206064820152666164647265737360c81b608482015260a401610638565b6001600160a01b038216610cad5760405162461bcd60e51b815260206004820152604a6024820152600080516020612ed383398151915260448201527f546f6b656e733a2064657374696e6174696f6e2063616e6e6f74206265207a65606482015269726f206164647265737360b01b608482015260a401610638565b6000811215610d1c5760405162461bcd60e51b81526020600482015260416024820152600080516020612ed383398151915260448201527f546f6b656e733a207368617265732063616e6e6f74206265206e6567617469766064820152606560f81b608482015260a401610638565b610d2a633b9aca00826122f3565b15610d9e5760405162461bcd60e51b815260206004820152604a6024820152600080516020612ed383398151915260448201527f546f6b656e733a20736861726573206d75737420626520612077686f6c6520476064820152691dd95a48185b5bdd5b9d60b21b608482015260a401610638565b6001600160a01b0383166000908152609b602052604081205490811215610f07576000610dca8261242f565b905080831115610e61576001600160a01b0385166000908152609b6020526040812055610df7818461244c565b9250846001600160a01b0316600080516020612eb383398151915282604051610e2291815260200190565b60405180910390a2846001600160a01b03166000805160206125858339815191526000604051610e5491815260200190565b60405180910390a2610f05565b6001600160a01b0385166000908152609b6020526040812054610e8590859061231d565b6001600160a01b0387166000818152609b6020526040908190208390555191925090600080516020612eb383398151915290610ec49087815260200190565b60405180910390a2856001600160a01b031660008051602061258583398151915282604051610ef591815260200190565b60405180910390a2505050505050565b505b6001600160a01b03848116600090815260986020526040908190205490516362483a2160e11b815285831660048201526024810185905291169063c490744290604401600060405180830381600087803b158015610f6457600080fd5b505af1158015610f78573d6000803e3d6000fd5b5050505050505050565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee91906123c5565b61100a5760405162461bcd60e51b8152600401610638906123e7565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b611051611dc2565b61105b6000611c86565b565b6066546000908190600190811614156110b45760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610638565b336000908152609860205260409020546001600160a01b0316156111365760405162461bcd60e51b815260206004820152603360248201527f456967656e506f644d616e616765722e637265617465506f643a2053656e64656044820152721c88185b1c9958591e481a185cc818481c1bd9606a1b6064820152608401610638565b6000611140611e1c565b9250505090565b6066546000906001908116141561119c5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610638565b336000908152609860205260409020546001600160a01b0316806111c5576111c2611e1c565b90505b6040516326d3918d60e21b81526001600160a01b03821690639b4e46349034906111fb908b908b908b908b908b9060040161248c565b6000604051808303818588803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b038082166000908152609860205260408120549091168061085757611301836001600160a01b031660001b60405180610940016040528061090e81526020016125a561090e9139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091526000606082015260800160408051601f19818403018152908290526112e69291602001612501565b60405160208183030381529060405280519060200120611f81565b9392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113505760405162461bcd60e51b81526004016106389061227f565b60008112156113c75760405162461bcd60e51b815260206004820152603760248201527f456967656e506f644d616e616765722e72656d6f76655368617265733a20736860448201527f617265732063616e6e6f74206265206e656761746976650000000000000000006064820152608401610638565b6113d5633b9aca00826122f3565b1561144a576040805162461bcd60e51b81526020600482015260248101919091527f456967656e506f644d616e616765722e72656d6f76655368617265733a20736860448201527f61726573206d75737420626520612077686f6c65204777656920616d6f756e746064820152608401610638565b6001600160a01b0382166000908152609b602052604081205461146e908390612516565b905060008112156114ff5760405162461bcd60e51b815260206004820152604f60248201527f456967656e506f644d616e616765722e72656d6f76655368617265733a20636160448201527f6e6e6f7420726573756c7420696e20706f64206f776e657220686176696e672060648201526e6e656761746976652073686172657360881b608482015260a401610638565b6001600160a01b0383166000818152609b602052604090819020839055516000805160206125858339815191529061153a9084815260200190565b60405180910390a2505050565b6001600160a01b0380831660009081526098602052604090205483911633146115c25760405162461bcd60e51b815260206004820152602760248201527f456967656e506f644d616e616765722e6f6e6c79456967656e506f643a206e6f6044820152661d0818481c1bd960ca1b6064820152608401610638565b600260c95414156116155760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610638565b600260c9556001600160a01b0383166116b15760405162461bcd60e51b815260206004820152605260248201527f456967656e506f644d616e616765722e7265636f7264426561636f6e4368616960448201527f6e45544842616c616e63655570646174653a20706f644f776e65722063616e6e6064820152716f74206265207a65726f206164647265737360701b608482015260a401610638565b6116bf633b9aca0083612555565b156117585760405162461bcd60e51b815260206004820152605a60248201527f456967656e506f644d616e616765722e7265636f7264426561636f6e4368616960448201527f6e45544842616c616e63655570646174653a2073686172657344656c7461206d60648201527f75737420626520612077686f6c65204777656920616d6f756e74000000000000608482015260a401610638565b6001600160a01b0383166000908152609b60205260408120549061177c848361231d565b6001600160a01b0386166000908152609b602052604081208290559091506117a48383611b4d565b9050801561190c57600081121561186f576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663132d49678773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06118038561242f565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561185257600080fd5b505af1158015611866573d6000803e3d6000fd5b5050505061190c565b604051631452b9d760e11b81526001600160a01b03878116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906328a573ae90606401600060405180830381600087803b1580156118f357600080fd5b505af1158015611907573d6000803e3d6000fd5b505050505b856001600160a01b0316600080516020612eb38339815191528660405161193591815260200190565b60405180910390a2856001600160a01b03166000805160206125858339815191528360405161196691815260200190565b60405180910390a25050600160c95550505050565b611983611dc2565b6001600160a01b0381166119e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610638565b61090d81611c86565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a68919061235e565b6001600160a01b0316336001600160a01b031614611a985760405162461bcd60e51b81526004016106389061237b565b606654198119606654191614611b165760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610638565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610a44565b6000808313611b6d5760008213611b6657506000610857565b5080610857565b60008213611b8557611b7e8361242f565b9050610857565b611b7e8383612516565b6001600160a01b038116611c1d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610638565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6065546001600160a01b0316158015611cf957506001600160a01b03821615155b611d7b5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610638565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2611dbe82611b8f565b5050565b6033546001600160a01b0316331461105b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610638565b6000609960008154611e2d90612569565b9091555060408051610940810190915261090e808252600091611ecc91839133916125a56020830139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091526000606082015260800160408051601f1981840301815290829052611eb89291602001612501565b604051602081830303815290604052611fdd565b60405163189acdbd60e31b81523360048201529091506001600160a01b0382169063c4d66de890602401600060405180830381600087803b158015611f1057600080fd5b505af1158015611f24573d6000803e3d6000fd5b50503360008181526098602052604080822080546001600160a01b0319166001600160a01b038816908117909155905192945092507f21c99d0db02213c32fff5b05cf0a718ab5f858802b91498f80d82270289d856a91a3919050565b604080516001600160f81b03196020808301919091526bffffffffffffffffffffffff193060601b1660218301526035820185905260558083018590528351808403909101815260759092019092528051910120600090611301565b600080844710156120305760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610638565b825161207e5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610638565b8383516020850187f590506001600160a01b0381166120df5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610638565b949350505050565b6001600160a01b038116811461090d57600080fd5b6000806040838503121561210f57600080fd5b823561211a816120e7565b946020939093013593505050565b60006020828403121561213a57600080fd5b8135611301816120e7565b60006020828403121561215757600080fd5b5035919050565b60008060006060848603121561217357600080fd5b833561217e816120e7565b9250602084013561218e816120e7565b929592945050506040919091013590565b6000602082840312156121b157600080fd5b813560ff8116811461130157600080fd5b60008083601f8401126121d457600080fd5b50813567ffffffffffffffff8111156121ec57600080fd5b60208301915083602082850101111561220457600080fd5b9250929050565b60008060008060006060868803121561222357600080fd5b853567ffffffffffffffff8082111561223b57600080fd5b61224789838a016121c2565b9097509550602088013591508082111561226057600080fd5b5061226d888289016121c2565b96999598509660400135949350505050565b602080825260409082018190527f456967656e506f644d616e616765722e6f6e6c7944656c65676174696f6e4d61908201527f6e616765723a206e6f74207468652044656c65676174696f6e4d616e61676572606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612302576123026122dd565b500690565b634e487b7160e01b600052601160045260246000fd5b600080821280156001600160ff1b038490038513161561233f5761233f612307565b600160ff1b839003841281161561235857612358612307565b50500190565b60006020828403121561237057600080fd5b8151611301816120e7565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b6000602082840312156123d757600080fd5b8151801515811461130157600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000600160ff1b82141561244557612445612307565b5060000390565b60008282101561245e5761245e612307565b500390565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006124a0606083018789612463565b82810360208401526124b3818688612463565b9150508260408301529695505050505050565b6000815160005b818110156124e757602081850181015186830152016124cd565b818111156124f6576000828601525b509290920192915050565b60006120df61251083866124c6565b846124c6565b60008083128015600160ff1b85018412161561253457612534612307565b6001600160ff1b038401831381161561254f5761254f612307565b50500390565b600082612564576125646122dd565b500790565b600060001982141561257d5761257d612307565b506001019056fed4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe077098608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65644e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c6193456967656e506f644d616e616765722e77697468647261775368617265734173a26469706673582212202454e91799092d350508ebebd76b76ca89082fc35a4679aff09bb04f6433660d64736f6c634300080c0033", } // EigenPodManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenStrategy/binding.go b/pkg/bindings/EigenStrategy/binding.go index 2070a2d17..adf0970d6 100644 --- a/pkg/bindings/EigenStrategy/binding.go +++ b/pkg/bindings/EigenStrategy/binding.go @@ -32,7 +32,7 @@ var ( // EigenStrategyMetaData contains all meta data concerning the EigenStrategy contract. var EigenStrategyMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigen\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_EIGEN\",\"type\":\"address\",\"internalType\":\"contractIEigen\"},{\"name\":\"_bEIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162001dc338038062001dc3833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611c4a62000179600039600081816101af015281816105ac01528181610ad40152610b9f0152611c4a6000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80637a8b2637116100c3578063ce7c2ac21161007c578063ce7c2ac2146102da578063d9caed12146102ed578063e3dae51c14610300578063f3e7387514610313578063fabc1cbc14610326578063fdc371ce1461033957600080fd5b80637a8b263714610260578063886f1195146102735780638c8710191461028c5780638f6a62401461029f578063ab5921e1146102b2578063c0c53b8b146102c757600080fd5b806347e7ef241161011557806347e7ef24146101e8578063485cc955146101fb578063553ca5f81461020e578063595c6a67146102215780635ac86ab7146102295780635c975abb1461025857600080fd5b806310d67a2f14610152578063136439dd146101675780632495a5991461017a57806339b70e38146101aa5780633a98ef39146101d1575b600080fd5b61016561016036600461181e565b61034c565b005b61016561017536600461183b565b610408565b60325461018d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61018d7f000000000000000000000000000000000000000000000000000000000000000081565b6101da60335481565b6040519081526020016101a1565b6101da6101f6366004611854565b61054c565b610165610209366004611880565b610790565b6101da61021c36600461181e565b61085e565b610165610872565b6102486102373660046118c8565b6001805460ff9092161b9081161490565b60405190151581526020016101a1565b6001546101da565b6101da61026e36600461183b565b61093e565b60005461018d906201000090046001600160a01b031681565b6101da61029a36600461183b565b610989565b6101da6102ad36600461181e565b610994565b6102ba6109a2565b6040516101a19190611911565b6101656102d5366004611944565b6109c2565b6101da6102e836600461181e565b610aac565b6101656102fb36600461198f565b610b41565b6101da61030e36600461183b565b610d27565b6101da61032136600461183b565b610d60565b61016561033436600461183b565b610d6b565b60645461018d906001600160a01b031681565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c391906119d0565b6001600160a01b0316336001600160a01b0316146103fc5760405162461bcd60e51b81526004016103f3906119ed565b60405180910390fd5b61040581610ec7565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104799190611a37565b6104955760405162461bcd60e51b81526004016103f390611a59565b6001548181161461050e5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016103f3565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600180546000918291811614156105a15760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103f3565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106195760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103f3565b6106238484610fcc565b60335460006106346103e883611ab7565b905060006103e86106436110e0565b61064d9190611ab7565b9050600061065b8783611acf565b9050806106688489611ae6565b6106729190611b05565b9550856106d85760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b60648201526084016103f3565b6106e28685611ab7565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561076c5760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f534841524553600000000060648201526084016103f3565b610785826103e86033546107809190611ab7565b611152565b505050505092915050565b600054610100900460ff16158080156107b05750600054600160ff909116105b806107ca5750303b1580156107ca575060005460ff166001145b6107e65760405162461bcd60e51b81526004016103f390611b27565b6000805460ff191660011790558015610809576000805461ff0019166101001790555b61081383836111a6565b8015610859576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b600061086c61026e83610aac565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e39190611a37565b6108ff5760405162461bcd60e51b81526004016103f390611a59565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e86033546109519190611ab7565b905060006103e86109606110e0565b61096a9190611ab7565b9050816109778583611ae6565b6109819190611b05565b949350505050565b600061086c82610d27565b600061086c61032183610aac565b60606040518060800160405280604d8152602001611bc8604d9139905090565b600054610100900460ff16158080156109e25750600054600160ff909116105b806109fc5750303b1580156109fc575060005460ff166001145b610a185760405162461bcd60e51b81526004016103f390611b27565b6000805460ff191660011790558015610a3b576000805461ff0019166101001790555b606480546001600160a01b0319166001600160a01b038616179055610a6083836111a6565b8015610aa6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190611b75565b6001805460029081161415610b945760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103f3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c0c5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103f3565b610c178484846112f1565b60335480831115610ca65760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a4016103f3565b6000610cb46103e883611ab7565b905060006103e8610cc36110e0565b610ccd9190611ab7565b9050600082610cdc8784611ae6565b610ce69190611b05565b9050610cf28685611acf565b603355610d12610d028284611acf565b6103e86033546107809190611ab7565b610d1d88888361138c565b5050505050505050565b6000806103e8603354610d3a9190611ab7565b905060006103e8610d496110e0565b610d539190611ab7565b9050806109778386611ae6565b600061086c8261093e565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de291906119d0565b6001600160a01b0316336001600160a01b031614610e125760405162461bcd60e51b81526004016103f3906119ed565b600154198119600154191614610e905760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016103f3565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610541565b6001600160a01b038116610f555760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016103f3565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6032546001600160a01b0383811691161480610ff557506064546001600160a01b038381169116145b6110675760405162461bcd60e51b815260206004820152603760248201527f456967656e53747261746567792e6465706f7369743a2043616e206f6e6c792060448201527f6465706f7369742062454947454e206f7220454947454e00000000000000000060648201526084016103f3565b6064546001600160a01b03838116911614156110dc57606454604051636f074d1f60e11b8152600481018390526001600160a01b039091169063de0e9a3e90602401600060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050505b5050565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114d9190611b75565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be88161118684670de0b6b3a7640000611ae6565b6111909190611b05565b6040519081526020015b60405180910390a15050565b600054610100900460ff166112115760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103f3565b603280546001600160a01b0319166001600160a01b03841617905561123781600061148d565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d09190611b8e565b604080516001600160a01b03909316835260ff90911660208301520161119a565b6032546001600160a01b038381169116148061131a57506064546001600160a01b038381169116145b6108595760405162461bcd60e51b815260206004820152603960248201527f456967656e53747261746567792e77697468647261773a2043616e206f6e6c7960448201527f2077697468647261772062454947454e206f7220454947454e0000000000000060648201526084016103f3565b6064546001600160a01b03838116911614156114795760325460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303816000875af11580156113f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114199190611a37565b50606454604051630ea598cb60e41b8152600481018390526001600160a01b039091169063ea598cb090602401600060405180830381600087803b15801561146057600080fd5b505af1158015611474573d6000803e3d6000fd5b505050505b6108596001600160a01b0383168483611579565b6000546201000090046001600160a01b03161580156114b457506001600160a01b03821615155b6115365760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016103f3565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26110dc82610ec7565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261085992869291600091611609918516908490611686565b80519091501561085957808060200190518101906116279190611a37565b6108595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103f3565b6060611695848460008561169f565b90505b9392505050565b6060824710156117005760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103f3565b6001600160a01b0385163b6117575760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103f3565b600080866001600160a01b031685876040516117739190611bab565b60006040518083038185875af1925050503d80600081146117b0576040519150601f19603f3d011682016040523d82523d6000602084013e6117b5565b606091505b50915091506117c58282866117d0565b979650505050505050565b606083156117df575081611698565b8251156117ef5782518084602001fd5b8160405162461bcd60e51b81526004016103f39190611911565b6001600160a01b038116811461040557600080fd5b60006020828403121561183057600080fd5b813561169881611809565b60006020828403121561184d57600080fd5b5035919050565b6000806040838503121561186757600080fd5b823561187281611809565b946020939093013593505050565b6000806040838503121561189357600080fd5b823561189e81611809565b915060208301356118ae81611809565b809150509250929050565b60ff8116811461040557600080fd5b6000602082840312156118da57600080fd5b8135611698816118b9565b60005b838110156119005781810151838201526020016118e8565b83811115610aa65750506000910152565b60208152600082518060208401526119308160408501602087016118e5565b601f01601f19169190910160400192915050565b60008060006060848603121561195957600080fd5b833561196481611809565b9250602084013561197481611809565b9150604084013561198481611809565b809150509250925092565b6000806000606084860312156119a457600080fd5b83356119af81611809565b925060208401356119bf81611809565b929592945050506040919091013590565b6000602082840312156119e257600080fd5b815161169881611809565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611a4957600080fd5b8151801515811461169857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611aca57611aca611aa1565b500190565b600082821015611ae157611ae1611aa1565b500390565b6000816000190483118215151615611b0057611b00611aa1565b500290565b600082611b2257634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208284031215611b8757600080fd5b5051919050565b600060208284031215611ba057600080fd5b8151611698816118b9565b60008251611bbd8184602087016118e5565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a26469706673582212209f0a5f3b361d82437f0c321794900a7aead1b85f77f12d7038cbafbf9ebeb3f164736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b5060405162001dc338038062001dc3833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611c4a62000179600039600081816101af015281816105ac01528181610ad40152610b9f0152611c4a6000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80637a8b2637116100c3578063ce7c2ac21161007c578063ce7c2ac2146102da578063d9caed12146102ed578063e3dae51c14610300578063f3e7387514610313578063fabc1cbc14610326578063fdc371ce1461033957600080fd5b80637a8b263714610260578063886f1195146102735780638c8710191461028c5780638f6a62401461029f578063ab5921e1146102b2578063c0c53b8b146102c757600080fd5b806347e7ef241161011557806347e7ef24146101e8578063485cc955146101fb578063553ca5f81461020e578063595c6a67146102215780635ac86ab7146102295780635c975abb1461025857600080fd5b806310d67a2f14610152578063136439dd146101675780632495a5991461017a57806339b70e38146101aa5780633a98ef39146101d1575b600080fd5b61016561016036600461181e565b61034c565b005b61016561017536600461183b565b610408565b60325461018d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61018d7f000000000000000000000000000000000000000000000000000000000000000081565b6101da60335481565b6040519081526020016101a1565b6101da6101f6366004611854565b61054c565b610165610209366004611880565b610790565b6101da61021c36600461181e565b61085e565b610165610872565b6102486102373660046118c8565b6001805460ff9092161b9081161490565b60405190151581526020016101a1565b6001546101da565b6101da61026e36600461183b565b61093e565b60005461018d906201000090046001600160a01b031681565b6101da61029a36600461183b565b610989565b6101da6102ad36600461181e565b610994565b6102ba6109a2565b6040516101a19190611911565b6101656102d5366004611944565b6109c2565b6101da6102e836600461181e565b610aac565b6101656102fb36600461198f565b610b41565b6101da61030e36600461183b565b610d27565b6101da61032136600461183b565b610d60565b61016561033436600461183b565b610d6b565b60645461018d906001600160a01b031681565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c391906119d0565b6001600160a01b0316336001600160a01b0316146103fc5760405162461bcd60e51b81526004016103f3906119ed565b60405180910390fd5b61040581610ec7565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104799190611a37565b6104955760405162461bcd60e51b81526004016103f390611a59565b6001548181161461050e5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016103f3565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600180546000918291811614156105a15760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103f3565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106195760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103f3565b6106238484610fcc565b60335460006106346103e883611ab7565b905060006103e86106436110e0565b61064d9190611ab7565b9050600061065b8783611acf565b9050806106688489611ae6565b6106729190611b05565b9550856106d85760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b60648201526084016103f3565b6106e28685611ab7565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561076c5760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f534841524553600000000060648201526084016103f3565b610785826103e86033546107809190611ab7565b611152565b505050505092915050565b600054610100900460ff16158080156107b05750600054600160ff909116105b806107ca5750303b1580156107ca575060005460ff166001145b6107e65760405162461bcd60e51b81526004016103f390611b27565b6000805460ff191660011790558015610809576000805461ff0019166101001790555b61081383836111a6565b8015610859576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b600061086c61026e83610aac565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e39190611a37565b6108ff5760405162461bcd60e51b81526004016103f390611a59565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e86033546109519190611ab7565b905060006103e86109606110e0565b61096a9190611ab7565b9050816109778583611ae6565b6109819190611b05565b949350505050565b600061086c82610d27565b600061086c61032183610aac565b60606040518060800160405280604d8152602001611bc8604d9139905090565b600054610100900460ff16158080156109e25750600054600160ff909116105b806109fc5750303b1580156109fc575060005460ff166001145b610a185760405162461bcd60e51b81526004016103f390611b27565b6000805460ff191660011790558015610a3b576000805461ff0019166101001790555b606480546001600160a01b0319166001600160a01b038616179055610a6083836111a6565b8015610aa6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190611b75565b6001805460029081161415610b945760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103f3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c0c5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103f3565b610c178484846112f1565b60335480831115610ca65760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a4016103f3565b6000610cb46103e883611ab7565b905060006103e8610cc36110e0565b610ccd9190611ab7565b9050600082610cdc8784611ae6565b610ce69190611b05565b9050610cf28685611acf565b603355610d12610d028284611acf565b6103e86033546107809190611ab7565b610d1d88888361138c565b5050505050505050565b6000806103e8603354610d3a9190611ab7565b905060006103e8610d496110e0565b610d539190611ab7565b9050806109778386611ae6565b600061086c8261093e565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de291906119d0565b6001600160a01b0316336001600160a01b031614610e125760405162461bcd60e51b81526004016103f3906119ed565b600154198119600154191614610e905760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016103f3565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610541565b6001600160a01b038116610f555760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016103f3565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6032546001600160a01b0383811691161480610ff557506064546001600160a01b038381169116145b6110675760405162461bcd60e51b815260206004820152603760248201527f456967656e53747261746567792e6465706f7369743a2043616e206f6e6c792060448201527f6465706f7369742062454947454e206f7220454947454e00000000000000000060648201526084016103f3565b6064546001600160a01b03838116911614156110dc57606454604051636f074d1f60e11b8152600481018390526001600160a01b039091169063de0e9a3e90602401600060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050505b5050565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114d9190611b75565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be88161118684670de0b6b3a7640000611ae6565b6111909190611b05565b6040519081526020015b60405180910390a15050565b600054610100900460ff166112115760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103f3565b603280546001600160a01b0319166001600160a01b03841617905561123781600061148d565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d09190611b8e565b604080516001600160a01b03909316835260ff90911660208301520161119a565b6032546001600160a01b038381169116148061131a57506064546001600160a01b038381169116145b6108595760405162461bcd60e51b815260206004820152603960248201527f456967656e53747261746567792e77697468647261773a2043616e206f6e6c7960448201527f2077697468647261772062454947454e206f7220454947454e0000000000000060648201526084016103f3565b6064546001600160a01b03838116911614156114795760325460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303816000875af11580156113f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114199190611a37565b50606454604051630ea598cb60e41b8152600481018390526001600160a01b039091169063ea598cb090602401600060405180830381600087803b15801561146057600080fd5b505af1158015611474573d6000803e3d6000fd5b505050505b6108596001600160a01b0383168483611579565b6000546201000090046001600160a01b03161580156114b457506001600160a01b03821615155b6115365760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016103f3565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26110dc82610ec7565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261085992869291600091611609918516908490611686565b80519091501561085957808060200190518101906116279190611a37565b6108595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103f3565b6060611695848460008561169f565b90505b9392505050565b6060824710156117005760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103f3565b6001600160a01b0385163b6117575760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103f3565b600080866001600160a01b031685876040516117739190611bab565b60006040518083038185875af1925050503d80600081146117b0576040519150601f19603f3d011682016040523d82523d6000602084013e6117b5565b606091505b50915091506117c58282866117d0565b979650505050505050565b606083156117df575081611698565b8251156117ef5782518084602001fd5b8160405162461bcd60e51b81526004016103f39190611911565b6001600160a01b038116811461040557600080fd5b60006020828403121561183057600080fd5b813561169881611809565b60006020828403121561184d57600080fd5b5035919050565b6000806040838503121561186757600080fd5b823561187281611809565b946020939093013593505050565b6000806040838503121561189357600080fd5b823561189e81611809565b915060208301356118ae81611809565b809150509250929050565b60ff8116811461040557600080fd5b6000602082840312156118da57600080fd5b8135611698816118b9565b60005b838110156119005781810151838201526020016118e8565b83811115610aa65750506000910152565b60208152600082518060208401526119308160408501602087016118e5565b601f01601f19169190910160400192915050565b60008060006060848603121561195957600080fd5b833561196481611809565b9250602084013561197481611809565b9150604084013561198481611809565b809150509250925092565b6000806000606084860312156119a457600080fd5b83356119af81611809565b925060208401356119bf81611809565b929592945050506040919091013590565b6000602082840312156119e257600080fd5b815161169881611809565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611a4957600080fd5b8151801515811461169857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611aca57611aca611aa1565b500190565b600082821015611ae157611ae1611aa1565b500390565b6000816000190483118215151615611b0057611b00611aa1565b500290565b600082611b2257634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208284031215611b8757600080fd5b5051919050565b600060208284031215611ba057600080fd5b8151611698816118b9565b60008251611bbd8184602087016118e5565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a264697066735822122057eeb9787b08bedf5d1ece4fb5c83daae09b7ad33f6f34c84493766c52f550c964736f6c634300080c0033", } // EigenStrategyABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Endian/binding.go b/pkg/bindings/Endian/binding.go index b9f7ef348..bed1272f1 100644 --- a/pkg/bindings/Endian/binding.go +++ b/pkg/bindings/Endian/binding.go @@ -32,7 +32,7 @@ var ( // EndianMetaData contains all meta data concerning the Endian contract. var EndianMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220731750cc39c1118f2ee5b7230bba50321789b805b1844817687dc7c3931262f964736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203370f183aff96d49f7c464761937e65557165c01ae442bd50ab1d5362bea753364736f6c634300080c0033", } // EndianABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/IAVSDirectory/binding.go b/pkg/bindings/IAVSDirectory/binding.go index 6ee8f3ce0..062259c2f 100644 --- a/pkg/bindings/IAVSDirectory/binding.go +++ b/pkg/bindings/IAVSDirectory/binding.go @@ -38,7 +38,7 @@ type ISignatureUtilsSignatureWithSaltAndExpiry struct { // IAVSDirectoryMetaData contains all meta data concerning the IAVSDirectory contract. var IAVSDirectoryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelSalt\",\"inputs\":[{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectory.OperatorAVSRegistrationStatus\"}],\"anonymous\":false}]", } // IAVSDirectoryABI is the input ABI used to generate the binding from. @@ -249,6 +249,37 @@ func (_IAVSDirectory *IAVSDirectoryCallerSession) CalculateOperatorAVSRegistrati return _IAVSDirectory.Contract.CalculateOperatorAVSRegistrationDigestHash(&_IAVSDirectory.CallOpts, operator, avs, salt, expiry) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IAVSDirectory *IAVSDirectoryCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IAVSDirectory.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IAVSDirectory *IAVSDirectorySession) DomainSeparator() ([32]byte, error) { + return _IAVSDirectory.Contract.DomainSeparator(&_IAVSDirectory.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IAVSDirectory *IAVSDirectoryCallerSession) DomainSeparator() ([32]byte, error) { + return _IAVSDirectory.Contract.DomainSeparator(&_IAVSDirectory.CallOpts) +} + // OperatorSaltIsSpent is a free data retrieval call binding the contract method 0x374823b5. // // Solidity: function operatorSaltIsSpent(address operator, bytes32 salt) view returns(bool) @@ -280,6 +311,27 @@ func (_IAVSDirectory *IAVSDirectoryCallerSession) OperatorSaltIsSpent(operator c return _IAVSDirectory.Contract.OperatorSaltIsSpent(&_IAVSDirectory.CallOpts, operator, salt) } +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_IAVSDirectory *IAVSDirectoryTransactor) CancelSalt(opts *bind.TransactOpts, salt [32]byte) (*types.Transaction, error) { + return _IAVSDirectory.contract.Transact(opts, "cancelSalt", salt) +} + +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_IAVSDirectory *IAVSDirectorySession) CancelSalt(salt [32]byte) (*types.Transaction, error) { + return _IAVSDirectory.Contract.CancelSalt(&_IAVSDirectory.TransactOpts, salt) +} + +// CancelSalt is a paid mutator transaction binding the contract method 0xec76f442. +// +// Solidity: function cancelSalt(bytes32 salt) returns() +func (_IAVSDirectory *IAVSDirectoryTransactorSession) CancelSalt(salt [32]byte) (*types.Transaction, error) { + return _IAVSDirectory.Contract.CancelSalt(&_IAVSDirectory.TransactOpts, salt) +} + // DeregisterOperatorFromAVS is a paid mutator transaction binding the contract method 0xa364f4da. // // Solidity: function deregisterOperatorFromAVS(address operator) returns() diff --git a/pkg/bindings/IBackingEigen/binding.go b/pkg/bindings/IBackingEigen/binding.go index bc72362ae..bdca29fd8 100644 --- a/pkg/bindings/IBackingEigen/binding.go +++ b/pkg/bindings/IBackingEigen/binding.go @@ -31,7 +31,7 @@ var ( // IBackingEigenMetaData contains all meta data concerning the IBackingEigen contract. var IBackingEigenMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burn\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setIsMinter\",\"inputs\":[{\"name\":\"minterAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newStatus\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", } // IBackingEigenABI is the input ABI used to generate the binding from. @@ -211,6 +211,37 @@ func (_IBackingEigen *IBackingEigenCallerSession) CLOCKMODE() (string, error) { return _IBackingEigen.Contract.CLOCKMODE(&_IBackingEigen.CallOpts) } +// EIGEN is a free data retrieval call binding the contract method 0xfdc371ce. +// +// Solidity: function EIGEN() view returns(address) +func (_IBackingEigen *IBackingEigenCaller) EIGEN(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IBackingEigen.contract.Call(opts, &out, "EIGEN") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// EIGEN is a free data retrieval call binding the contract method 0xfdc371ce. +// +// Solidity: function EIGEN() view returns(address) +func (_IBackingEigen *IBackingEigenSession) EIGEN() (common.Address, error) { + return _IBackingEigen.Contract.EIGEN(&_IBackingEigen.CallOpts) +} + +// EIGEN is a free data retrieval call binding the contract method 0xfdc371ce. +// +// Solidity: function EIGEN() view returns(address) +func (_IBackingEigen *IBackingEigenCallerSession) EIGEN() (common.Address, error) { + return _IBackingEigen.Contract.EIGEN(&_IBackingEigen.CallOpts) +} + // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) @@ -335,6 +366,37 @@ func (_IBackingEigen *IBackingEigenCallerSession) TotalSupply() (*big.Int, error return _IBackingEigen.Contract.TotalSupply(&_IBackingEigen.CallOpts) } +// TransferRestrictionsDisabledAfter is a free data retrieval call binding the contract method 0x9aec4bae. +// +// Solidity: function transferRestrictionsDisabledAfter() view returns(uint256) +func (_IBackingEigen *IBackingEigenCaller) TransferRestrictionsDisabledAfter(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IBackingEigen.contract.Call(opts, &out, "transferRestrictionsDisabledAfter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TransferRestrictionsDisabledAfter is a free data retrieval call binding the contract method 0x9aec4bae. +// +// Solidity: function transferRestrictionsDisabledAfter() view returns(uint256) +func (_IBackingEigen *IBackingEigenSession) TransferRestrictionsDisabledAfter() (*big.Int, error) { + return _IBackingEigen.Contract.TransferRestrictionsDisabledAfter(&_IBackingEigen.CallOpts) +} + +// TransferRestrictionsDisabledAfter is a free data retrieval call binding the contract method 0x9aec4bae. +// +// Solidity: function transferRestrictionsDisabledAfter() view returns(uint256) +func (_IBackingEigen *IBackingEigenCallerSession) TransferRestrictionsDisabledAfter() (*big.Int, error) { + return _IBackingEigen.Contract.TransferRestrictionsDisabledAfter(&_IBackingEigen.CallOpts) +} + // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) @@ -356,6 +418,27 @@ func (_IBackingEigen *IBackingEigenTransactorSession) Approve(spender common.Add return _IBackingEigen.Contract.Approve(&_IBackingEigen.TransactOpts, spender, amount) } +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_IBackingEigen *IBackingEigenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.contract.Transact(opts, "burn", amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_IBackingEigen *IBackingEigenSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.Contract.Burn(&_IBackingEigen.TransactOpts, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns() +func (_IBackingEigen *IBackingEigenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.Contract.Burn(&_IBackingEigen.TransactOpts, amount) +} + // DisableTransferRestrictions is a paid mutator transaction binding the contract method 0xeb415f45. // // Solidity: function disableTransferRestrictions() returns() @@ -377,6 +460,48 @@ func (_IBackingEigen *IBackingEigenTransactorSession) DisableTransferRestriction return _IBackingEigen.Contract.DisableTransferRestrictions(&_IBackingEigen.TransactOpts) } +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_IBackingEigen *IBackingEigenTransactor) Initialize(opts *bind.TransactOpts, initialOwner common.Address) (*types.Transaction, error) { + return _IBackingEigen.contract.Transact(opts, "initialize", initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_IBackingEigen *IBackingEigenSession) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _IBackingEigen.Contract.Initialize(&_IBackingEigen.TransactOpts, initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_IBackingEigen *IBackingEigenTransactorSession) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _IBackingEigen.Contract.Initialize(&_IBackingEigen.TransactOpts, initialOwner) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_IBackingEigen *IBackingEigenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.contract.Transact(opts, "mint", to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_IBackingEigen *IBackingEigenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.Contract.Mint(&_IBackingEigen.TransactOpts, to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_IBackingEigen *IBackingEigenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IBackingEigen.Contract.Mint(&_IBackingEigen.TransactOpts, to, amount) +} + // SetAllowedFrom is a paid mutator transaction binding the contract method 0x1ffacdef. // // Solidity: function setAllowedFrom(address from, bool isAllowedFrom) returns() @@ -419,6 +544,27 @@ func (_IBackingEigen *IBackingEigenTransactorSession) SetAllowedTo(to common.Add return _IBackingEigen.Contract.SetAllowedTo(&_IBackingEigen.TransactOpts, to, isAllowedTo) } +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_IBackingEigen *IBackingEigenTransactor) SetIsMinter(opts *bind.TransactOpts, minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _IBackingEigen.contract.Transact(opts, "setIsMinter", minterAddress, newStatus) +} + +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_IBackingEigen *IBackingEigenSession) SetIsMinter(minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _IBackingEigen.Contract.SetIsMinter(&_IBackingEigen.TransactOpts, minterAddress, newStatus) +} + +// SetIsMinter is a paid mutator transaction binding the contract method 0x66eb399f. +// +// Solidity: function setIsMinter(address minterAddress, bool newStatus) returns() +func (_IBackingEigen *IBackingEigenTransactorSession) SetIsMinter(minterAddress common.Address, newStatus bool) (*types.Transaction, error) { + return _IBackingEigen.Contract.SetIsMinter(&_IBackingEigen.TransactOpts, minterAddress, newStatus) +} + // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) diff --git a/pkg/bindings/IDelegationManager/binding.go b/pkg/bindings/IDelegationManager/binding.go index 3d9a84301..ccb417d40 100644 --- a/pkg/bindings/IDelegationManager/binding.go +++ b/pkg/bindings/IDelegationManager/binding.go @@ -62,7 +62,7 @@ type ISignatureUtilsSignatureWithExpiry struct { // IDelegationManagerMetaData contains all meta data concerning the IDelegationManager contract. var IDelegationManagerMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKER_DELEGATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCurrentStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_stakerNonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"middlewareTimesIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"middlewareTimesIndexes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateToBySignature\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalDelay\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"queuedWithdrawalParams\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"registeringOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakerNonce\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerOptOutWindowBlocks\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MinWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDetailsModified\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKER_DELEGATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCurrentStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateStakerDelegationDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_stakerNonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"middlewareTimesIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"middlewareTimesIndexes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateToBySignature\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"_delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDelegatableShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalDelay\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"queuedWithdrawalParams\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManager.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"registeringOperatorDetails\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"newMinWithdrawalDelayBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"withdrawalDelayBlocks\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakerNonce\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerOptOutWindowBlocks\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWithdrawalDelayBlocks\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MinWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDetailsModified\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOperatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDetails\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.OperatorDetails\",\"components\":[{\"name\":\"__deprecated_earningsReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stakerOptOutWindowBlocks\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWithdrawalDelayBlocksSet\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManager.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false}]", } // IDelegationManagerABI is the input ABI used to generate the binding from. @@ -614,6 +614,38 @@ func (_IDelegationManager *IDelegationManagerCallerSession) DomainSeparator() ([ return _IDelegationManager.Contract.DomainSeparator(&_IDelegationManager.CallOpts) } +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_IDelegationManager *IDelegationManagerCaller) GetDelegatableShares(opts *bind.CallOpts, staker common.Address) ([]common.Address, []*big.Int, error) { + var out []interface{} + err := _IDelegationManager.contract.Call(opts, &out, "getDelegatableShares", staker) + + if err != nil { + return *new([]common.Address), *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return out0, out1, err + +} + +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_IDelegationManager *IDelegationManagerSession) GetDelegatableShares(staker common.Address) ([]common.Address, []*big.Int, error) { + return _IDelegationManager.Contract.GetDelegatableShares(&_IDelegationManager.CallOpts, staker) +} + +// GetDelegatableShares is a free data retrieval call binding the contract method 0xcf80873e. +// +// Solidity: function getDelegatableShares(address staker) view returns(address[], uint256[]) +func (_IDelegationManager *IDelegationManagerCallerSession) GetDelegatableShares(staker common.Address) ([]common.Address, []*big.Int, error) { + return _IDelegationManager.Contract.GetDelegatableShares(&_IDelegationManager.CallOpts, staker) +} + // GetOperatorShares is a free data retrieval call binding the contract method 0x90041347. // // Solidity: function getOperatorShares(address operator, address[] strategies) view returns(uint256[]) @@ -1113,6 +1145,48 @@ func (_IDelegationManager *IDelegationManagerTransactorSession) RegisterAsOperat return _IDelegationManager.Contract.RegisterAsOperator(&_IDelegationManager.TransactOpts, registeringOperatorDetails, metadataURI) } +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerTransactor) SetMinWithdrawalDelayBlocks(opts *bind.TransactOpts, newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _IDelegationManager.contract.Transact(opts, "setMinWithdrawalDelayBlocks", newMinWithdrawalDelayBlocks) +} + +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerSession) SetMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _IDelegationManager.Contract.SetMinWithdrawalDelayBlocks(&_IDelegationManager.TransactOpts, newMinWithdrawalDelayBlocks) +} + +// SetMinWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x635bbd10. +// +// Solidity: function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerTransactorSession) SetMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks *big.Int) (*types.Transaction, error) { + return _IDelegationManager.Contract.SetMinWithdrawalDelayBlocks(&_IDelegationManager.TransactOpts, newMinWithdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerTransactor) SetStrategyWithdrawalDelayBlocks(opts *bind.TransactOpts, strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _IDelegationManager.contract.Transact(opts, "setStrategyWithdrawalDelayBlocks", strategies, withdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerSession) SetStrategyWithdrawalDelayBlocks(strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _IDelegationManager.Contract.SetStrategyWithdrawalDelayBlocks(&_IDelegationManager.TransactOpts, strategies, withdrawalDelayBlocks) +} + +// SetStrategyWithdrawalDelayBlocks is a paid mutator transaction binding the contract method 0x1522bf02. +// +// Solidity: function setStrategyWithdrawalDelayBlocks(address[] strategies, uint256[] withdrawalDelayBlocks) returns() +func (_IDelegationManager *IDelegationManagerTransactorSession) SetStrategyWithdrawalDelayBlocks(strategies []common.Address, withdrawalDelayBlocks []*big.Int) (*types.Transaction, error) { + return _IDelegationManager.Contract.SetStrategyWithdrawalDelayBlocks(&_IDelegationManager.TransactOpts, strategies, withdrawalDelayBlocks) +} + // Undelegate is a paid mutator transaction binding the contract method 0xda8be864. // // Solidity: function undelegate(address staker) returns(bytes32[] withdrawalRoot) diff --git a/pkg/bindings/IEigen/binding.go b/pkg/bindings/IEigen/binding.go index a294ccb77..db6e40cee 100644 --- a/pkg/bindings/IEigen/binding.go +++ b/pkg/bindings/IEigen/binding.go @@ -31,7 +31,7 @@ var ( // IEigenMetaData contains all meta data concerning the IEigen contract. var IEigenMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unwrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bEIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burnExtraTokens\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unwrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", } // IEigenABI is the input ABI used to generate the binding from. @@ -242,6 +242,37 @@ func (_IEigen *IEigenCallerSession) Allowance(owner common.Address, spender comm return _IEigen.Contract.Allowance(&_IEigen.CallOpts, owner, spender) } +// BEIGEN is a free data retrieval call binding the contract method 0x3f4da4c6. +// +// Solidity: function bEIGEN() view returns(address) +func (_IEigen *IEigenCaller) BEIGEN(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IEigen.contract.Call(opts, &out, "bEIGEN") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BEIGEN is a free data retrieval call binding the contract method 0x3f4da4c6. +// +// Solidity: function bEIGEN() view returns(address) +func (_IEigen *IEigenSession) BEIGEN() (common.Address, error) { + return _IEigen.Contract.BEIGEN(&_IEigen.CallOpts) +} + +// BEIGEN is a free data retrieval call binding the contract method 0x3f4da4c6. +// +// Solidity: function bEIGEN() view returns(address) +func (_IEigen *IEigenCallerSession) BEIGEN() (common.Address, error) { + return _IEigen.Contract.BEIGEN(&_IEigen.CallOpts) +} + // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) @@ -356,6 +387,27 @@ func (_IEigen *IEigenTransactorSession) Approve(spender common.Address, amount * return _IEigen.Contract.Approve(&_IEigen.TransactOpts, spender, amount) } +// BurnExtraTokens is a paid mutator transaction binding the contract method 0x68fad504. +// +// Solidity: function burnExtraTokens() returns() +func (_IEigen *IEigenTransactor) BurnExtraTokens(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEigen.contract.Transact(opts, "burnExtraTokens") +} + +// BurnExtraTokens is a paid mutator transaction binding the contract method 0x68fad504. +// +// Solidity: function burnExtraTokens() returns() +func (_IEigen *IEigenSession) BurnExtraTokens() (*types.Transaction, error) { + return _IEigen.Contract.BurnExtraTokens(&_IEigen.TransactOpts) +} + +// BurnExtraTokens is a paid mutator transaction binding the contract method 0x68fad504. +// +// Solidity: function burnExtraTokens() returns() +func (_IEigen *IEigenTransactorSession) BurnExtraTokens() (*types.Transaction, error) { + return _IEigen.Contract.BurnExtraTokens(&_IEigen.TransactOpts) +} + // DisableTransferRestrictions is a paid mutator transaction binding the contract method 0xeb415f45. // // Solidity: function disableTransferRestrictions() returns() diff --git a/pkg/bindings/IRewardsCoordinator/binding.go b/pkg/bindings/IRewardsCoordinator/binding.go index caacc527a..253371411 100644 --- a/pkg/bindings/IRewardsCoordinator/binding.go +++ b/pkg/bindings/IRewardsCoordinator/binding.go @@ -77,7 +77,7 @@ type IRewardsCoordinatorTokenTreeMerkleLeaf struct { // IRewardsCoordinatorMetaData contains all meta data concerning the IRewardsCoordinator contract. var IRewardsCoordinatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmission\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalOperatorCommissionBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorCommissionBips\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalOperatorCommission\",\"inputs\":[{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalCommissionBipsSet\",\"inputs\":[{\"name\":\"oldGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmission\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalOperatorCommissionBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorCommissionBips\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalOperatorCommission\",\"inputs\":[{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalCommissionBipsSet\",\"inputs\":[{\"name\":\"oldGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", } // IRewardsCoordinatorABI is the input ABI used to generate the binding from. @@ -598,6 +598,37 @@ func (_IRewardsCoordinator *IRewardsCoordinatorCallerSession) CurrRewardsCalcula return _IRewardsCoordinator.Contract.CurrRewardsCalculationEndTimestamp(&_IRewardsCoordinator.CallOpts) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IRewardsCoordinator *IRewardsCoordinatorCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IRewardsCoordinator.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IRewardsCoordinator *IRewardsCoordinatorSession) DomainSeparator() ([32]byte, error) { + return _IRewardsCoordinator.Contract.DomainSeparator(&_IRewardsCoordinator.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IRewardsCoordinator *IRewardsCoordinatorCallerSession) DomainSeparator() ([32]byte, error) { + return _IRewardsCoordinator.Contract.DomainSeparator(&_IRewardsCoordinator.CallOpts) +} + // GetCurrentClaimableDistributionRoot is a free data retrieval call binding the contract method 0x0e9a53cf. // // Solidity: function getCurrentClaimableDistributionRoot() view returns((bytes32,uint32,uint32,bool)) diff --git a/pkg/bindings/IStrategyManager/binding.go b/pkg/bindings/IStrategyManager/binding.go index 5dc38621c..e8f313e7e 100644 --- a/pkg/bindings/IStrategyManager/binding.go +++ b/pkg/bindings/IStrategyManager/binding.go @@ -31,7 +31,7 @@ var ( // IStrategyManagerMetaData contains all meta data concerning the IStrategyManager contract. var IStrategyManagerMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyShares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"thirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdatedThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWhitelister\",\"inputs\":[{\"name\":\"newStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyShares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"thirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdatedThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", } // IStrategyManagerABI is the input ABI used to generate the binding from. @@ -211,6 +211,37 @@ func (_IStrategyManager *IStrategyManagerCallerSession) Delegation() (common.Add return _IStrategyManager.Contract.Delegation(&_IStrategyManager.CallOpts) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IStrategyManager *IStrategyManagerCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IStrategyManager.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IStrategyManager *IStrategyManagerSession) DomainSeparator() ([32]byte, error) { + return _IStrategyManager.Contract.DomainSeparator(&_IStrategyManager.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_IStrategyManager *IStrategyManagerCallerSession) DomainSeparator() ([32]byte, error) { + return _IStrategyManager.Contract.DomainSeparator(&_IStrategyManager.CallOpts) +} + // EigenPodManager is a free data retrieval call binding the contract method 0x4665bcda. // // Solidity: function eigenPodManager() view returns(address) @@ -586,6 +617,27 @@ func (_IStrategyManager *IStrategyManagerTransactorSession) RemoveStrategiesFrom return _IStrategyManager.Contract.RemoveStrategiesFromDepositWhitelist(&_IStrategyManager.TransactOpts, strategiesToRemoveFromWhitelist) } +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_IStrategyManager *IStrategyManagerTransactor) SetStrategyWhitelister(opts *bind.TransactOpts, newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _IStrategyManager.contract.Transact(opts, "setStrategyWhitelister", newStrategyWhitelister) +} + +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_IStrategyManager *IStrategyManagerSession) SetStrategyWhitelister(newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _IStrategyManager.Contract.SetStrategyWhitelister(&_IStrategyManager.TransactOpts, newStrategyWhitelister) +} + +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_IStrategyManager *IStrategyManagerTransactorSession) SetStrategyWhitelister(newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _IStrategyManager.Contract.SetStrategyWhitelister(&_IStrategyManager.TransactOpts, newStrategyWhitelister) +} + // SetThirdPartyTransfersForbidden is a paid mutator transaction binding the contract method 0x4e5a4263. // // Solidity: function setThirdPartyTransfersForbidden(address strategy, bool value) returns() diff --git a/pkg/bindings/Merkle/binding.go b/pkg/bindings/Merkle/binding.go index 93e82af72..f5596f3f7 100644 --- a/pkg/bindings/Merkle/binding.go +++ b/pkg/bindings/Merkle/binding.go @@ -32,7 +32,7 @@ var ( // MerkleMetaData contains all meta data concerning the Merkle contract. var MerkleMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220de4dce1b90fa553d4573afc57ce3ea0458378cac0669dc216b6be8ae471c99ea64736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ed0b5b7ede7d72a5392206db4e89d22f34b62d39ccbcb82ac05d59715c2a212364736f6c634300080c0033", } // MerkleABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Pausable/binding.go b/pkg/bindings/Pausable/binding.go index 744b7e84b..9a7452168 100644 --- a/pkg/bindings/Pausable/binding.go +++ b/pkg/bindings/Pausable/binding.go @@ -32,7 +32,7 @@ var ( // PausableMetaData contains all meta data concerning the Pausable contract. var PausableMetaData = &bind.MetaData{ ABI: "[{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x608060405234801561001057600080fd5b506107c2806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80635ac86ab71161005b5780635ac86ab7146100b25780635c975abb146100e6578063886f1195146100f7578063fabc1cbc1461012257600080fd5b806310d67a2f14610082578063136439dd14610097578063595c6a67146100aa575b600080fd5b61009561009036600461065b565b610135565b005b6100956100a536600461067f565b6101ef565b61009561032e565b6100d16100c0366004610698565b6001805460ff9092161b9081161490565b60405190151581526020015b60405180910390f35b6001546040519081526020016100dd565b60005461010a906001600160a01b031681565b6040516001600160a01b0390911681526020016100dd565b61009561013036600461067f565b6103f5565b60008054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa91906106bb565b6001600160a01b0316336001600160a01b0316146101e35760405162461bcd60e51b81526004016101da906106d8565b60405180910390fd5b6101ec8161054f565b50565b60005460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025b9190610722565b6102775760405162461bcd60e51b81526004016101da90610744565b600154818116146102f05760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016101da565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b60005460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039a9190610722565b6103b65760405162461bcd60e51b81526004016101da90610744565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b60008054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906106bb565b6001600160a01b0316336001600160a01b03161461049a5760405162461bcd60e51b81526004016101da906106d8565b6001541981196001541916146105185760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016101da565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610323565b6001600160a01b0381166105dd5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016101da565b600054604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811681146101ec57600080fd5b60006020828403121561066d57600080fd5b813561067881610646565b9392505050565b60006020828403121561069157600080fd5b5035919050565b6000602082840312156106aa57600080fd5b813560ff8116811461067857600080fd5b6000602082840312156106cd57600080fd5b815161067881610646565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60006020828403121561073457600080fd5b8151801515811461067857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b60608201526080019056fea26469706673582212202c2653223ee00d36dc739f8691b398adc60ad925c3636f4c4c9e100e9732974164736f6c634300080c0033", + Bin: "0x608060405234801561001057600080fd5b506107c2806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80635ac86ab71161005b5780635ac86ab7146100b25780635c975abb146100e6578063886f1195146100f7578063fabc1cbc1461012257600080fd5b806310d67a2f14610082578063136439dd14610097578063595c6a67146100aa575b600080fd5b61009561009036600461065b565b610135565b005b6100956100a536600461067f565b6101ef565b61009561032e565b6100d16100c0366004610698565b6001805460ff9092161b9081161490565b60405190151581526020015b60405180910390f35b6001546040519081526020016100dd565b60005461010a906001600160a01b031681565b6040516001600160a01b0390911681526020016100dd565b61009561013036600461067f565b6103f5565b60008054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa91906106bb565b6001600160a01b0316336001600160a01b0316146101e35760405162461bcd60e51b81526004016101da906106d8565b60405180910390fd5b6101ec8161054f565b50565b60005460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025b9190610722565b6102775760405162461bcd60e51b81526004016101da90610744565b600154818116146102f05760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016101da565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b60005460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039a9190610722565b6103b65760405162461bcd60e51b81526004016101da90610744565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b60008054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906106bb565b6001600160a01b0316336001600160a01b03161461049a5760405162461bcd60e51b81526004016101da906106d8565b6001541981196001541916146105185760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016101da565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610323565b6001600160a01b0381166105dd5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016101da565b600054604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811681146101ec57600080fd5b60006020828403121561066d57600080fd5b813561067881610646565b9392505050565b60006020828403121561069157600080fd5b5035919050565b6000602082840312156106aa57600080fd5b813560ff8116811461067857600080fd5b6000602082840312156106cd57600080fd5b815161067881610646565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60006020828403121561073457600080fd5b8151801515811461067857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b60608201526080019056fea264697066735822122049f5dab2250ef38c9b28992c0223fd8dc58469f10b5f57056f65aa039d8f711664736f6c634300080c0033", } // PausableABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/PauserRegistry/binding.go b/pkg/bindings/PauserRegistry/binding.go index bcfe873b2..a60ac52f6 100644 --- a/pkg/bindings/PauserRegistry/binding.go +++ b/pkg/bindings/PauserRegistry/binding.go @@ -32,7 +32,7 @@ var ( // PauserRegistryMetaData contains all meta data concerning the PauserRegistry contract. var PauserRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_pausers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_unpauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isPauser\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setIsPauser\",\"inputs\":[{\"name\":\"newPauser\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"canPause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnpauser\",\"inputs\":[{\"name\":\"newUnpauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpauser\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"PauserStatusChanged\",\"inputs\":[{\"name\":\"pauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"canPause\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnpauserChanged\",\"inputs\":[{\"name\":\"previousUnpauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newUnpauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false}]", - Bin: "0x608060405234801561001057600080fd5b5060405161077838038061077883398101604081905261002f91610263565b60005b82518110156100775761006583828151811061005057610050610339565b6020026020010151600161008860201b60201c565b8061006f8161034f565b915050610032565b506100818161015a565b5050610378565b6001600160a01b0382166100f95760405162461bcd60e51b815260206004820152602d60248201527f50617573657252656769737472792e5f7365745061757365723a207a65726f2060448201526c1859191c995cdcc81a5b9c1d5d609a1b60648201526084015b60405180910390fd5b6001600160a01b03821660008181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b0381166101c85760405162461bcd60e51b815260206004820152602f60248201527f50617573657252656769737472792e5f736574556e7061757365723a207a657260448201526e1bc81859191c995cdcc81a5b9c1d5d608a1b60648201526084016100f0565b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b038116811461025e57600080fd5b919050565b6000806040838503121561027657600080fd5b82516001600160401b038082111561028d57600080fd5b818501915085601f8301126102a157600080fd5b81516020828211156102b5576102b5610231565b8160051b604051601f19603f830116810181811086821117156102da576102da610231565b6040529283528183019350848101820192898411156102f857600080fd5b948201945b8386101561031d5761030e86610247565b855294820194938201936102fd565b965061032c9050878201610247565b9450505050509250929050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561037157634e487b7160e01b600052601160045260246000fd5b5060010190565b6103f1806103876000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806346fbf68e146100515780638568520614610089578063ce5484281461009e578063eab66d7a146100b1575b600080fd5b61007461005f366004610313565b60006020819052908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61009c610097366004610335565b6100dc565b005b61009c6100ac366004610313565b61011d565b6001546100c4906001600160a01b031681565b6040516001600160a01b039091168152602001610080565b6001546001600160a01b0316331461010f5760405162461bcd60e51b815260040161010690610371565b60405180910390fd5b6101198282610153565b5050565b6001546001600160a01b031633146101475760405162461bcd60e51b815260040161010690610371565b61015081610220565b50565b6001600160a01b0382166101bf5760405162461bcd60e51b815260206004820152602d60248201527f50617573657252656769737472792e5f7365745061757365723a207a65726f2060448201526c1859191c995cdcc81a5b9c1d5d609a1b6064820152608401610106565b6001600160a01b03821660008181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b03811661028e5760405162461bcd60e51b815260206004820152602f60248201527f50617573657252656769737472792e5f736574556e7061757365723a207a657260448201526e1bc81859191c995cdcc81a5b9c1d5d608a1b6064820152608401610106565b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461030e57600080fd5b919050565b60006020828403121561032557600080fd5b61032e826102f7565b9392505050565b6000806040838503121561034857600080fd5b610351836102f7565b91506020830135801515811461036657600080fd5b809150509250929050565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b60608201526080019056fea26469706673582212203b45f7c66225e5887e8907d44b53ad76d03563101c6febf801e78006f96642e664736f6c634300080c0033", + Bin: "0x608060405234801561001057600080fd5b5060405161077838038061077883398101604081905261002f91610263565b60005b82518110156100775761006583828151811061005057610050610339565b6020026020010151600161008860201b60201c565b8061006f8161034f565b915050610032565b506100818161015a565b5050610378565b6001600160a01b0382166100f95760405162461bcd60e51b815260206004820152602d60248201527f50617573657252656769737472792e5f7365745061757365723a207a65726f2060448201526c1859191c995cdcc81a5b9c1d5d609a1b60648201526084015b60405180910390fd5b6001600160a01b03821660008181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b0381166101c85760405162461bcd60e51b815260206004820152602f60248201527f50617573657252656769737472792e5f736574556e7061757365723a207a657260448201526e1bc81859191c995cdcc81a5b9c1d5d608a1b60648201526084016100f0565b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b038116811461025e57600080fd5b919050565b6000806040838503121561027657600080fd5b82516001600160401b038082111561028d57600080fd5b818501915085601f8301126102a157600080fd5b81516020828211156102b5576102b5610231565b8160051b604051601f19603f830116810181811086821117156102da576102da610231565b6040529283528183019350848101820192898411156102f857600080fd5b948201945b8386101561031d5761030e86610247565b855294820194938201936102fd565b965061032c9050878201610247565b9450505050509250929050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561037157634e487b7160e01b600052601160045260246000fd5b5060010190565b6103f1806103876000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806346fbf68e146100515780638568520614610089578063ce5484281461009e578063eab66d7a146100b1575b600080fd5b61007461005f366004610313565b60006020819052908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61009c610097366004610335565b6100dc565b005b61009c6100ac366004610313565b61011d565b6001546100c4906001600160a01b031681565b6040516001600160a01b039091168152602001610080565b6001546001600160a01b0316331461010f5760405162461bcd60e51b815260040161010690610371565b60405180910390fd5b6101198282610153565b5050565b6001546001600160a01b031633146101475760405162461bcd60e51b815260040161010690610371565b61015081610220565b50565b6001600160a01b0382166101bf5760405162461bcd60e51b815260206004820152602d60248201527f50617573657252656769737472792e5f7365745061757365723a207a65726f2060448201526c1859191c995cdcc81a5b9c1d5d609a1b6064820152608401610106565b6001600160a01b03821660008181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b03811661028e5760405162461bcd60e51b815260206004820152602f60248201527f50617573657252656769737472792e5f736574556e7061757365723a207a657260448201526e1bc81859191c995cdcc81a5b9c1d5d608a1b6064820152608401610106565b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461030e57600080fd5b919050565b60006020828403121561032557600080fd5b61032e826102f7565b9392505050565b6000806040838503121561034857600080fd5b610351836102f7565b91506020830135801515811461036657600080fd5b809150509250929050565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b60608201526080019056fea26469706673582212208b75afbc651f1f6c7421d55c6d0b0d5191f38c6fbea61d626cca972474f7fed264736f6c634300080c0033", } // PauserRegistryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/RewardsCoordinator/binding.go b/pkg/bindings/RewardsCoordinator/binding.go index 2e8d7e02f..01d81b585 100644 --- a/pkg/bindings/RewardsCoordinator/binding.go +++ b/pkg/bindings/RewardsCoordinator/binding.go @@ -78,7 +78,7 @@ type IRewardsCoordinatorTokenTreeMerkleLeaf struct { // RewardsCoordinatorMetaData contains all meta data concerning the RewardsCoordinator contract. var RewardsCoordinatorMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_CALCULATION_INTERVAL_SECONDS\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_MAX_REWARDS_DURATION\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_MAX_RETROACTIVE_LENGTH\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_MAX_FUTURE_LENGTH\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"__GENESIS_REWARDS_TIMESTAMP\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalOperatorCommissionBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isAVSRewardsSubmissionHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllEarnersHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorCommissionBips\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalOperatorCommission\",\"inputs\":[{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalCommissionBipsSet\",\"inputs\":[{\"name\":\"oldGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x6101806040523480156200001257600080fd5b5060405162004593380380620045938339810160408190526200003591620002e4565b868686868686866200004885826200037e565b63ffffffff1615620000ed5760405162461bcd60e51b815260206004820152606060248201527f52657761726473436f6f7264696e61746f723a2047454e455349535f5245574160448201527f5244535f54494d455354414d50206d7573742062652061206d756c7469706c6560648201527f206f662043414c43554c4154494f4e5f494e54455256414c5f5345434f4e4453608482015260a4015b60405180910390fd5b620000fc62015180866200037e565b63ffffffff16156200019d5760405162461bcd60e51b815260206004820152605760248201527f52657761726473436f6f7264696e61746f723a2043414c43554c4154494f4e5f60448201527f494e54455256414c5f5345434f4e4453206d7573742062652061206d756c746960648201527f706c65206f6620534e415053484f545f434144454e4345000000000000000000608482015260a401620000e4565b6001600160a01b0396871661012052949095166101405263ffffffff92831660805290821660a052811660c05291821660e0521661010052620001df620001f2565b5050466101605250620003b09350505050565b600054610100900460ff16156200025c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401620000e4565b60005460ff9081161015620002af576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114620002c757600080fd5b50565b805163ffffffff81168114620002df57600080fd5b919050565b600080600080600080600060e0888a0312156200030057600080fd5b87516200030d81620002b1565b60208901519097506200032081620002b1565b95506200033060408901620002ca565b94506200034060608901620002ca565b93506200035060808901620002ca565b92506200036060a08901620002ca565b91506200037060c08901620002ca565b905092959891949750929550565b600063ffffffff80841680620003a457634e487b7160e01b600052601260045260246000fd5b92169190910692915050565b60805160a05160c05160e0516101005161012051610140516101605161414c620004476000396000611a6b0152600081816104fd01526128d3015260006107bd015260008181610406015261270201526000818161033201526127ae0152600081816104d601526126b101526000818161071c0152612428015260008181610694015281816124df01526125ba015261414c6000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c80637b8f8b051161019d578063d4540a55116100e9578063f698da25116100a2578063fabc1cbc1161007c578063fabc1cbc14610820578063fbf1e2c114610833578063fce36c7d14610846578063ff9f6cce1461085957600080fd5b8063f698da25146107f2578063f8cd8448146107fa578063f96abf2e1461080d57600080fd5b8063d4540a551461076c578063de02e5031461077f578063e221b24514610792578063e810ce21146107a5578063ea4d3c9b146107b8578063f2fde38b146107df57600080fd5b80639be3d4e411610156578063aebd8bae11610130578063aebd8bae146106c9578063bb7e451f146106f7578063bf21a8aa14610717578063c46db6061461073e57600080fd5b80639be3d4e4146106875780639d45c2811461068f578063a0169ddd146106b657600080fd5b80637b8f8b0514610602578063863cb9a91461060a578063865c69531461061d578063886f1195146106485780638da5cb5b1461065b5780639104c3191461066c57600080fd5b806337838ed01161025c57806358baaa3e116102155780635c975abb116101ef5780635c975abb146105b15780635e9d8348146105b95780636d21117e146105cc578063715018a6146105fa57600080fd5b806358baaa3e14610573578063595c6a67146105865780635ac86ab71461058e57600080fd5b806337838ed0146104d157806339b70e38146104f85780633a8c07861461051f5780633ccc861d146105365780633efe1db6146105495780634d18cc351461055c57600080fd5b8063131433b4116102ae578063131433b414610401578063136439dd14610428578063149bc8721461043b57806322f19a641461045c5780632b9f64a41461047d57806336af41fa146104be57600080fd5b806218572c146102f557806304a0c5021461032d578063092db007146103695780630e9a53cf146103915780630eb38345146103d957806310d67a2f146103ee575b600080fd5b61031861030336600461375e565b60d16020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6103547f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610324565b60cb5461037e90600160e01b900461ffff1681565b60405161ffff9091168152602001610324565b61039961086c565b604080518251815260208084015163ffffffff90811691830191909152838301511691810191909152606091820151151591810191909152608001610324565b6103ec6103e7366004613789565b61094b565b005b6103ec6103fc36600461375e565b6109cd565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6104363660046137c2565b610a89565b61044e6104493660046137f3565b610bc8565b604051908152602001610324565b61037e61046a36600461380f565b505060cb54600160e01b900461ffff1690565b6104a661048b36600461375e565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610324565b6103ec6104cc36600461383d565b610c3e565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6104a67f000000000000000000000000000000000000000000000000000000000000000081565b60cb5461035490600160a01b900463ffffffff1681565b6103ec6105443660046138c5565b610e08565b6103ec610557366004613925565b6111cc565b60cb5461035490600160c01b900463ffffffff1681565b6103ec610581366004613951565b61149d565b6103ec6114ae565b61031861059c36600461396c565b606654600160ff9092169190911b9081161490565b60665461044e565b6103186105c736600461398f565b611575565b6103186105da3660046139c4565b60cf60209081526000928352604080842090915290825290205460ff1681565b6103ec611602565b60ca5461044e565b6103ec61061836600461375e565b611616565b61044e61062b36600461380f565b60cd60209081526000928352604080842090915290825290205481565b6065546104a6906001600160a01b031681565b6033546001600160a01b03166104a6565b6104a673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b610399611627565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6106c436600461375e565b6116c5565b6103186106d73660046139c4565b60d260209081526000928352604080842090915290825290205460ff1681565b61044e61070536600461375e565b60ce6020526000908152604090205481565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b61031861074c3660046139c4565b60d060209081526000928352604080842090915290825290205460ff1681565b6103ec61077a366004613a0d565b611724565b61039961078d3660046137c2565b61186c565b6103ec6107a0366004613a80565b6118fe565b6103546107b33660046137c2565b61190f565b6104a67f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6107ed36600461375e565b6119f1565b61044e611a67565b61044e6108083660046137f3565b611aa5565b6103ec61081b366004613951565b611ab6565b6103ec61082e3660046137c2565b611cec565b60cb546104a6906001600160a01b031681565b6103ec61085436600461383d565b611e48565b6103ec61086736600461383d565b611fc7565b60408051608081018252600080825260208201819052918101829052606081019190915260ca545b801561094757600060ca6108a9600184613ab1565b815481106108b9576108b9613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615801560608301819052919250906109295750806040015163ffffffff164210155b156109345792915050565b508061093f81613ade565b915050610894565b5090565b610953612175565b6001600160a01b038216600081815260d1602052604080822054905160ff9091169284151592841515927f4de6293e668df1398422e1def12118052c1539a03cbfedc145895d48d7685f1c9190a4506001600160a01b0391909116600090815260d160205260409020805460ff1916911515919091179055565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a449190613af5565b6001600160a01b0316336001600160a01b031614610a7d5760405162461bcd60e51b8152600401610a7490613b12565b60405180910390fd5b610a86816121cf565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af59190613b5c565b610b115760405162461bcd60e51b8152600401610a7490613b79565b60665481811614610b8a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610a74565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600080610bd8602084018461375e565b8360200135604051602001610c219392919060f89390931b6001600160f81b031916835260609190911b6bffffffffffffffffffffffff19166001830152601582015260350190565b604051602081830303815290604052805190602001209050919050565b60665460019060029081161415610c675760405162461bcd60e51b8152600401610a7490613bc1565b33600090815260d1602052604090205460ff16610c965760405162461bcd60e51b8152600401610a7490613bf8565b60026097541415610cb95760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd5736848483818110610cdc57610cdc613ac8565b9050602002810190610cee9190613ca6565b33600081815260ce60209081526040808320549051949550939192610d199290918591879101613deb565b604051602081830303815290604052805190602001209050610d3a836122c6565b33600090815260d0602090815260408083208484529091529020805460ff19166001908117909155610d6d908390613e1b565b33600081815260ce602052604090819020929092559051829184917f51088b8c89628df3a8174002c2a034d0152fce6af8415d651b2a4734bf27048290610db5908890613e33565b60405180910390a4610de7333060408601803590610dd6906020890161375e565b6001600160a01b0316929190612a9e565b5050508080610df590613e46565b915050610cc1565b505060016097555050565b60665460029060049081161415610e315760405162461bcd60e51b8152600401610a7490613bc1565b60026097541415610e545760405162461bcd60e51b8152600401610a7490613c6f565b6002609755600060ca610e6a6020860186613951565b63ffffffff1681548110610e8057610e80613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff16151560608201529050610ee18482612b0f565b6000610ef3608086016060870161375e565b6001600160a01b03808216600090815260cc60205260409020549192501680610f195750805b336001600160a01b03821614610f975760405162461bcd60e51b815260206004820152603c60248201527f52657761726473436f6f7264696e61746f722e70726f63657373436c61696d3a60448201527f2063616c6c6572206973206e6f742076616c696420636c61696d6572000000006064820152608401610a74565b60005b610fa760a0880188613e61565b90508110156111be5736610fbe60e0890189613eb2565b83818110610fce57610fce613ac8565b6001600160a01b038716600090815260cd6020908152604080832093029490940194509290915082906110039085018561375e565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050808260200135116110bd5760405162461bcd60e51b815260206004820152605560248201527f52657761726473436f6f7264696e61746f722e70726f63657373436c61696d3a60448201527f2063756d756c61746976654561726e696e6773206d75737420626520677420746064820152741a185b8818dd5b5d5b185d1a5d9950db185a5b5959605a1b608482015260a401610a74565b60006110cd826020850135613ab1565b6001600160a01b038716600090815260cd602090815260408220929350850180359291906110fb908761375e565b6001600160a01b031681526020808201929092526040016000209190915561113d908a90839061112d9087018761375e565b6001600160a01b03169190612ddb565b86516001600160a01b03808b1691878216918916907f9543dbd55580842586a951f0386e24d68a5df99ae29e3b216588b45fd684ce3190611181602089018961375e565b604080519283526001600160a01b039091166020830152810186905260600160405180910390a450505080806111b690613e46565b915050610f9a565b505060016097555050505050565b606654600390600890811614156111f55760405162461bcd60e51b8152600401610a7490613bc1565b60cb546001600160a01b0316331461121f5760405162461bcd60e51b8152600401610a7490613efc565b60cb5463ffffffff600160c01b9091048116908316116112bb5760405162461bcd60e51b815260206004820152604b60248201527f52657761726473436f6f7264696e61746f722e7375626d6974526f6f743a206e60448201527f657720726f6f74206d75737420626520666f72206e657765722063616c63756c60648201526a185d1959081c195c9a5bd960aa1b608482015260a401610a74565b428263ffffffff16106113545760405162461bcd60e51b815260206004820152605560248201527f52657761726473436f6f7264696e61746f722e7375626d6974526f6f743a207260448201527f65776172647343616c63756c6174696f6e456e6454696d657374616d702063616064820152746e6e6f7420626520696e207468652066757475726560581b608482015260a401610a74565b60ca5460cb5460009061137490600160a01b900463ffffffff1642613f50565b6040805160808101825287815263ffffffff878116602080840182815286841685870181815260006060880181815260ca8054600181018255925297517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee160029092029182015592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee290930180549151975193871667ffffffffffffffff1990921691909117600160201b978716979097029690961760ff60401b1916600160401b921515929092029190911790945560cb805463ffffffff60c01b1916600160c01b840217905593519283529394508892908616917fecd866c3c158fa00bf34d803d5f6023000b57080bcb48af004c2b4b46b3afd08910160405180910390a45050505050565b6114a5612175565b610a8681612e0b565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156114f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151a9190613b5c565b6115365760405162461bcd60e51b8152600401610a7490613b79565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b60006115fa8260ca61158a6020830183613951565b63ffffffff16815481106115a0576115a0613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152612b0f565b506001919050565b61160a612175565b6116146000612e7c565b565b61161e612175565b610a8681612ece565b60408051608081018252600080825260208201819052918101829052606081019190915260ca805461165b90600190613ab1565b8154811061166b5761166b613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152919050565b33600081815260cc602052604080822080546001600160a01b031981166001600160a01b038781169182179093559251911692839185917fbab947934d42e0ad206f25c9cab18b5bb6ae144acfb00f40b4e3aa59590ca31291a4505050565b600054610100900460ff16158080156117445750600054600160ff909116105b8061175e5750303b15801561175e575060005460ff166001145b6117c15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a74565b6000805460ff1916600117905580156117e4576000805461ff0019166101001790555b6117ec612f2a565b60c9556117f98686612fc1565b61180287612e7c565b61180b84612ece565b61181483612e0b565b61181d826130ab565b8015611863576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60408051608081018252600080825260208201819052918101829052606081019190915260ca82815481106118a3576118a3613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015292915050565b611906612175565b610a86816130ab565b60ca546000905b63ffffffff811615611982578260ca611930600184613f78565b63ffffffff168154811061194657611946613ac8565b906000526020600020906002020160000154141561197057611969600182613f78565b9392505050565b8061197a81613f9d565b915050611916565b5060405162461bcd60e51b815260206004820152603760248201527f52657761726473436f6f7264696e61746f722e676574526f6f74496e6465784660448201527f726f6d486173683a20726f6f74206e6f7420666f756e640000000000000000006064820152608401610a74565b6119f9612175565b6001600160a01b038116611a5e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a74565b610a8681612e7c565b60007f0000000000000000000000000000000000000000000000000000000000000000461415611a98575060c95490565b611aa0612f2a565b905090565b60006001610bd8602084018461375e565b60665460039060089081161415611adf5760405162461bcd60e51b8152600401610a7490613bc1565b60cb546001600160a01b03163314611b095760405162461bcd60e51b8152600401610a7490613efc565b60ca5463ffffffff831610611b7a5760405162461bcd60e51b815260206004820152603160248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152700d2dcecc2d8d2c840e4dedee892dcc8caf607b1b6064820152608401610a74565b600060ca8363ffffffff1681548110611b9557611b95613ac8565b906000526020600020906002020190508060010160089054906101000a900460ff1615611c225760405162461bcd60e51b815260206004820152603560248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152741c9bdbdd08185b1c9958591e48191a5cd8589b1959605a1b6064820152608401610a74565b6001810154600160201b900463ffffffff164210611ca15760405162461bcd60e51b815260206004820152603660248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152751c9bdbdd08185b1c9958591e481858dd1a5d985d195960521b6064820152608401610a74565b60018101805460ff60401b1916600160401b17905560405163ffffffff8416907fd850e6e5dfa497b72661fa73df2923464eaed9dc2ff1d3cb82bccbfeabe5c41e90600090a2505050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d639190613af5565b6001600160a01b0316336001600160a01b031614611d935760405162461bcd60e51b8152600401610a7490613b12565b606654198119606654191614611e115760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610a74565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610bbd565b60665460009060019081161415611e715760405162461bcd60e51b8152600401610a7490613bc1565b60026097541415611e945760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd5736848483818110611eb757611eb7613ac8565b9050602002810190611ec99190613ca6565b33600081815260ce60209081526040808320549051949550939192611ef49290918591879101613deb565b604051602081830303815290604052805190602001209050611f15836122c6565b33600090815260cf602090815260408083208484529091529020805460ff19166001908117909155611f48908390613e1b565b33600081815260ce602052604090819020929092559051829184917f450a367a380c4e339e5ae7340c8464ef27af7781ad9945cfe8abd828f89e628190611f90908890613e33565b60405180910390a4611fb1333060408601803590610dd6906020890161375e565b5050508080611fbf90613e46565b915050611e9c565b60665460049060109081161415611ff05760405162461bcd60e51b8152600401610a7490613bc1565b33600090815260d1602052604090205460ff1661201f5760405162461bcd60e51b8152600401610a7490613bf8565b600260975414156120425760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd573684848381811061206557612065613ac8565b90506020028101906120779190613ca6565b33600081815260ce602090815260408083205490519495509391926120a29290918591879101613deb565b6040516020818303038152906040528051906020012090506120c3836122c6565b33600090815260d2602090815260408083208484529091529020805460ff191660019081179091556120f6908390613e1b565b33600081815260ce602052604090819020929092559051829184917f5251b6fdefcb5d81144e735f69ea4c695fd43b0289ca53dc075033f5fc80068b9061213e908890613e33565b60405180910390a461215f333060408601803590610dd6906020890161375e565b505050808061216d90613e46565b91505061204a565b6033546001600160a01b031633146116145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a74565b6001600160a01b03811661225d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610a74565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b60006122d28280613eb2565b905011612337576040805162461bcd60e51b81526020600482015260248101919091526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206e6f2073747261746567696573207365746064820152608401610a74565b60008160400135116123a95760405162461bcd60e51b815260206004820152604160248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20616d6f756e742063616e6e6f74206265206064820152600360fc1b608482015260a401610a74565b6f4b3b4ca85a86c47a098a223fffffffff816040013511156124215760405162461bcd60e51b815260206004820152603f60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20616d6f756e7420746f6f206c61726765006064820152608401610a74565b63ffffffff7f00000000000000000000000000000000000000000000000000000000000000001661245860a0830160808401613951565b63ffffffff1611156124dd5760405162461bcd60e51b815260206004820152605460248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206475726174696f6e20657863656564732060648201527326a0ac2fa922aba0a92229afa22aa920aa24a7a760611b608482015260a401610a74565b7f000000000000000000000000000000000000000000000000000000000000000061250e60a0830160808401613951565b6125189190613fd3565b63ffffffff16156125b85760405162461bcd60e51b815260206004820152606a60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206475726174696f6e206d7573742062652060648201527f61206d756c7469706c65206f662043414c43554c4154494f4e5f494e54455256608482015269414c5f5345434f4e445360b01b60a482015260c401610a74565b7f00000000000000000000000000000000000000000000000000000000000000006125e96080830160608401613951565b6125f39190613fd3565b63ffffffff16156126995760405162461bcd60e51b815260206004820152607060248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d70206d7560648201527f73742062652061206d756c7469706c65206f662043414c43554c4154494f4e5f60848201526f494e54455256414c5f5345434f4e445360801b60a482015260c401610a74565b6126a96080820160608301613951565b63ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff16426126e19190613ab1565b1115801561272a57506126fa6080820160608301613951565b63ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff1611155b6127a45760405162461bcd60e51b815260206004820152605160248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d7020746f6064820152701bc819985c881a5b881d1a19481c185cdd607a1b608482015260a401610a74565b6127d463ffffffff7f00000000000000000000000000000000000000000000000000000000000000001642613e1b565b6127e46080830160608401613951565b63ffffffff1611156128685760405162461bcd60e51b815260206004820152605360248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d7020746f6064820152726f2066617220696e207468652066757475726560681b608482015260a401610a74565b6000805b6128768380613eb2565b9050811015612a9957600061288b8480613eb2565b8381811061289b5761289b613ac8565b6128b1926020604090920201908101915061375e565b60405163198f077960e21b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063663c1de490602401602060405180830381865afa15801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190613b5c565b8061296757506001600160a01b03811673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0145b6129da5760405162461bcd60e51b815260206004820152604a60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20696e76616c69642073747261746567792060648201526918dbdb9cda59195c995960b21b608482015260a401610a74565b806001600160a01b0316836001600160a01b031610612a875760405162461bcd60e51b815260206004820152606960248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a2073747261746567696573206d757374206260648201527f6520696e20617363656e64696e67206f7264657220746f2068616e646c65206460848201526875706c69636174657360b81b60a482015260c401610a74565b9150612a9281613e46565b905061286c565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b099085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613116565b50505050565b806060015115612b685760405162461bcd60e51b815260206004820152603060248201526000805160206140d783398151915260448201526f1c9bdbdd081a5cc8191a5cd8589b195960821b6064820152608401610a74565b806040015163ffffffff16421015612bcf5760405162461bcd60e51b815260206004820152603660248201526000805160206140d78339815191526044820152751c9bdbdd081b9bdd081858dd1a5d985d1959081e595d60521b6064820152608401610a74565b612bdc60c0830183613e61565b9050612beb60a0840184613e61565b905014612c635760405162461bcd60e51b815260206004820152604c60248201526000805160206140d783398151915260448201527f746f6b656e496e646963657320616e6420746f6b656e50726f6f6673206c656e60648201526b0cee8d040dad2e6dac2e8c6d60a31b608482015260a401610a74565b612c7060e0830183613eb2565b9050612c7f60c0840184613e61565b905014612cf55760405162461bcd60e51b815260206004820152604a60248201526000805160206140d783398151915260448201527f746f6b656e5472656550726f6f667320616e64206c6561766573206c656e67746064820152690d040dad2e6dac2e8c6d60b31b608482015260a401610a74565b8051612d2190612d0b6040850160208601613951565b612d186040860186613ff6565b866060016131e8565b60005b612d3160a0840184613e61565b9050811015612a9957612dcb6080840135612d4f60a0860186613e61565b84818110612d5f57612d5f613ac8565b9050602002016020810190612d749190613951565b612d8160c0870187613e61565b85818110612d9157612d91613ac8565b9050602002810190612da39190613ff6565b612db060e0890189613eb2565b87818110612dc057612dc0613ac8565b90506040020161335c565b612dd481613e46565b9050612d24565b6040516001600160a01b038316602482015260448101829052612a9990849063a9059cbb60e01b90606401612ad2565b60cb546040805163ffffffff600160a01b9093048316815291831660208301527faf557c6c02c208794817a705609cfa935f827312a1adfdd26494b6b95dd2b4b3910160405180910390a160cb805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cb546040516001600160a01b038084169216907f237b82f438d75fc568ebab484b75b01d9287b9e98b490b7c23221623b6705dbb90600090a360cb80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b6065546001600160a01b0316158015612fe257506001600160a01b03821615155b6130645760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610a74565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26130a7826121cf565b5050565b60cb546040805161ffff600160e01b9093048316815291831660208301527f8cdc428b0431b82d1619763f443a48197db344ba96905f3949643acd1c863a06910160405180910390a160cb805461ffff909216600160e01b0261ffff60e01b19909216919091179055565b600061316b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134ad9092919063ffffffff16565b805190915015612a9957808060200190518101906131899190613b5c565b612a995760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a74565b6131f360208361403d565b6001901b8463ffffffff161061327d5760405162461bcd60e51b815260206004820152604360248201527f52657761726473436f6f7264696e61746f722e5f7665726966794561726e657260448201527f436c61696d50726f6f663a20696e76616c6964206561726e65724c656166496e6064820152620c8caf60eb1b608482015260a401610a74565b600061328882610bc8565b90506132d384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508591505063ffffffff89166134c4565b6133545760405162461bcd60e51b815260206004820152604660248201527f52657761726473436f6f7264696e61746f722e5f7665726966794561726e657260448201527f436c61696d50726f6f663a20696e76616c6964206561726e657220636c61696d60648201526510383937b7b360d11b608482015260a401610a74565b505050505050565b61336760208361403d565b6001901b8463ffffffff16106133e55760405162461bcd60e51b815260206004820152603c60248201527f52657761726473436f6f7264696e61746f722e5f766572696679546f6b656e4360448201527f6c61696d3a20696e76616c696420746f6b656e4c656166496e646578000000006064820152608401610a74565b60006133f082611aa5565b905061343b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508591505063ffffffff89166134c4565b6133545760405162461bcd60e51b815260206004820152603f60248201527f52657761726473436f6f7264696e61746f722e5f766572696679546f6b656e4360448201527f6c61696d3a20696e76616c696420746f6b656e20636c61696d2070726f6f66006064820152608401610a74565b60606134bc84846000856134dc565b949350505050565b6000836134d286858561360d565b1495945050505050565b60608247101561353d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a74565b6001600160a01b0385163b6135945760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a74565b600080866001600160a01b031685876040516135b0919061407d565b60006040518083038185875af1925050503d80600081146135ed576040519150601f19603f3d011682016040523d82523d6000602084013e6135f2565b606091505b5091509150613602828286613710565b979650505050505050565b60006020845161361d919061408f565b156136a45760405162461bcd60e51b815260206004820152604b60248201527f4d65726b6c652e70726f63657373496e636c7573696f6e50726f6f664b65636360448201527f616b3a2070726f6f66206c656e6774682073686f756c642062652061206d756c60648201526a3a34b836329037b310199960a91b608482015260a401610a74565b8260205b85518111613707576136bb60028561408f565b6136dc578160005280860151602052604060002091506002840493506136f5565b8086015160005281602052604060002091506002840493505b613700602082613e1b565b90506136a8565b50949350505050565b6060831561371f575081611969565b82511561372f5782518084602001fd5b8160405162461bcd60e51b8152600401610a7491906140a3565b6001600160a01b0381168114610a8657600080fd5b60006020828403121561377057600080fd5b813561196981613749565b8015158114610a8657600080fd5b6000806040838503121561379c57600080fd5b82356137a781613749565b915060208301356137b78161377b565b809150509250929050565b6000602082840312156137d457600080fd5b5035919050565b6000604082840312156137ed57600080fd5b50919050565b60006040828403121561380557600080fd5b61196983836137db565b6000806040838503121561382257600080fd5b823561382d81613749565b915060208301356137b781613749565b6000806020838503121561385057600080fd5b823567ffffffffffffffff8082111561386857600080fd5b818501915085601f83011261387c57600080fd5b81358181111561388b57600080fd5b8660208260051b85010111156138a057600080fd5b60209290920196919550909350505050565b600061010082840312156137ed57600080fd5b600080604083850312156138d857600080fd5b823567ffffffffffffffff8111156138ef57600080fd5b6138fb858286016138b2565b92505060208301356137b781613749565b803563ffffffff8116811461392057600080fd5b919050565b6000806040838503121561393857600080fd5b823591506139486020840161390c565b90509250929050565b60006020828403121561396357600080fd5b6119698261390c565b60006020828403121561397e57600080fd5b813560ff8116811461196957600080fd5b6000602082840312156139a157600080fd5b813567ffffffffffffffff8111156139b857600080fd5b6134bc848285016138b2565b600080604083850312156139d757600080fd5b82356139e281613749565b946020939093013593505050565b803561392081613749565b803561ffff8116811461392057600080fd5b60008060008060008060c08789031215613a2657600080fd5b8635613a3181613749565b95506020870135613a4181613749565b9450604087013593506060870135613a5881613749565b9250613a666080880161390c565b9150613a7460a088016139fb565b90509295509295509295565b600060208284031215613a9257600080fd5b611969826139fb565b634e487b7160e01b600052601160045260246000fd5b600082821015613ac357613ac3613a9b565b500390565b634e487b7160e01b600052603260045260246000fd5b600081613aed57613aed613a9b565b506000190190565b600060208284031215613b0757600080fd5b815161196981613749565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215613b6e57600080fd5b81516119698161377b565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b60208082526051908201527f52657761726473436f6f7264696e61746f723a2063616c6c6572206973206e6f60408201527f7420612076616c69642063726561746552657761726473466f72416c6c53756260608201527036b4b9b9b4b7b71039bab136b4ba3a32b960791b608082015260a00190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008235609e19833603018112613cbc57600080fd5b9190910192915050565b818352600060208085019450826000805b86811015613d2b578235613cea81613749565b6001600160a01b03168852828401356bffffffffffffffffffffffff8116808214613d13578384fd5b89860152506040978801979290920191600101613cd7565b50959695505050505050565b60008135601e19833603018112613d4d57600080fd5b8201803567ffffffffffffffff811115613d6657600080fd5b8060061b3603841315613d7857600080fd5b60a08552613d8d60a086018260208501613cc6565b915050613d9c602084016139f0565b6001600160a01b0316602085015260408381013590850152613dc06060840161390c565b63ffffffff166060850152613dd76080840161390c565b63ffffffff81166080860152509392505050565b60018060a01b0384168152826020820152606060408201526000613e126060830184613d37565b95945050505050565b60008219821115613e2e57613e2e613a9b565b500190565b6020815260006119696020830184613d37565b6000600019821415613e5a57613e5a613a9b565b5060010190565b6000808335601e19843603018112613e7857600080fd5b83018035915067ffffffffffffffff821115613e9357600080fd5b6020019150600581901b3603821315613eab57600080fd5b9250929050565b6000808335601e19843603018112613ec957600080fd5b83018035915067ffffffffffffffff821115613ee457600080fd5b6020019150600681901b3603821315613eab57600080fd5b60208082526034908201527f52657761726473436f6f7264696e61746f723a2063616c6c6572206973206e6f6040820152733a103a3432903932bbb0b93239aab83230ba32b960611b606082015260800190565b600063ffffffff808316818516808303821115613f6f57613f6f613a9b565b01949350505050565b600063ffffffff83811690831681811015613f9557613f95613a9b565b039392505050565b600063ffffffff821680613fb357613fb3613a9b565b6000190192915050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff80841680613fea57613fea613fbd565b92169190910692915050565b6000808335601e1984360301811261400d57600080fd5b83018035915067ffffffffffffffff82111561402857600080fd5b602001915036819003821315613eab57600080fd5b60008261404c5761404c613fbd565b500490565b60005b8381101561406c578181015183820152602001614054565b83811115612b095750506000910152565b60008251613cbc818460208701614051565b60008261409e5761409e613fbd565b500690565b60208152600082518060208401526140c2816040850160208701614051565b601f01601f1916919091016040019291505056fe52657761726473436f6f7264696e61746f722e5f636865636b436c61696d3a2052657761726473436f6f7264696e61746f722e5f76616c696461746552657761a264697066735822122036f8834ea90be93d8ffaadfdccbc5c85edd0361a90fe4b8b14a9345e0ebdd2e064736f6c634300080c0033", + Bin: "0x6101806040523480156200001257600080fd5b5060405162004593380380620045938339810160408190526200003591620002e4565b868686868686866200004885826200037e565b63ffffffff1615620000ed5760405162461bcd60e51b815260206004820152606060248201527f52657761726473436f6f7264696e61746f723a2047454e455349535f5245574160448201527f5244535f54494d455354414d50206d7573742062652061206d756c7469706c6560648201527f206f662043414c43554c4154494f4e5f494e54455256414c5f5345434f4e4453608482015260a4015b60405180910390fd5b620000fc62015180866200037e565b63ffffffff16156200019d5760405162461bcd60e51b815260206004820152605760248201527f52657761726473436f6f7264696e61746f723a2043414c43554c4154494f4e5f60448201527f494e54455256414c5f5345434f4e4453206d7573742062652061206d756c746960648201527f706c65206f6620534e415053484f545f434144454e4345000000000000000000608482015260a401620000e4565b6001600160a01b0396871661012052949095166101405263ffffffff92831660805290821660a052811660c05291821660e0521661010052620001df620001f2565b5050466101605250620003b09350505050565b600054610100900460ff16156200025c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401620000e4565b60005460ff9081161015620002af576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114620002c757600080fd5b50565b805163ffffffff81168114620002df57600080fd5b919050565b600080600080600080600060e0888a0312156200030057600080fd5b87516200030d81620002b1565b60208901519097506200032081620002b1565b95506200033060408901620002ca565b94506200034060608901620002ca565b93506200035060808901620002ca565b92506200036060a08901620002ca565b91506200037060c08901620002ca565b905092959891949750929550565b600063ffffffff80841680620003a457634e487b7160e01b600052601260045260246000fd5b92169190910692915050565b60805160a05160c05160e0516101005161012051610140516101605161414c620004476000396000611a6b0152600081816104fd01526128d3015260006107bd015260008181610406015261270201526000818161033201526127ae0152600081816104d601526126b101526000818161071c0152612428015260008181610694015281816124df01526125ba015261414c6000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c80637b8f8b051161019d578063d4540a55116100e9578063f698da25116100a2578063fabc1cbc1161007c578063fabc1cbc14610820578063fbf1e2c114610833578063fce36c7d14610846578063ff9f6cce1461085957600080fd5b8063f698da25146107f2578063f8cd8448146107fa578063f96abf2e1461080d57600080fd5b8063d4540a551461076c578063de02e5031461077f578063e221b24514610792578063e810ce21146107a5578063ea4d3c9b146107b8578063f2fde38b146107df57600080fd5b80639be3d4e411610156578063aebd8bae11610130578063aebd8bae146106c9578063bb7e451f146106f7578063bf21a8aa14610717578063c46db6061461073e57600080fd5b80639be3d4e4146106875780639d45c2811461068f578063a0169ddd146106b657600080fd5b80637b8f8b0514610602578063863cb9a91461060a578063865c69531461061d578063886f1195146106485780638da5cb5b1461065b5780639104c3191461066c57600080fd5b806337838ed01161025c57806358baaa3e116102155780635c975abb116101ef5780635c975abb146105b15780635e9d8348146105b95780636d21117e146105cc578063715018a6146105fa57600080fd5b806358baaa3e14610573578063595c6a67146105865780635ac86ab71461058e57600080fd5b806337838ed0146104d157806339b70e38146104f85780633a8c07861461051f5780633ccc861d146105365780633efe1db6146105495780634d18cc351461055c57600080fd5b8063131433b4116102ae578063131433b414610401578063136439dd14610428578063149bc8721461043b57806322f19a641461045c5780632b9f64a41461047d57806336af41fa146104be57600080fd5b806218572c146102f557806304a0c5021461032d578063092db007146103695780630e9a53cf146103915780630eb38345146103d957806310d67a2f146103ee575b600080fd5b61031861030336600461375e565b60d16020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6103547f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610324565b60cb5461037e90600160e01b900461ffff1681565b60405161ffff9091168152602001610324565b61039961086c565b604080518251815260208084015163ffffffff90811691830191909152838301511691810191909152606091820151151591810191909152608001610324565b6103ec6103e7366004613789565b61094b565b005b6103ec6103fc36600461375e565b6109cd565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6104363660046137c2565b610a89565b61044e6104493660046137f3565b610bc8565b604051908152602001610324565b61037e61046a36600461380f565b505060cb54600160e01b900461ffff1690565b6104a661048b36600461375e565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610324565b6103ec6104cc36600461383d565b610c3e565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6104a67f000000000000000000000000000000000000000000000000000000000000000081565b60cb5461035490600160a01b900463ffffffff1681565b6103ec6105443660046138c5565b610e08565b6103ec610557366004613925565b6111cc565b60cb5461035490600160c01b900463ffffffff1681565b6103ec610581366004613951565b61149d565b6103ec6114ae565b61031861059c36600461396c565b606654600160ff9092169190911b9081161490565b60665461044e565b6103186105c736600461398f565b611575565b6103186105da3660046139c4565b60cf60209081526000928352604080842090915290825290205460ff1681565b6103ec611602565b60ca5461044e565b6103ec61061836600461375e565b611616565b61044e61062b36600461380f565b60cd60209081526000928352604080842090915290825290205481565b6065546104a6906001600160a01b031681565b6033546001600160a01b03166104a6565b6104a673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b610399611627565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6106c436600461375e565b6116c5565b6103186106d73660046139c4565b60d260209081526000928352604080842090915290825290205460ff1681565b61044e61070536600461375e565b60ce6020526000908152604090205481565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b61031861074c3660046139c4565b60d060209081526000928352604080842090915290825290205460ff1681565b6103ec61077a366004613a0d565b611724565b61039961078d3660046137c2565b61186c565b6103ec6107a0366004613a80565b6118fe565b6103546107b33660046137c2565b61190f565b6104a67f000000000000000000000000000000000000000000000000000000000000000081565b6103ec6107ed36600461375e565b6119f1565b61044e611a67565b61044e6108083660046137f3565b611aa5565b6103ec61081b366004613951565b611ab6565b6103ec61082e3660046137c2565b611cec565b60cb546104a6906001600160a01b031681565b6103ec61085436600461383d565b611e48565b6103ec61086736600461383d565b611fc7565b60408051608081018252600080825260208201819052918101829052606081019190915260ca545b801561094757600060ca6108a9600184613ab1565b815481106108b9576108b9613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615801560608301819052919250906109295750806040015163ffffffff164210155b156109345792915050565b508061093f81613ade565b915050610894565b5090565b610953612175565b6001600160a01b038216600081815260d1602052604080822054905160ff9091169284151592841515927f4de6293e668df1398422e1def12118052c1539a03cbfedc145895d48d7685f1c9190a4506001600160a01b0391909116600090815260d160205260409020805460ff1916911515919091179055565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a449190613af5565b6001600160a01b0316336001600160a01b031614610a7d5760405162461bcd60e51b8152600401610a7490613b12565b60405180910390fd5b610a86816121cf565b50565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af59190613b5c565b610b115760405162461bcd60e51b8152600401610a7490613b79565b60665481811614610b8a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610a74565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600080610bd8602084018461375e565b8360200135604051602001610c219392919060f89390931b6001600160f81b031916835260609190911b6bffffffffffffffffffffffff19166001830152601582015260350190565b604051602081830303815290604052805190602001209050919050565b60665460019060029081161415610c675760405162461bcd60e51b8152600401610a7490613bc1565b33600090815260d1602052604090205460ff16610c965760405162461bcd60e51b8152600401610a7490613bf8565b60026097541415610cb95760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd5736848483818110610cdc57610cdc613ac8565b9050602002810190610cee9190613ca6565b33600081815260ce60209081526040808320549051949550939192610d199290918591879101613deb565b604051602081830303815290604052805190602001209050610d3a836122c6565b33600090815260d0602090815260408083208484529091529020805460ff19166001908117909155610d6d908390613e1b565b33600081815260ce602052604090819020929092559051829184917f51088b8c89628df3a8174002c2a034d0152fce6af8415d651b2a4734bf27048290610db5908890613e33565b60405180910390a4610de7333060408601803590610dd6906020890161375e565b6001600160a01b0316929190612a9e565b5050508080610df590613e46565b915050610cc1565b505060016097555050565b60665460029060049081161415610e315760405162461bcd60e51b8152600401610a7490613bc1565b60026097541415610e545760405162461bcd60e51b8152600401610a7490613c6f565b6002609755600060ca610e6a6020860186613951565b63ffffffff1681548110610e8057610e80613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff16151560608201529050610ee18482612b0f565b6000610ef3608086016060870161375e565b6001600160a01b03808216600090815260cc60205260409020549192501680610f195750805b336001600160a01b03821614610f975760405162461bcd60e51b815260206004820152603c60248201527f52657761726473436f6f7264696e61746f722e70726f63657373436c61696d3a60448201527f2063616c6c6572206973206e6f742076616c696420636c61696d6572000000006064820152608401610a74565b60005b610fa760a0880188613e61565b90508110156111be5736610fbe60e0890189613eb2565b83818110610fce57610fce613ac8565b6001600160a01b038716600090815260cd6020908152604080832093029490940194509290915082906110039085018561375e565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050808260200135116110bd5760405162461bcd60e51b815260206004820152605560248201527f52657761726473436f6f7264696e61746f722e70726f63657373436c61696d3a60448201527f2063756d756c61746976654561726e696e6773206d75737420626520677420746064820152741a185b8818dd5b5d5b185d1a5d9950db185a5b5959605a1b608482015260a401610a74565b60006110cd826020850135613ab1565b6001600160a01b038716600090815260cd602090815260408220929350850180359291906110fb908761375e565b6001600160a01b031681526020808201929092526040016000209190915561113d908a90839061112d9087018761375e565b6001600160a01b03169190612ddb565b86516001600160a01b03808b1691878216918916907f9543dbd55580842586a951f0386e24d68a5df99ae29e3b216588b45fd684ce3190611181602089018961375e565b604080519283526001600160a01b039091166020830152810186905260600160405180910390a450505080806111b690613e46565b915050610f9a565b505060016097555050505050565b606654600390600890811614156111f55760405162461bcd60e51b8152600401610a7490613bc1565b60cb546001600160a01b0316331461121f5760405162461bcd60e51b8152600401610a7490613efc565b60cb5463ffffffff600160c01b9091048116908316116112bb5760405162461bcd60e51b815260206004820152604b60248201527f52657761726473436f6f7264696e61746f722e7375626d6974526f6f743a206e60448201527f657720726f6f74206d75737420626520666f72206e657765722063616c63756c60648201526a185d1959081c195c9a5bd960aa1b608482015260a401610a74565b428263ffffffff16106113545760405162461bcd60e51b815260206004820152605560248201527f52657761726473436f6f7264696e61746f722e7375626d6974526f6f743a207260448201527f65776172647343616c63756c6174696f6e456e6454696d657374616d702063616064820152746e6e6f7420626520696e207468652066757475726560581b608482015260a401610a74565b60ca5460cb5460009061137490600160a01b900463ffffffff1642613f50565b6040805160808101825287815263ffffffff878116602080840182815286841685870181815260006060880181815260ca8054600181018255925297517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee160029092029182015592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee290930180549151975193871667ffffffffffffffff1990921691909117600160201b978716979097029690961760ff60401b1916600160401b921515929092029190911790945560cb805463ffffffff60c01b1916600160c01b840217905593519283529394508892908616917fecd866c3c158fa00bf34d803d5f6023000b57080bcb48af004c2b4b46b3afd08910160405180910390a45050505050565b6114a5612175565b610a8681612e0b565b60655460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156114f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151a9190613b5c565b6115365760405162461bcd60e51b8152600401610a7490613b79565b600019606681905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b60006115fa8260ca61158a6020830183613951565b63ffffffff16815481106115a0576115a0613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152612b0f565b506001919050565b61160a612175565b6116146000612e7c565b565b61161e612175565b610a8681612ece565b60408051608081018252600080825260208201819052918101829052606081019190915260ca805461165b90600190613ab1565b8154811061166b5761166b613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152919050565b33600081815260cc602052604080822080546001600160a01b031981166001600160a01b038781169182179093559251911692839185917fbab947934d42e0ad206f25c9cab18b5bb6ae144acfb00f40b4e3aa59590ca31291a4505050565b600054610100900460ff16158080156117445750600054600160ff909116105b8061175e5750303b15801561175e575060005460ff166001145b6117c15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a74565b6000805460ff1916600117905580156117e4576000805461ff0019166101001790555b6117ec612f2a565b60c9556117f98686612fc1565b61180287612e7c565b61180b84612ece565b61181483612e0b565b61181d826130ab565b8015611863576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60408051608081018252600080825260208201819052918101829052606081019190915260ca82815481106118a3576118a3613ac8565b600091825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015292915050565b611906612175565b610a86816130ab565b60ca546000905b63ffffffff811615611982578260ca611930600184613f78565b63ffffffff168154811061194657611946613ac8565b906000526020600020906002020160000154141561197057611969600182613f78565b9392505050565b8061197a81613f9d565b915050611916565b5060405162461bcd60e51b815260206004820152603760248201527f52657761726473436f6f7264696e61746f722e676574526f6f74496e6465784660448201527f726f6d486173683a20726f6f74206e6f7420666f756e640000000000000000006064820152608401610a74565b6119f9612175565b6001600160a01b038116611a5e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a74565b610a8681612e7c565b60007f0000000000000000000000000000000000000000000000000000000000000000461415611a98575060c95490565b611aa0612f2a565b905090565b60006001610bd8602084018461375e565b60665460039060089081161415611adf5760405162461bcd60e51b8152600401610a7490613bc1565b60cb546001600160a01b03163314611b095760405162461bcd60e51b8152600401610a7490613efc565b60ca5463ffffffff831610611b7a5760405162461bcd60e51b815260206004820152603160248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152700d2dcecc2d8d2c840e4dedee892dcc8caf607b1b6064820152608401610a74565b600060ca8363ffffffff1681548110611b9557611b95613ac8565b906000526020600020906002020190508060010160089054906101000a900460ff1615611c225760405162461bcd60e51b815260206004820152603560248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152741c9bdbdd08185b1c9958591e48191a5cd8589b1959605a1b6064820152608401610a74565b6001810154600160201b900463ffffffff164210611ca15760405162461bcd60e51b815260206004820152603660248201527f52657761726473436f6f7264696e61746f722e64697361626c65526f6f743a206044820152751c9bdbdd08185b1c9958591e481858dd1a5d985d195960521b6064820152608401610a74565b60018101805460ff60401b1916600160401b17905560405163ffffffff8416907fd850e6e5dfa497b72661fa73df2923464eaed9dc2ff1d3cb82bccbfeabe5c41e90600090a2505050565b606560009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d639190613af5565b6001600160a01b0316336001600160a01b031614611d935760405162461bcd60e51b8152600401610a7490613b12565b606654198119606654191614611e115760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610a74565b606681905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610bbd565b60665460009060019081161415611e715760405162461bcd60e51b8152600401610a7490613bc1565b60026097541415611e945760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd5736848483818110611eb757611eb7613ac8565b9050602002810190611ec99190613ca6565b33600081815260ce60209081526040808320549051949550939192611ef49290918591879101613deb565b604051602081830303815290604052805190602001209050611f15836122c6565b33600090815260cf602090815260408083208484529091529020805460ff19166001908117909155611f48908390613e1b565b33600081815260ce602052604090819020929092559051829184917f450a367a380c4e339e5ae7340c8464ef27af7781ad9945cfe8abd828f89e628190611f90908890613e33565b60405180910390a4611fb1333060408601803590610dd6906020890161375e565b5050508080611fbf90613e46565b915050611e9c565b60665460049060109081161415611ff05760405162461bcd60e51b8152600401610a7490613bc1565b33600090815260d1602052604090205460ff1661201f5760405162461bcd60e51b8152600401610a7490613bf8565b600260975414156120425760405162461bcd60e51b8152600401610a7490613c6f565b600260975560005b82811015610dfd573684848381811061206557612065613ac8565b90506020028101906120779190613ca6565b33600081815260ce602090815260408083205490519495509391926120a29290918591879101613deb565b6040516020818303038152906040528051906020012090506120c3836122c6565b33600090815260d2602090815260408083208484529091529020805460ff191660019081179091556120f6908390613e1b565b33600081815260ce602052604090819020929092559051829184917f5251b6fdefcb5d81144e735f69ea4c695fd43b0289ca53dc075033f5fc80068b9061213e908890613e33565b60405180910390a461215f333060408601803590610dd6906020890161375e565b505050808061216d90613e46565b91505061204a565b6033546001600160a01b031633146116145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a74565b6001600160a01b03811661225d5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610a74565b606554604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1606580546001600160a01b0319166001600160a01b0392909216919091179055565b60006122d28280613eb2565b905011612337576040805162461bcd60e51b81526020600482015260248101919091526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206e6f2073747261746567696573207365746064820152608401610a74565b60008160400135116123a95760405162461bcd60e51b815260206004820152604160248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20616d6f756e742063616e6e6f74206265206064820152600360fc1b608482015260a401610a74565b6f4b3b4ca85a86c47a098a223fffffffff816040013511156124215760405162461bcd60e51b815260206004820152603f60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20616d6f756e7420746f6f206c61726765006064820152608401610a74565b63ffffffff7f00000000000000000000000000000000000000000000000000000000000000001661245860a0830160808401613951565b63ffffffff1611156124dd5760405162461bcd60e51b815260206004820152605460248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206475726174696f6e20657863656564732060648201527326a0ac2fa922aba0a92229afa22aa920aa24a7a760611b608482015260a401610a74565b7f000000000000000000000000000000000000000000000000000000000000000061250e60a0830160808401613951565b6125189190613fd3565b63ffffffff16156125b85760405162461bcd60e51b815260206004820152606a60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a206475726174696f6e206d7573742062652060648201527f61206d756c7469706c65206f662043414c43554c4154494f4e5f494e54455256608482015269414c5f5345434f4e445360b01b60a482015260c401610a74565b7f00000000000000000000000000000000000000000000000000000000000000006125e96080830160608401613951565b6125f39190613fd3565b63ffffffff16156126995760405162461bcd60e51b815260206004820152607060248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d70206d7560648201527f73742062652061206d756c7469706c65206f662043414c43554c4154494f4e5f60848201526f494e54455256414c5f5345434f4e445360801b60a482015260c401610a74565b6126a96080820160608301613951565b63ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff16426126e19190613ab1565b1115801561272a57506126fa6080820160608301613951565b63ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff1611155b6127a45760405162461bcd60e51b815260206004820152605160248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d7020746f6064820152701bc819985c881a5b881d1a19481c185cdd607a1b608482015260a401610a74565b6127d463ffffffff7f00000000000000000000000000000000000000000000000000000000000000001642613e1b565b6127e46080830160608401613951565b63ffffffff1611156128685760405162461bcd60e51b815260206004820152605360248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20737461727454696d657374616d7020746f6064820152726f2066617220696e207468652066757475726560681b608482015260a401610a74565b6000805b6128768380613eb2565b9050811015612a9957600061288b8480613eb2565b8381811061289b5761289b613ac8565b6128b1926020604090920201908101915061375e565b60405163198f077960e21b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063663c1de490602401602060405180830381865afa15801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190613b5c565b8061296757506001600160a01b03811673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0145b6129da5760405162461bcd60e51b815260206004820152604a60248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a20696e76616c69642073747261746567792060648201526918dbdb9cda59195c995960b21b608482015260a401610a74565b806001600160a01b0316836001600160a01b031610612a875760405162461bcd60e51b815260206004820152606960248201526000805160206140f783398151915260448201527f7264735375626d697373696f6e3a2073747261746567696573206d757374206260648201527f6520696e20617363656e64696e67206f7264657220746f2068616e646c65206460848201526875706c69636174657360b81b60a482015260c401610a74565b9150612a9281613e46565b905061286c565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b099085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613116565b50505050565b806060015115612b685760405162461bcd60e51b815260206004820152603060248201526000805160206140d783398151915260448201526f1c9bdbdd081a5cc8191a5cd8589b195960821b6064820152608401610a74565b806040015163ffffffff16421015612bcf5760405162461bcd60e51b815260206004820152603660248201526000805160206140d78339815191526044820152751c9bdbdd081b9bdd081858dd1a5d985d1959081e595d60521b6064820152608401610a74565b612bdc60c0830183613e61565b9050612beb60a0840184613e61565b905014612c635760405162461bcd60e51b815260206004820152604c60248201526000805160206140d783398151915260448201527f746f6b656e496e646963657320616e6420746f6b656e50726f6f6673206c656e60648201526b0cee8d040dad2e6dac2e8c6d60a31b608482015260a401610a74565b612c7060e0830183613eb2565b9050612c7f60c0840184613e61565b905014612cf55760405162461bcd60e51b815260206004820152604a60248201526000805160206140d783398151915260448201527f746f6b656e5472656550726f6f667320616e64206c6561766573206c656e67746064820152690d040dad2e6dac2e8c6d60b31b608482015260a401610a74565b8051612d2190612d0b6040850160208601613951565b612d186040860186613ff6565b866060016131e8565b60005b612d3160a0840184613e61565b9050811015612a9957612dcb6080840135612d4f60a0860186613e61565b84818110612d5f57612d5f613ac8565b9050602002016020810190612d749190613951565b612d8160c0870187613e61565b85818110612d9157612d91613ac8565b9050602002810190612da39190613ff6565b612db060e0890189613eb2565b87818110612dc057612dc0613ac8565b90506040020161335c565b612dd481613e46565b9050612d24565b6040516001600160a01b038316602482015260448101829052612a9990849063a9059cbb60e01b90606401612ad2565b60cb546040805163ffffffff600160a01b9093048316815291831660208301527faf557c6c02c208794817a705609cfa935f827312a1adfdd26494b6b95dd2b4b3910160405180910390a160cb805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cb546040516001600160a01b038084169216907f237b82f438d75fc568ebab484b75b01d9287b9e98b490b7c23221623b6705dbb90600090a360cb80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b6065546001600160a01b0316158015612fe257506001600160a01b03821615155b6130645760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610a74565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26130a7826121cf565b5050565b60cb546040805161ffff600160e01b9093048316815291831660208301527f8cdc428b0431b82d1619763f443a48197db344ba96905f3949643acd1c863a06910160405180910390a160cb805461ffff909216600160e01b0261ffff60e01b19909216919091179055565b600061316b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134ad9092919063ffffffff16565b805190915015612a9957808060200190518101906131899190613b5c565b612a995760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a74565b6131f360208361403d565b6001901b8463ffffffff161061327d5760405162461bcd60e51b815260206004820152604360248201527f52657761726473436f6f7264696e61746f722e5f7665726966794561726e657260448201527f436c61696d50726f6f663a20696e76616c6964206561726e65724c656166496e6064820152620c8caf60eb1b608482015260a401610a74565b600061328882610bc8565b90506132d384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508591505063ffffffff89166134c4565b6133545760405162461bcd60e51b815260206004820152604660248201527f52657761726473436f6f7264696e61746f722e5f7665726966794561726e657260448201527f436c61696d50726f6f663a20696e76616c6964206561726e657220636c61696d60648201526510383937b7b360d11b608482015260a401610a74565b505050505050565b61336760208361403d565b6001901b8463ffffffff16106133e55760405162461bcd60e51b815260206004820152603c60248201527f52657761726473436f6f7264696e61746f722e5f766572696679546f6b656e4360448201527f6c61696d3a20696e76616c696420746f6b656e4c656166496e646578000000006064820152608401610a74565b60006133f082611aa5565b905061343b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508591505063ffffffff89166134c4565b6133545760405162461bcd60e51b815260206004820152603f60248201527f52657761726473436f6f7264696e61746f722e5f766572696679546f6b656e4360448201527f6c61696d3a20696e76616c696420746f6b656e20636c61696d2070726f6f66006064820152608401610a74565b60606134bc84846000856134dc565b949350505050565b6000836134d286858561360d565b1495945050505050565b60608247101561353d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a74565b6001600160a01b0385163b6135945760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a74565b600080866001600160a01b031685876040516135b0919061407d565b60006040518083038185875af1925050503d80600081146135ed576040519150601f19603f3d011682016040523d82523d6000602084013e6135f2565b606091505b5091509150613602828286613710565b979650505050505050565b60006020845161361d919061408f565b156136a45760405162461bcd60e51b815260206004820152604b60248201527f4d65726b6c652e70726f63657373496e636c7573696f6e50726f6f664b65636360448201527f616b3a2070726f6f66206c656e6774682073686f756c642062652061206d756c60648201526a3a34b836329037b310199960a91b608482015260a401610a74565b8260205b85518111613707576136bb60028561408f565b6136dc578160005280860151602052604060002091506002840493506136f5565b8086015160005281602052604060002091506002840493505b613700602082613e1b565b90506136a8565b50949350505050565b6060831561371f575081611969565b82511561372f5782518084602001fd5b8160405162461bcd60e51b8152600401610a7491906140a3565b6001600160a01b0381168114610a8657600080fd5b60006020828403121561377057600080fd5b813561196981613749565b8015158114610a8657600080fd5b6000806040838503121561379c57600080fd5b82356137a781613749565b915060208301356137b78161377b565b809150509250929050565b6000602082840312156137d457600080fd5b5035919050565b6000604082840312156137ed57600080fd5b50919050565b60006040828403121561380557600080fd5b61196983836137db565b6000806040838503121561382257600080fd5b823561382d81613749565b915060208301356137b781613749565b6000806020838503121561385057600080fd5b823567ffffffffffffffff8082111561386857600080fd5b818501915085601f83011261387c57600080fd5b81358181111561388b57600080fd5b8660208260051b85010111156138a057600080fd5b60209290920196919550909350505050565b600061010082840312156137ed57600080fd5b600080604083850312156138d857600080fd5b823567ffffffffffffffff8111156138ef57600080fd5b6138fb858286016138b2565b92505060208301356137b781613749565b803563ffffffff8116811461392057600080fd5b919050565b6000806040838503121561393857600080fd5b823591506139486020840161390c565b90509250929050565b60006020828403121561396357600080fd5b6119698261390c565b60006020828403121561397e57600080fd5b813560ff8116811461196957600080fd5b6000602082840312156139a157600080fd5b813567ffffffffffffffff8111156139b857600080fd5b6134bc848285016138b2565b600080604083850312156139d757600080fd5b82356139e281613749565b946020939093013593505050565b803561392081613749565b803561ffff8116811461392057600080fd5b60008060008060008060c08789031215613a2657600080fd5b8635613a3181613749565b95506020870135613a4181613749565b9450604087013593506060870135613a5881613749565b9250613a666080880161390c565b9150613a7460a088016139fb565b90509295509295509295565b600060208284031215613a9257600080fd5b611969826139fb565b634e487b7160e01b600052601160045260246000fd5b600082821015613ac357613ac3613a9b565b500390565b634e487b7160e01b600052603260045260246000fd5b600081613aed57613aed613a9b565b506000190190565b600060208284031215613b0757600080fd5b815161196981613749565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215613b6e57600080fd5b81516119698161377b565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b60208082526051908201527f52657761726473436f6f7264696e61746f723a2063616c6c6572206973206e6f60408201527f7420612076616c69642063726561746552657761726473466f72416c6c53756260608201527036b4b9b9b4b7b71039bab136b4ba3a32b960791b608082015260a00190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008235609e19833603018112613cbc57600080fd5b9190910192915050565b818352600060208085019450826000805b86811015613d2b578235613cea81613749565b6001600160a01b03168852828401356bffffffffffffffffffffffff8116808214613d13578384fd5b89860152506040978801979290920191600101613cd7565b50959695505050505050565b60008135601e19833603018112613d4d57600080fd5b8201803567ffffffffffffffff811115613d6657600080fd5b8060061b3603841315613d7857600080fd5b60a08552613d8d60a086018260208501613cc6565b915050613d9c602084016139f0565b6001600160a01b0316602085015260408381013590850152613dc06060840161390c565b63ffffffff166060850152613dd76080840161390c565b63ffffffff81166080860152509392505050565b60018060a01b0384168152826020820152606060408201526000613e126060830184613d37565b95945050505050565b60008219821115613e2e57613e2e613a9b565b500190565b6020815260006119696020830184613d37565b6000600019821415613e5a57613e5a613a9b565b5060010190565b6000808335601e19843603018112613e7857600080fd5b83018035915067ffffffffffffffff821115613e9357600080fd5b6020019150600581901b3603821315613eab57600080fd5b9250929050565b6000808335601e19843603018112613ec957600080fd5b83018035915067ffffffffffffffff821115613ee457600080fd5b6020019150600681901b3603821315613eab57600080fd5b60208082526034908201527f52657761726473436f6f7264696e61746f723a2063616c6c6572206973206e6f6040820152733a103a3432903932bbb0b93239aab83230ba32b960611b606082015260800190565b600063ffffffff808316818516808303821115613f6f57613f6f613a9b565b01949350505050565b600063ffffffff83811690831681811015613f9557613f95613a9b565b039392505050565b600063ffffffff821680613fb357613fb3613a9b565b6000190192915050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff80841680613fea57613fea613fbd565b92169190910692915050565b6000808335601e1984360301811261400d57600080fd5b83018035915067ffffffffffffffff82111561402857600080fd5b602001915036819003821315613eab57600080fd5b60008261404c5761404c613fbd565b500490565b60005b8381101561406c578181015183820152602001614054565b83811115612b095750506000910152565b60008251613cbc818460208701614051565b60008261409e5761409e613fbd565b500690565b60208152600082518060208401526140c2816040850160208701614051565b601f01601f1916919091016040019291505056fe52657761726473436f6f7264696e61746f722e5f636865636b436c61696d3a2052657761726473436f6f7264696e61746f722e5f76616c696461746552657761a2646970667358221220d8070eed424f562ab8578473dab4851bda8b6e0d53be1e02368b26baad3cd40c64736f6c634300080c0033", } // RewardsCoordinatorABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/RewardsCoordinatorStorage/binding.go b/pkg/bindings/RewardsCoordinatorStorage/binding.go index a5c813df9..0742ccec3 100644 --- a/pkg/bindings/RewardsCoordinatorStorage/binding.go +++ b/pkg/bindings/RewardsCoordinatorStorage/binding.go @@ -77,7 +77,7 @@ type IRewardsCoordinatorTokenTreeMerkleLeaf struct { // RewardsCoordinatorStorageMetaData contains all meta data concerning the RewardsCoordinatorStorage contract. var RewardsCoordinatorStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmission\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalOperatorCommissionBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isAVSRewardsSubmissionHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllEarnersHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorCommissionBips\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalOperatorCommission\",\"inputs\":[{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalCommissionBipsSet\",\"inputs\":[{\"name\":\"oldGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmission\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalOperatorCommissionBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isAVSRewardsSubmissionHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllEarnersHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorCommissionBips\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinator.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalOperatorCommission\",\"inputs\":[{\"name\":\"_globalCommissionBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionNonce\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalCommissionBipsSet\",\"inputs\":[{\"name\":\"oldGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newGlobalCommissionBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinator.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinator.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", } // RewardsCoordinatorStorageABI is the input ABI used to generate the binding from. @@ -629,6 +629,37 @@ func (_RewardsCoordinatorStorage *RewardsCoordinatorStorageCallerSession) Delega return _RewardsCoordinatorStorage.Contract.DelegationManager(&_RewardsCoordinatorStorage.CallOpts) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_RewardsCoordinatorStorage *RewardsCoordinatorStorageCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RewardsCoordinatorStorage.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_RewardsCoordinatorStorage *RewardsCoordinatorStorageSession) DomainSeparator() ([32]byte, error) { + return _RewardsCoordinatorStorage.Contract.DomainSeparator(&_RewardsCoordinatorStorage.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_RewardsCoordinatorStorage *RewardsCoordinatorStorageCallerSession) DomainSeparator() ([32]byte, error) { + return _RewardsCoordinatorStorage.Contract.DomainSeparator(&_RewardsCoordinatorStorage.CallOpts) +} + // GetCurrentClaimableDistributionRoot is a free data retrieval call binding the contract method 0x0e9a53cf. // // Solidity: function getCurrentClaimableDistributionRoot() view returns((bytes32,uint32,uint32,bool)) diff --git a/pkg/bindings/StrategyBase/binding.go b/pkg/bindings/StrategyBase/binding.go index 02377ad8a..816ccf8ab 100644 --- a/pkg/bindings/StrategyBase/binding.go +++ b/pkg/bindings/StrategyBase/binding.go @@ -32,7 +32,7 @@ var ( // StrategyBaseMetaData contains all meta data concerning the StrategyBase contract. var StrategyBaseMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162001ab438038062001ab4833981016040819052620000349162000114565b6001600160a01b0381166080526200004b62000052565b5062000146565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000112576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012757600080fd5b81516001600160a01b03811681146200013f57600080fd5b9392505050565b60805161193d620001776000396000818161019901528181610570015281816109f50152610ac0015261193d6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80635c975abb116100b8578063ab5921e11161007c578063ab5921e11461029c578063ce7c2ac2146102b1578063d9caed12146102c4578063e3dae51c146102d7578063f3e73875146102ea578063fabc1cbc146102fd57600080fd5b80635c975abb146102425780637a8b26371461024a578063886f11951461025d5780638c871019146102765780638f6a62401461028957600080fd5b806347e7ef24116100ff57806347e7ef24146101d2578063485cc955146101e5578063553ca5f8146101f8578063595c6a671461020b5780635ac86ab71461021357600080fd5b806310d67a2f1461013c578063136439dd146101515780632495a5991461016457806339b70e38146101945780633a98ef39146101bb575b600080fd5b61014f61014a3660046115a6565b610310565b005b61014f61015f3660046115c3565b6103cc565b603254610177906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101777f000000000000000000000000000000000000000000000000000000000000000081565b6101c460335481565b60405190815260200161018b565b6101c46101e03660046115dc565b610510565b61014f6101f3366004611608565b610754565b6101c46102063660046115a6565b610869565b61014f61087d565b610232610221366004611650565b6001805460ff9092161b9081161490565b604051901515815260200161018b565b6001546101c4565b6101c46102583660046115c3565b610949565b600054610177906201000090046001600160a01b031681565b6101c46102843660046115c3565b610994565b6101c46102973660046115a6565b61099f565b6102a46109ad565b60405161018b919061169d565b6101c46102bf3660046115a6565b6109cd565b61014f6102d23660046116d0565b610a62565b6101c46102e53660046115c3565b610c48565b6101c46102f83660046115c3565b610c81565b61014f61030b3660046115c3565b610c8c565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611711565b6001600160a01b0316336001600160a01b0316146103c05760405162461bcd60e51b81526004016103b79061172e565b60405180910390fd5b6103c981610de8565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190611778565b6104595760405162461bcd60e51b81526004016103b79061179a565b600154818116146104d25760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016103b7565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600180546000918291811614156105655760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105dd5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103b7565b6105e78484610eed565b60335460006105f86103e8836117f8565b905060006103e8610607610f6d565b61061191906117f8565b9050600061061f8783611810565b90508061062c8489611827565b6106369190611846565b95508561069c5760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b60648201526084016103b7565b6106a686856117f8565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156107305760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f534841524553600000000060648201526084016103b7565b610749826103e860335461074491906117f8565b610fdf565b505050505092915050565b600054610100900460ff16158080156107745750600054600160ff909116105b8061078e5750303b15801561078e575060005460ff166001145b6107f15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103b7565b6000805460ff191660011790558015610814576000805461ff0019166101001790555b61081e8383611033565b8015610864576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6000610877610258836109cd565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190611778565b61090a5760405162461bcd60e51b81526004016103b79061179a565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e860335461095c91906117f8565b905060006103e861096b610f6d565b61097591906117f8565b9050816109828583611827565b61098c9190611846565b949350505050565b600061087782610c48565b60006108776102f8836109cd565b60606040518060800160405280604d81526020016118bb604d9139905090565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108779190611868565b6001805460029081161415610ab55760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103b7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2d5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103b7565b610b3884848461117e565b60335480831115610bc75760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a4016103b7565b6000610bd56103e8836117f8565b905060006103e8610be4610f6d565b610bee91906117f8565b9050600082610bfd8784611827565b610c079190611846565b9050610c138685611810565b603355610c33610c238284611810565b6103e860335461074491906117f8565b610c3e888883611201565b5050505050505050565b6000806103e8603354610c5b91906117f8565b905060006103e8610c6a610f6d565b610c7491906117f8565b9050806109828386611827565b600061087782610949565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d039190611711565b6001600160a01b0316336001600160a01b031614610d335760405162461bcd60e51b81526004016103b79061172e565b600154198119600154191614610db15760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016103b7565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610505565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016103b7565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6032546001600160a01b03838116911614610f695760405162461bcd60e51b815260206004820152603660248201527f5374726174656779426173652e6465706f7369743a2043616e206f6e6c79206460448201527532b837b9b4ba103ab73232b9363cb4b733aa37b5b2b760511b60648201526084016103b7565b5050565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190611868565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be88161101384670de0b6b3a7640000611827565b61101d9190611846565b6040519081526020015b60405180910390a15050565b600054610100900460ff1661109e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103b7565b603280546001600160a01b0319166001600160a01b0384161790556110c4816000611215565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611139573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115d9190611881565b604080516001600160a01b03909316835260ff909116602083015201611027565b6032546001600160a01b038381169116146108645760405162461bcd60e51b815260206004820152603b60248201527f5374726174656779426173652e77697468647261773a2043616e206f6e6c792060448201527f77697468647261772074686520737472617465677920746f6b656e000000000060648201526084016103b7565b6108646001600160a01b0383168483611301565b6000546201000090046001600160a01b031615801561123c57506001600160a01b03821615155b6112be5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016103b7565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2610f6982610de8565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526108649286929160009161139191851690849061140e565b80519091501561086457808060200190518101906113af9190611778565b6108645760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b7565b606061141d8484600085611427565b90505b9392505050565b6060824710156114885760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103b7565b6001600160a01b0385163b6114df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516114fb919061189e565b60006040518083038185875af1925050503d8060008114611538576040519150601f19603f3d011682016040523d82523d6000602084013e61153d565b606091505b509150915061154d828286611558565b979650505050505050565b60608315611567575081611420565b8251156115775782518084602001fd5b8160405162461bcd60e51b81526004016103b7919061169d565b6001600160a01b03811681146103c957600080fd5b6000602082840312156115b857600080fd5b813561142081611591565b6000602082840312156115d557600080fd5b5035919050565b600080604083850312156115ef57600080fd5b82356115fa81611591565b946020939093013593505050565b6000806040838503121561161b57600080fd5b823561162681611591565b9150602083013561163681611591565b809150509250929050565b60ff811681146103c957600080fd5b60006020828403121561166257600080fd5b813561142081611641565b60005b83811015611688578181015183820152602001611670565b83811115611697576000848401525b50505050565b60208152600082518060208401526116bc81604085016020870161166d565b601f01601f19169190910160400192915050565b6000806000606084860312156116e557600080fd5b83356116f081611591565b9250602084013561170081611591565b929592945050506040919091013590565b60006020828403121561172357600080fd5b815161142081611591565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60006020828403121561178a57600080fd5b8151801515811461142057600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561180b5761180b6117e2565b500190565b600082821015611822576118226117e2565b500390565b6000816000190483118215151615611841576118416117e2565b500290565b60008261186357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561187a57600080fd5b5051919050565b60006020828403121561189357600080fd5b815161142081611641565b600082516118b081846020870161166d565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a264697066735822122010a959346f6109c589a9783919e1f435adfbf8e6f523baaaa3307a9e4b75ffcb64736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b5060405162001ab438038062001ab4833981016040819052620000349162000114565b6001600160a01b0381166080526200004b62000052565b5062000146565b600054610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000112576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012757600080fd5b81516001600160a01b03811681146200013f57600080fd5b9392505050565b60805161193d620001776000396000818161019901528181610570015281816109f50152610ac0015261193d6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80635c975abb116100b8578063ab5921e11161007c578063ab5921e11461029c578063ce7c2ac2146102b1578063d9caed12146102c4578063e3dae51c146102d7578063f3e73875146102ea578063fabc1cbc146102fd57600080fd5b80635c975abb146102425780637a8b26371461024a578063886f11951461025d5780638c871019146102765780638f6a62401461028957600080fd5b806347e7ef24116100ff57806347e7ef24146101d2578063485cc955146101e5578063553ca5f8146101f8578063595c6a671461020b5780635ac86ab71461021357600080fd5b806310d67a2f1461013c578063136439dd146101515780632495a5991461016457806339b70e38146101945780633a98ef39146101bb575b600080fd5b61014f61014a3660046115a6565b610310565b005b61014f61015f3660046115c3565b6103cc565b603254610177906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101777f000000000000000000000000000000000000000000000000000000000000000081565b6101c460335481565b60405190815260200161018b565b6101c46101e03660046115dc565b610510565b61014f6101f3366004611608565b610754565b6101c46102063660046115a6565b610869565b61014f61087d565b610232610221366004611650565b6001805460ff9092161b9081161490565b604051901515815260200161018b565b6001546101c4565b6101c46102583660046115c3565b610949565b600054610177906201000090046001600160a01b031681565b6101c46102843660046115c3565b610994565b6101c46102973660046115a6565b61099f565b6102a46109ad565b60405161018b919061169d565b6101c46102bf3660046115a6565b6109cd565b61014f6102d23660046116d0565b610a62565b6101c46102e53660046115c3565b610c48565b6101c46102f83660046115c3565b610c81565b61014f61030b3660046115c3565b610c8c565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611711565b6001600160a01b0316336001600160a01b0316146103c05760405162461bcd60e51b81526004016103b79061172e565b60405180910390fd5b6103c981610de8565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190611778565b6104595760405162461bcd60e51b81526004016103b79061179a565b600154818116146104d25760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016103b7565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b600180546000918291811614156105655760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105dd5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103b7565b6105e78484610eed565b60335460006105f86103e8836117f8565b905060006103e8610607610f6d565b61061191906117f8565b9050600061061f8783611810565b90508061062c8489611827565b6106369190611846565b95508561069c5760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b60648201526084016103b7565b6106a686856117f8565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156107305760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f534841524553600000000060648201526084016103b7565b610749826103e860335461074491906117f8565b610fdf565b505050505092915050565b600054610100900460ff16158080156107745750600054600160ff909116105b8061078e5750303b15801561078e575060005460ff166001145b6107f15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103b7565b6000805460ff191660011790558015610814576000805461ff0019166101001790555b61081e8383611033565b8015610864576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6000610877610258836109cd565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190611778565b61090a5760405162461bcd60e51b81526004016103b79061179a565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e860335461095c91906117f8565b905060006103e861096b610f6d565b61097591906117f8565b9050816109828583611827565b61098c9190611846565b949350505050565b600061087782610c48565b60006108776102f8836109cd565b60606040518060800160405280604d81526020016118bb604d9139905090565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108779190611868565b6001805460029081161415610ab55760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b60448201526064016103b7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2d5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e6167657260448201526064016103b7565b610b3884848461117e565b60335480831115610bc75760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a4016103b7565b6000610bd56103e8836117f8565b905060006103e8610be4610f6d565b610bee91906117f8565b9050600082610bfd8784611827565b610c079190611846565b9050610c138685611810565b603355610c33610c238284611810565b6103e860335461074491906117f8565b610c3e888883611201565b5050505050505050565b6000806103e8603354610c5b91906117f8565b905060006103e8610c6a610f6d565b610c7491906117f8565b9050806109828386611827565b600061087782610949565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d039190611711565b6001600160a01b0316336001600160a01b031614610d335760405162461bcd60e51b81526004016103b79061172e565b600154198119600154191614610db15760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016103b7565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610505565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016103b7565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6032546001600160a01b03838116911614610f695760405162461bcd60e51b815260206004820152603660248201527f5374726174656779426173652e6465706f7369743a2043616e206f6e6c79206460448201527532b837b9b4ba103ab73232b9363cb4b733aa37b5b2b760511b60648201526084016103b7565b5050565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190611868565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be88161101384670de0b6b3a7640000611827565b61101d9190611846565b6040519081526020015b60405180910390a15050565b600054610100900460ff1661109e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103b7565b603280546001600160a01b0319166001600160a01b0384161790556110c4816000611215565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611139573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115d9190611881565b604080516001600160a01b03909316835260ff909116602083015201611027565b6032546001600160a01b038381169116146108645760405162461bcd60e51b815260206004820152603b60248201527f5374726174656779426173652e77697468647261773a2043616e206f6e6c792060448201527f77697468647261772074686520737472617465677920746f6b656e000000000060648201526084016103b7565b6108646001600160a01b0383168483611301565b6000546201000090046001600160a01b031615801561123c57506001600160a01b03821615155b6112be5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016103b7565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2610f6982610de8565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526108649286929160009161139191851690849061140e565b80519091501561086457808060200190518101906113af9190611778565b6108645760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b7565b606061141d8484600085611427565b90505b9392505050565b6060824710156114885760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103b7565b6001600160a01b0385163b6114df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516114fb919061189e565b60006040518083038185875af1925050503d8060008114611538576040519150601f19603f3d011682016040523d82523d6000602084013e61153d565b606091505b509150915061154d828286611558565b979650505050505050565b60608315611567575081611420565b8251156115775782518084602001fd5b8160405162461bcd60e51b81526004016103b7919061169d565b6001600160a01b03811681146103c957600080fd5b6000602082840312156115b857600080fd5b813561142081611591565b6000602082840312156115d557600080fd5b5035919050565b600080604083850312156115ef57600080fd5b82356115fa81611591565b946020939093013593505050565b6000806040838503121561161b57600080fd5b823561162681611591565b9150602083013561163681611591565b809150509250929050565b60ff811681146103c957600080fd5b60006020828403121561166257600080fd5b813561142081611641565b60005b83811015611688578181015183820152602001611670565b83811115611697576000848401525b50505050565b60208152600082518060208401526116bc81604085016020870161166d565b601f01601f19169190910160400192915050565b6000806000606084860312156116e557600080fd5b83356116f081611591565b9250602084013561170081611591565b929592945050506040919091013590565b60006020828403121561172357600080fd5b815161142081611591565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60006020828403121561178a57600080fd5b8151801515811461142057600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561180b5761180b6117e2565b500190565b600082821015611822576118226117e2565b500390565b6000816000190483118215151615611841576118416117e2565b500290565b60008261186357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561187a57600080fd5b5051919050565b60006020828403121561189357600080fd5b815161142081611641565b600082516118b081846020870161166d565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a264697066735822122068d9216b487a66657c8cbc1c20d7ea4c0398e7ea40fb09a9f05c936e11ffc75164736f6c634300080c0033", } // StrategyBaseABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyBaseTVLLimits/binding.go b/pkg/bindings/StrategyBaseTVLLimits/binding.go index c0b5f85d3..b2dc99dd5 100644 --- a/pkg/bindings/StrategyBaseTVLLimits/binding.go +++ b/pkg/bindings/StrategyBaseTVLLimits/binding.go @@ -32,7 +32,7 @@ var ( // StrategyBaseTVLLimitsMetaData contains all meta data concerning the StrategyBaseTVLLimits contract. var StrategyBaseTVLLimitsMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getTVLLimits\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_maxPerDeposit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_maxTotalDeposits\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"maxPerDeposit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxTotalDeposits\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setTVLLimits\",\"inputs\":[{\"name\":\"newMaxPerDeposit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"newMaxTotalDeposits\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxPerDepositUpdated\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxTotalDepositsUpdated\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162001f4d38038062001f4d833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611dd46200017960003960008181610216015281816107a901528181610be70152610cb20152611dd46000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80635c975abb116100de578063ab5921e111610097578063df6fadc111610071578063df6fadc114610366578063e3dae51c14610381578063f3e7387514610394578063fabc1cbc146103a757600080fd5b8063ab5921e11461032b578063ce7c2ac214610340578063d9caed121461035357600080fd5b80635c975abb146102c857806361b01b5d146102d05780637a8b2637146102d9578063886f1195146102ec5780638c871019146103055780638f6a62401461031857600080fd5b80633a98ef391161014b578063485cc95511610125578063485cc9551461026b578063553ca5f81461027e578063595c6a67146102915780635ac86ab71461029957600080fd5b80633a98ef391461023857806343fe08b01461024f57806347e7ef241461025857600080fd5b8063019e27291461019357806310d67a2f146101a857806311c70c9d146101bb578063136439dd146101ce5780632495a599146101e157806339b70e3814610211575b600080fd5b6101a66101a1366004611983565b6103ba565b005b6101a66101b63660046119cd565b61049d565b6101a66101c93660046119ea565b610550565b6101a66101dc366004611a0c565b610605565b6032546101f4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b61024160335481565b604051908152602001610208565b61024160645481565b610241610266366004611a25565b610749565b6101a6610279366004611a51565b61098d565b61024161028c3660046119cd565b610a5b565b6101a6610a6f565b6102b86102a7366004611a99565b6001805460ff9092161b9081161490565b6040519015158152602001610208565b600154610241565b61024160655481565b6102416102e7366004611a0c565b610b3b565b6000546101f4906201000090046001600160a01b031681565b610241610313366004611a0c565b610b86565b6102416103263660046119cd565b610b91565b610333610b9f565b6040516102089190611ae6565b61024161034e3660046119cd565b610bbf565b6101a6610361366004611b19565b610c54565b60645460655460408051928352602083019190915201610208565b61024161038f366004611a0c565b610e3a565b6102416103a2366004611a0c565b610e73565b6101a66103b5366004611a0c565b610e7e565b600054610100900460ff16158080156103da5750600054600160ff909116105b806103f45750303b1580156103f4575060005460ff166001145b6104195760405162461bcd60e51b815260040161041090611b5a565b60405180910390fd5b6000805460ff19166001179055801561043c576000805461ff0019166101001790555b6104468585610fda565b61045083836110e7565b8015610496576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190611ba8565b6001600160a01b0316336001600160a01b0316146105445760405162461bcd60e51b815260040161041090611bc5565b61054d8161123a565b50565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c79190611ba8565b6001600160a01b0316336001600160a01b0316146105f75760405162461bcd60e51b815260040161041090611bc5565b6106018282610fda565b5050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106769190611c0f565b6106925760405162461bcd60e51b815260040161041090611c31565b6001548181161461070b5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610410565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6001805460009182918116141561079e5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610410565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108165760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e616765726044820152606401610410565b610820848461133f565b60335460006108316103e883611c8f565b905060006103e8610840611421565b61084a9190611c8f565b905060006108588783611ca7565b9050806108658489611cbe565b61086f9190611cdd565b9550856108d55760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b6064820152608401610410565b6108df8685611c8f565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156109695760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f53484152455360000000006064820152608401610410565b610982826103e860335461097d9190611c8f565b611493565b505050505092915050565b600054610100900460ff16158080156109ad5750600054600160ff909116105b806109c75750303b1580156109c7575060005460ff166001145b6109e35760405162461bcd60e51b815260040161041090611b5a565b6000805460ff191660011790558015610a06576000805461ff0019166101001790555b610a1083836110e7565b8015610a56576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6000610a696102e783610bbf565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190611c0f565b610afc5760405162461bcd60e51b815260040161041090611c31565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e8603354610b4e9190611c8f565b905060006103e8610b5d611421565b610b679190611c8f565b905081610b748583611cbe565b610b7e9190611cdd565b949350505050565b6000610a6982610e3a565b6000610a696103a283610bbf565b60606040518060800160405280604d8152602001611d52604d9139905090565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a699190611cff565b6001805460029081161415610ca75760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610410565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d1f5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e616765726044820152606401610410565b610d2a8484846114df565b60335480831115610db95760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a401610410565b6000610dc76103e883611c8f565b905060006103e8610dd6611421565b610de09190611c8f565b9050600082610def8784611cbe565b610df99190611cdd565b9050610e058685611ca7565b603355610e25610e158284611ca7565b6103e860335461097d9190611c8f565b610e30888883611562565b5050505050505050565b6000806103e8603354610e4d9190611c8f565b905060006103e8610e5c611421565b610e669190611c8f565b905080610b748386611cbe565b6000610a6982610b3b565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef59190611ba8565b6001600160a01b0316336001600160a01b031614610f255760405162461bcd60e51b815260040161041090611bc5565b600154198119600154191614610fa35760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610410565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200161073e565b60645460408051918252602082018490527ff97ed4e083acac67830025ecbc756d8fe847cdbdca4cee3fe1e128e98b54ecb5910160405180910390a160655460408051918252602082018390527f6ab181e0440bfbf4bacdf2e99674735ce6638005490688c5f994f5399353e452910160405180910390a1808211156110dc5760405162461bcd60e51b815260206004820152604b60248201527f53747261746567794261736554564c4c696d6974732e5f73657454564c4c696d60448201527f6974733a206d61785065724465706f7369742065786365656473206d6178546f60648201526a74616c4465706f7369747360a81b608482015260a401610410565b606491909155606555565b600054610100900460ff166111525760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610410565b603280546001600160a01b0319166001600160a01b038416179055611178816000611576565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112119190611d18565b604080516001600160a01b03909316835260ff9091166020830152015b60405180910390a15050565b6001600160a01b0381166112c85760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610410565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6064548111156113a95760405162461bcd60e51b815260206004820152602f60248201527f53747261746567794261736554564c4c696d6974733a206d617820706572206460448201526e195c1bdcda5d08195e18d959591959608a1b6064820152608401610410565b6065546113b4611421565b11156114175760405162461bcd60e51b815260206004820152602c60248201527f53747261746567794261736554564c4c696d6974733a206d6178206465706f7360448201526b1a5d1cc8195e18d95959195960a21b6064820152608401610410565b6106018282611662565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561146a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148e9190611cff565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be8816114c784670de0b6b3a7640000611cbe565b6114d19190611cdd565b60405190815260200161122e565b6032546001600160a01b03838116911614610a565760405162461bcd60e51b815260206004820152603b60248201527f5374726174656779426173652e77697468647261773a2043616e206f6e6c792060448201527f77697468647261772074686520737472617465677920746f6b656e00000000006064820152608401610410565b610a566001600160a01b03831684836116de565b6000546201000090046001600160a01b031615801561159d57506001600160a01b03821615155b61161f5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610410565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26106018261123a565b6032546001600160a01b038381169116146106015760405162461bcd60e51b815260206004820152603660248201527f5374726174656779426173652e6465706f7369743a2043616e206f6e6c79206460448201527532b837b9b4ba103ab73232b9363cb4b733aa37b5b2b760511b6064820152608401610410565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610a569286929160009161176e9185169084906117eb565b805190915015610a56578080602001905181019061178c9190611c0f565b610a565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610410565b60606117fa8484600085611804565b90505b9392505050565b6060824710156118655760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610410565b6001600160a01b0385163b6118bc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610410565b600080866001600160a01b031685876040516118d89190611d35565b60006040518083038185875af1925050503d8060008114611915576040519150601f19603f3d011682016040523d82523d6000602084013e61191a565b606091505b509150915061192a828286611935565b979650505050505050565b606083156119445750816117fd565b8251156119545782518084602001fd5b8160405162461bcd60e51b81526004016104109190611ae6565b6001600160a01b038116811461054d57600080fd5b6000806000806080858703121561199957600080fd5b843593506020850135925060408501356119b28161196e565b915060608501356119c28161196e565b939692955090935050565b6000602082840312156119df57600080fd5b81356117fd8161196e565b600080604083850312156119fd57600080fd5b50508035926020909101359150565b600060208284031215611a1e57600080fd5b5035919050565b60008060408385031215611a3857600080fd5b8235611a438161196e565b946020939093013593505050565b60008060408385031215611a6457600080fd5b8235611a6f8161196e565b91506020830135611a7f8161196e565b809150509250929050565b60ff8116811461054d57600080fd5b600060208284031215611aab57600080fd5b81356117fd81611a8a565b60005b83811015611ad1578181015183820152602001611ab9565b83811115611ae0576000848401525b50505050565b6020815260008251806020840152611b05816040850160208701611ab6565b601f01601f19169190910160400192915050565b600080600060608486031215611b2e57600080fd5b8335611b398161196e565b92506020840135611b498161196e565b929592945050506040919091013590565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208284031215611bba57600080fd5b81516117fd8161196e565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611c2157600080fd5b815180151581146117fd57600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ca257611ca2611c79565b500190565b600082821015611cb957611cb9611c79565b500390565b6000816000190483118215151615611cd857611cd8611c79565b500290565b600082611cfa57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611d1157600080fd5b5051919050565b600060208284031215611d2a57600080fd5b81516117fd81611a8a565b60008251611d47818460208701611ab6565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a26469706673582212208549fd2100ff79e56d7fded410ac662be502dbe16e18a815844148c99c0b5bc864736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b5060405162001f4d38038062001f4d833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611dd46200017960003960008181610216015281816107a901528181610be70152610cb20152611dd46000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80635c975abb116100de578063ab5921e111610097578063df6fadc111610071578063df6fadc114610366578063e3dae51c14610381578063f3e7387514610394578063fabc1cbc146103a757600080fd5b8063ab5921e11461032b578063ce7c2ac214610340578063d9caed121461035357600080fd5b80635c975abb146102c857806361b01b5d146102d05780637a8b2637146102d9578063886f1195146102ec5780638c871019146103055780638f6a62401461031857600080fd5b80633a98ef391161014b578063485cc95511610125578063485cc9551461026b578063553ca5f81461027e578063595c6a67146102915780635ac86ab71461029957600080fd5b80633a98ef391461023857806343fe08b01461024f57806347e7ef241461025857600080fd5b8063019e27291461019357806310d67a2f146101a857806311c70c9d146101bb578063136439dd146101ce5780632495a599146101e157806339b70e3814610211575b600080fd5b6101a66101a1366004611983565b6103ba565b005b6101a66101b63660046119cd565b61049d565b6101a66101c93660046119ea565b610550565b6101a66101dc366004611a0c565b610605565b6032546101f4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b61024160335481565b604051908152602001610208565b61024160645481565b610241610266366004611a25565b610749565b6101a6610279366004611a51565b61098d565b61024161028c3660046119cd565b610a5b565b6101a6610a6f565b6102b86102a7366004611a99565b6001805460ff9092161b9081161490565b6040519015158152602001610208565b600154610241565b61024160655481565b6102416102e7366004611a0c565b610b3b565b6000546101f4906201000090046001600160a01b031681565b610241610313366004611a0c565b610b86565b6102416103263660046119cd565b610b91565b610333610b9f565b6040516102089190611ae6565b61024161034e3660046119cd565b610bbf565b6101a6610361366004611b19565b610c54565b60645460655460408051928352602083019190915201610208565b61024161038f366004611a0c565b610e3a565b6102416103a2366004611a0c565b610e73565b6101a66103b5366004611a0c565b610e7e565b600054610100900460ff16158080156103da5750600054600160ff909116105b806103f45750303b1580156103f4575060005460ff166001145b6104195760405162461bcd60e51b815260040161041090611b5a565b60405180910390fd5b6000805460ff19166001179055801561043c576000805461ff0019166101001790555b6104468585610fda565b61045083836110e7565b8015610496576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190611ba8565b6001600160a01b0316336001600160a01b0316146105445760405162461bcd60e51b815260040161041090611bc5565b61054d8161123a565b50565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c79190611ba8565b6001600160a01b0316336001600160a01b0316146105f75760405162461bcd60e51b815260040161041090611bc5565b6106018282610fda565b5050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106769190611c0f565b6106925760405162461bcd60e51b815260040161041090611c31565b6001548181161461070b5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610410565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6001805460009182918116141561079e5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610410565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108165760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e616765726044820152606401610410565b610820848461133f565b60335460006108316103e883611c8f565b905060006103e8610840611421565b61084a9190611c8f565b905060006108588783611ca7565b9050806108658489611cbe565b61086f9190611cdd565b9550856108d55760405162461bcd60e51b815260206004820152602e60248201527f5374726174656779426173652e6465706f7369743a206e65775368617265732060448201526d63616e6e6f74206265207a65726f60901b6064820152608401610410565b6108df8685611c8f565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156109695760405162461bcd60e51b815260206004820152603c60248201527f5374726174656779426173652e6465706f7369743a20746f74616c536861726560448201527f73206578636565647320604d41585f544f54414c5f53484152455360000000006064820152608401610410565b610982826103e860335461097d9190611c8f565b611493565b505050505092915050565b600054610100900460ff16158080156109ad5750600054600160ff909116105b806109c75750303b1580156109c7575060005460ff166001145b6109e35760405162461bcd60e51b815260040161041090611b5a565b6000805460ff191660011790558015610a06576000805461ff0019166101001790555b610a1083836110e7565b8015610a56576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6000610a696102e783610bbf565b92915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190611c0f565b610afc5760405162461bcd60e51b815260040161041090611c31565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000806103e8603354610b4e9190611c8f565b905060006103e8610b5d611421565b610b679190611c8f565b905081610b748583611cbe565b610b7e9190611cdd565b949350505050565b6000610a6982610e3a565b6000610a696103a283610bbf565b60606040518060800160405280604d8152602001611d52604d9139905090565b604051633d3f06c960e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637a7e0d9290604401602060405180830381865afa158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a699190611cff565b6001805460029081161415610ca75760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610410565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d1f5760405162461bcd60e51b815260206004820181905260248201527f5374726174656779426173652e6f6e6c7953747261746567794d616e616765726044820152606401610410565b610d2a8484846114df565b60335480831115610db95760405162461bcd60e51b815260206004820152604d60248201527f5374726174656779426173652e77697468647261773a20616d6f756e7453686160448201527f726573206d757374206265206c657373207468616e206f7220657175616c207460648201526c6f20746f74616c53686172657360981b608482015260a401610410565b6000610dc76103e883611c8f565b905060006103e8610dd6611421565b610de09190611c8f565b9050600082610def8784611cbe565b610df99190611cdd565b9050610e058685611ca7565b603355610e25610e158284611ca7565b6103e860335461097d9190611c8f565b610e30888883611562565b5050505050505050565b6000806103e8603354610e4d9190611c8f565b905060006103e8610e5c611421565b610e669190611c8f565b905080610b748386611cbe565b6000610a6982610b3b565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef59190611ba8565b6001600160a01b0316336001600160a01b031614610f255760405162461bcd60e51b815260040161041090611bc5565b600154198119600154191614610fa35760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610410565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200161073e565b60645460408051918252602082018490527ff97ed4e083acac67830025ecbc756d8fe847cdbdca4cee3fe1e128e98b54ecb5910160405180910390a160655460408051918252602082018390527f6ab181e0440bfbf4bacdf2e99674735ce6638005490688c5f994f5399353e452910160405180910390a1808211156110dc5760405162461bcd60e51b815260206004820152604b60248201527f53747261746567794261736554564c4c696d6974732e5f73657454564c4c696d60448201527f6974733a206d61785065724465706f7369742065786365656473206d6178546f60648201526a74616c4465706f7369747360a81b608482015260a401610410565b606491909155606555565b600054610100900460ff166111525760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610410565b603280546001600160a01b0319166001600160a01b038416179055611178816000611576565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507603260009054906101000a90046001600160a01b0316836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112119190611d18565b604080516001600160a01b03909316835260ff9091166020830152015b60405180910390a15050565b6001600160a01b0381166112c85760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610410565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6064548111156113a95760405162461bcd60e51b815260206004820152602f60248201527f53747261746567794261736554564c4c696d6974733a206d617820706572206460448201526e195c1bdcda5d08195e18d959591959608a1b6064820152608401610410565b6065546113b4611421565b11156114175760405162461bcd60e51b815260206004820152602c60248201527f53747261746567794261736554564c4c696d6974733a206d6178206465706f7360448201526b1a5d1cc8195e18d95959195960a21b6064820152608401610410565b6106018282611662565b6032546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561146a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148e9190611cff565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be8816114c784670de0b6b3a7640000611cbe565b6114d19190611cdd565b60405190815260200161122e565b6032546001600160a01b03838116911614610a565760405162461bcd60e51b815260206004820152603b60248201527f5374726174656779426173652e77697468647261773a2043616e206f6e6c792060448201527f77697468647261772074686520737472617465677920746f6b656e00000000006064820152608401610410565b610a566001600160a01b03831684836116de565b6000546201000090046001600160a01b031615801561159d57506001600160a01b03821615155b61161f5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610410565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a26106018261123a565b6032546001600160a01b038381169116146106015760405162461bcd60e51b815260206004820152603660248201527f5374726174656779426173652e6465706f7369743a2043616e206f6e6c79206460448201527532b837b9b4ba103ab73232b9363cb4b733aa37b5b2b760511b6064820152608401610410565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610a569286929160009161176e9185169084906117eb565b805190915015610a56578080602001905181019061178c9190611c0f565b610a565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610410565b60606117fa8484600085611804565b90505b9392505050565b6060824710156118655760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610410565b6001600160a01b0385163b6118bc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610410565b600080866001600160a01b031685876040516118d89190611d35565b60006040518083038185875af1925050503d8060008114611915576040519150601f19603f3d011682016040523d82523d6000602084013e61191a565b606091505b509150915061192a828286611935565b979650505050505050565b606083156119445750816117fd565b8251156119545782518084602001fd5b8160405162461bcd60e51b81526004016104109190611ae6565b6001600160a01b038116811461054d57600080fd5b6000806000806080858703121561199957600080fd5b843593506020850135925060408501356119b28161196e565b915060608501356119c28161196e565b939692955090935050565b6000602082840312156119df57600080fd5b81356117fd8161196e565b600080604083850312156119fd57600080fd5b50508035926020909101359150565b600060208284031215611a1e57600080fd5b5035919050565b60008060408385031215611a3857600080fd5b8235611a438161196e565b946020939093013593505050565b60008060408385031215611a6457600080fd5b8235611a6f8161196e565b91506020830135611a7f8161196e565b809150509250929050565b60ff8116811461054d57600080fd5b600060208284031215611aab57600080fd5b81356117fd81611a8a565b60005b83811015611ad1578181015183820152602001611ab9565b83811115611ae0576000848401525b50505050565b6020815260008251806020840152611b05816040850160208701611ab6565b601f01601f19169190910160400192915050565b600080600060608486031215611b2e57600080fd5b8335611b398161196e565b92506020840135611b498161196e565b929592945050506040919091013590565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208284031215611bba57600080fd5b81516117fd8161196e565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215611c2157600080fd5b815180151581146117fd57600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ca257611ca2611c79565b500190565b600082821015611cb957611cb9611c79565b500390565b6000816000190483118215151615611cd857611cd8611c79565b500290565b600082611cfa57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611d1157600080fd5b5051919050565b600060208284031215611d2a57600080fd5b81516117fd81611a8a565b60008251611d47818460208701611ab6565b919091019291505056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a2646970667358221220fd18cc796f218c3256d1739ba19fc1363c8f9718278db2c0facb60827afc8f6964736f6c634300080c0033", } // StrategyBaseTVLLimitsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyFactory/binding.go b/pkg/bindings/StrategyFactory/binding.go index cd0633c74..de144fae7 100644 --- a/pkg/bindings/StrategyFactory/binding.go +++ b/pkg/bindings/StrategyFactory/binding.go @@ -32,7 +32,7 @@ var ( // StrategyFactoryMetaData contains all meta data concerning the StrategyFactory contract. var StrategyFactoryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"blacklistTokens\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deployNewStrategy\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"newStrategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deployedStrategies\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_strategyBeacon\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBlacklisted\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyBeacon\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistStrategies\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyBeaconModified\",\"inputs\":[{\"name\":\"previousBeacon\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIBeacon\"},{\"name\":\"newBeacon\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIBeacon\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategySetForToken\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenBlacklisted\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b50604051620024ae380380620024ae833981016040819052620000349162000114565b6001600160a01b0381166080526200004b62000052565b5062000146565b603354610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60335460ff908116101562000112576033805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012757600080fd5b81516001600160a01b03811681146200013f57600080fd5b9392505050565b608051612329620001856000396000818161019701528181610829015281816108cc01528181610a1d01528181610d4a015261111101526123296000f3fe60806040523480156200001157600080fd5b5060043610620001455760003560e01c80636b9b622911620000bb578063f0062d9a116200007a578063f0062d9a14620002e1578063f2fde38b14620002f5578063fabc1cbc146200030c578063fe38b32d1462000323578063fe575a87146200033a57600080fd5b80636b9b62291462000283578063715018a6146200029a578063886f119514620002a45780638da5cb5b14620002b8578063be20309414620002ca57600080fd5b8063581dfd651162000108578063581dfd6514620001ed578063595c6a6714620002195780635ac86ab714620002235780635c975abb146200025a578063697d54b4146200026c57600080fd5b806310d67a2f146200014a578063136439dd146200016357806323103c41146200017a57806339b70e3814620001915780634e5a426314620001d6575b600080fd5b620001616200015b366004620014d8565b62000360565b005b6200016162000174366004620014ff565b62000424565b620001616200018b36600462001568565b6200056b565b620001b97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b62000161620001e7366004620015bd565b6200089b565b620001b9620001fe366004620014d8565b6001602052600090815260409020546001600160a01b031681565b620001616200092f565b6200024962000234366004620015fb565b609954600160ff9092169190911b9081161490565b6040519015158152602001620001cd565b609954604051908152602001620001cd565b620001616200027d36600462001620565b620009fc565b620001b962000294366004620014d8565b62000a5a565b6200016162000dc1565b609854620001b9906001600160a01b031681565b6066546001600160a01b0316620001b9565b62000161620002db36600462001693565b62000dd9565b600054620001b9906001600160a01b031681565b6200016162000306366004620014d8565b62000f0f565b620001616200031d366004620014ff565b62000f8b565b620001616200033436600462001568565b620010f0565b620002496200034b366004620014d8565b60026020526000908152604090205460ff1681565b609860009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003da9190620016ed565b6001600160a01b0316336001600160a01b031614620004165760405162461bcd60e51b81526004016200040d906200170d565b60405180910390fd5b62000421816200114a565b50565b60985460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156200046d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000493919062001757565b620004b25760405162461bcd60e51b81526004016200040d9062001777565b609954818116146200052d5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016200040d565b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6200057562001243565b60008167ffffffffffffffff811115620005935762000593620017bf565b604051908082528060200260200182016040528015620005bd578160200160208202803683370190505b5090506000805b83811015620008075760026000868684818110620005e657620005e6620017d5565b9050602002016020810190620005fd9190620014d8565b6001600160a01b0316815260208101919091526040016000205460ff16156200069b5760405162461bcd60e51b815260206004820152604360248201527f5374726174656779466163746f72792e626c61636b6c697374546f6b656e733a60448201527f2043616e6e6f7420626c61636b6c697374206465706c6f79656420737472617460648201526265677960e81b608482015260a4016200040d565b600160026000878785818110620006b657620006b6620017d5565b9050602002016020810190620006cd9190620014d8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f75519c51f39873ec0e27dd3bbc09549e4865a113f505393fb9eab5898f6418b38585838181106200072b576200072b620017d5565b9050602002016020810190620007429190620014d8565b6040516001600160a01b03909116815260200160405180910390a1600060016000878785818110620007785762000778620017d5565b90506020020160208101906200078f9190620014d8565b6001600160a01b0390811682526020820192909252604001600020541690508015620007f35780848481518110620007cb57620007cb620017d5565b6001600160a01b039092166020928302919091019091015282620007ef81620017eb565b9350505b50620007ff81620017eb565b9050620005c4565b50808252801562000895576040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b890620008609085906004016200185b565b600060405180830381600087803b1580156200087b57600080fd5b505af115801562000890573d6000803e3d6000fd5b505050505b50505050565b620008a562001243565b604051634e5a426360e01b81526001600160a01b03838116600483015282151560248301527f00000000000000000000000000000000000000000000000000000000000000001690634e5a4263906044015b600060405180830381600087803b1580156200091257600080fd5b505af115801562000927573d6000803e3d6000fd5b505050505050565b60985460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa15801562000978573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200099e919062001757565b620009bd5760405162461bcd60e51b81526004016200040d9062001777565b600019609981905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b62000a0662001243565b60405163df5b354760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063df5b35479062000860908790879087908790600401620018b2565b60995460009081906001908116141562000ab75760405162461bcd60e51b815260206004820152601960248201527f5061757361626c653a20696e646578206973207061757365640000000000000060448201526064016200040d565b6001600160a01b03831660009081526002602052604090205460ff161562000b485760405162461bcd60e51b815260206004820152603760248201527f5374726174656779466163746f72792e6465706c6f794e65775374726174656760448201527f793a20546f6b656e20697320626c61636b6c697374656400000000000000000060648201526084016200040d565b6001600160a01b03838116600090815260016020526040902054161562000be65760405162461bcd60e51b8152602060048201526044602482018190527f5374726174656779466163746f72792e6465706c6f794e657753747261746567908201527f793a20537472617465677920616c72656164792065786973747320666f72207460648201526337b5b2b760e11b608482015260a4016200040d565b600080546098546040516001600160a01b038781166024830152918216604482015291169063485cc95560e01b9060640160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000c5690620014b4565b62000c6392919062001916565b604051809103906000f08015801562000c80573d6000803e3d6000fd5b50905062000c8f84826200129f565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050828260008151811062000ceb5762000ceb620017d5565b60200260200101906001600160a01b031690816001600160a01b03168152505060008160008151811062000d235762000d23620017d5565b9115156020928302919091019091015260405163df5b354760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063df5b35479062000d8390859085906004016200197e565b600060405180830381600087803b15801562000d9e57600080fd5b505af115801562000db3573d6000803e3d6000fd5b509498975050505050505050565b62000dcb62001243565b62000dd760006200130a565b565b603354610100900460ff161580801562000dfa5750603354600160ff909116105b8062000e165750303b15801562000e16575060335460ff166001145b62000e7b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200040d565b6033805460ff19166001179055801562000e9f576033805461ff0019166101001790555b62000eaa856200130a565b62000eb684846200135c565b62000ec1826200144b565b801562000f08576033805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b62000f1962001243565b6001600160a01b03811662000f805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200040d565b62000421816200130a565b609860009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010059190620016ed565b6001600160a01b0316336001600160a01b031614620010385760405162461bcd60e51b81526004016200040d906200170d565b609954198119609954191614620010b85760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016200040d565b609981905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200162000560565b620010fa62001243565b6040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b890620008f79085908590600401620019db565b6001600160a01b038116620011da5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016200040d565b609854604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1609880546001600160a01b0319166001600160a01b0392909216919091179055565b6066546001600160a01b0316331462000dd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200040d565b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f6852a55230ef089d785bce7ffbf757985de34026df90a87d7b4a6e56f95d251f910160405180910390a15050565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6098546001600160a01b03161580156200137e57506001600160a01b03821615155b620014025760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016200040d565b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a262001447826200114a565b5050565b600054604080516001600160a01b03928316815291831660208301527fe21755962a7d7e100b59b9c3e4d4b54085b146313719955efb6a7a25c5c7feee910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6108fa80620019fa83390190565b6001600160a01b03811681146200042157600080fd5b600060208284031215620014eb57600080fd5b8135620014f881620014c2565b9392505050565b6000602082840312156200151257600080fd5b5035919050565b60008083601f8401126200152c57600080fd5b50813567ffffffffffffffff8111156200154557600080fd5b6020830191508360208260051b85010111156200156157600080fd5b9250929050565b600080602083850312156200157c57600080fd5b823567ffffffffffffffff8111156200159457600080fd5b620015a28582860162001519565b90969095509350505050565b80151581146200042157600080fd5b60008060408385031215620015d157600080fd5b8235620015de81620014c2565b91506020830135620015f081620015ae565b809150509250929050565b6000602082840312156200160e57600080fd5b813560ff81168114620014f857600080fd5b600080600080604085870312156200163757600080fd5b843567ffffffffffffffff808211156200165057600080fd5b6200165e8883890162001519565b909650945060208701359150808211156200167857600080fd5b50620016878782880162001519565b95989497509550505050565b60008060008060808587031215620016aa57600080fd5b8435620016b781620014c2565b93506020850135620016c981620014c2565b9250604085013591506060850135620016e281620014c2565b939692955090935050565b6000602082840312156200170057600080fd5b8151620014f881620014c2565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b6000602082840312156200176a57600080fd5b8151620014f881620015ae565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006000198214156200180e57634e487b7160e01b600052601160045260246000fd5b5060010190565b600081518084526020808501945080840160005b83811015620018505781516001600160a01b03168752958201959082019060010162001829565b509495945050505050565b602081526000620014f8602083018462001815565b8183526000602080850194508260005b85811015620018505781356200189681620014c2565b6001600160a01b03168752958201959082019060010162001880565b604081526000620018c860408301868862001870565b8281036020848101919091528482528591810160005b8681101562001909578335620018f481620015ae565b151582529282019290820190600101620018de565b5098975050505050505050565b60018060a01b038316815260006020604081840152835180604085015260005b81811015620019545785810183015185820160600152820162001936565b8181111562001967576000606083870101525b50601f01601f191692909201606001949350505050565b60408152600062001993604083018562001815565b82810360208481019190915284518083528582019282019060005b81811015620019ce578451151583529383019391830191600101620019ae565b5090979650505050505050565b602081526000620019f160208301848662001870565b94935050505056fe60806040526040516108fa3803806108fa83398101604081905261002291610456565b61002e82826000610035565b5050610580565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610516565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610516565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108d3602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b60606001600160a01b0384163b6103495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610169565b600080856001600160a01b0316856040516103649190610531565b600060405180830381855af49150503d806000811461039f576040519150601f19603f3d011682016040523d82523d6000602084013e6103a4565b606091505b5090925090506103b58282866103bf565b9695505050505050565b606083156103ce5750816102c8565b8251156103de5782518084602001fd5b8160405162461bcd60e51b8152600401610169919061054d565b80516001600160a01b038116811461040f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044557818101518382015260200161042d565b838111156100f95750506000910152565b6000806040838503121561046957600080fd5b610472836103f8565b60208401519092506001600160401b038082111561048f57600080fd5b818501915085601f8301126104a357600080fd5b8151818111156104b5576104b5610414565b604051601f8201601f19908116603f011681019083821181831017156104dd576104dd610414565b816040528281528860208487010111156104f657600080fd5b61050783602083016020880161042a565b80955050505050509250929050565b60006020828403121561052857600080fd5b6102c8826103f8565b6000825161054381846020870161042a565b9190910192915050565b602081526000825180602084015261056c81604085016020870161042a565b601f01601f19169190910160400192915050565b6103448061058f6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102e860279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061023f565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b60606001600160a01b0384163b6101915760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b0316856040516101ac9190610298565b600060405180830381855af49150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50915091506101fc828286610206565b9695505050505050565b6060831561021557508161004e565b8251156102255782518084602001fd5b8160405162461bcd60e51b815260040161018891906102b4565b60006020828403121561025157600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028357818101518382015260200161026b565b83811115610292576000848401525b50505050565b600082516102aa818460208701610268565b9190910192915050565b60208152600082518060208401526102d3816040850160208701610268565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206225174df4b558257f66ac9aa53b52c29cdd29a561b03eb6d75a95018aff3e5864736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205ec4c51d66eda3a5cc6c4836684b038a334a62fe205ea7e8aaa91c0a44cd1bb364736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b50604051620024ae380380620024ae833981016040819052620000349162000114565b6001600160a01b0381166080526200004b62000052565b5062000146565b603354610100900460ff1615620000bf5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60335460ff908116101562000112576033805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012757600080fd5b81516001600160a01b03811681146200013f57600080fd5b9392505050565b608051612329620001856000396000818161019701528181610829015281816108cc01528181610a1d01528181610d4a015261111101526123296000f3fe60806040523480156200001157600080fd5b5060043610620001455760003560e01c80636b9b622911620000bb578063f0062d9a116200007a578063f0062d9a14620002e1578063f2fde38b14620002f5578063fabc1cbc146200030c578063fe38b32d1462000323578063fe575a87146200033a57600080fd5b80636b9b62291462000283578063715018a6146200029a578063886f119514620002a45780638da5cb5b14620002b8578063be20309414620002ca57600080fd5b8063581dfd651162000108578063581dfd6514620001ed578063595c6a6714620002195780635ac86ab714620002235780635c975abb146200025a578063697d54b4146200026c57600080fd5b806310d67a2f146200014a578063136439dd146200016357806323103c41146200017a57806339b70e3814620001915780634e5a426314620001d6575b600080fd5b620001616200015b366004620014d8565b62000360565b005b6200016162000174366004620014ff565b62000424565b620001616200018b36600462001568565b6200056b565b620001b97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b62000161620001e7366004620015bd565b6200089b565b620001b9620001fe366004620014d8565b6001602052600090815260409020546001600160a01b031681565b620001616200092f565b6200024962000234366004620015fb565b609954600160ff9092169190911b9081161490565b6040519015158152602001620001cd565b609954604051908152602001620001cd565b620001616200027d36600462001620565b620009fc565b620001b962000294366004620014d8565b62000a5a565b6200016162000dc1565b609854620001b9906001600160a01b031681565b6066546001600160a01b0316620001b9565b62000161620002db36600462001693565b62000dd9565b600054620001b9906001600160a01b031681565b6200016162000306366004620014d8565b62000f0f565b620001616200031d366004620014ff565b62000f8b565b620001616200033436600462001568565b620010f0565b620002496200034b366004620014d8565b60026020526000908152604090205460ff1681565b609860009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003da9190620016ed565b6001600160a01b0316336001600160a01b031614620004165760405162461bcd60e51b81526004016200040d906200170d565b60405180910390fd5b62000421816200114a565b50565b60985460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa1580156200046d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000493919062001757565b620004b25760405162461bcd60e51b81526004016200040d9062001777565b609954818116146200052d5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c697479000000000000000060648201526084016200040d565b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6200057562001243565b60008167ffffffffffffffff811115620005935762000593620017bf565b604051908082528060200260200182016040528015620005bd578160200160208202803683370190505b5090506000805b83811015620008075760026000868684818110620005e657620005e6620017d5565b9050602002016020810190620005fd9190620014d8565b6001600160a01b0316815260208101919091526040016000205460ff16156200069b5760405162461bcd60e51b815260206004820152604360248201527f5374726174656779466163746f72792e626c61636b6c697374546f6b656e733a60448201527f2043616e6e6f7420626c61636b6c697374206465706c6f79656420737472617460648201526265677960e81b608482015260a4016200040d565b600160026000878785818110620006b657620006b6620017d5565b9050602002016020810190620006cd9190620014d8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f75519c51f39873ec0e27dd3bbc09549e4865a113f505393fb9eab5898f6418b38585838181106200072b576200072b620017d5565b9050602002016020810190620007429190620014d8565b6040516001600160a01b03909116815260200160405180910390a1600060016000878785818110620007785762000778620017d5565b90506020020160208101906200078f9190620014d8565b6001600160a01b0390811682526020820192909252604001600020541690508015620007f35780848481518110620007cb57620007cb620017d5565b6001600160a01b039092166020928302919091019091015282620007ef81620017eb565b9350505b50620007ff81620017eb565b9050620005c4565b50808252801562000895576040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b890620008609085906004016200185b565b600060405180830381600087803b1580156200087b57600080fd5b505af115801562000890573d6000803e3d6000fd5b505050505b50505050565b620008a562001243565b604051634e5a426360e01b81526001600160a01b03838116600483015282151560248301527f00000000000000000000000000000000000000000000000000000000000000001690634e5a4263906044015b600060405180830381600087803b1580156200091257600080fd5b505af115801562000927573d6000803e3d6000fd5b505050505050565b60985460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa15801562000978573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200099e919062001757565b620009bd5760405162461bcd60e51b81526004016200040d9062001777565b600019609981905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b62000a0662001243565b60405163df5b354760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063df5b35479062000860908790879087908790600401620018b2565b60995460009081906001908116141562000ab75760405162461bcd60e51b815260206004820152601960248201527f5061757361626c653a20696e646578206973207061757365640000000000000060448201526064016200040d565b6001600160a01b03831660009081526002602052604090205460ff161562000b485760405162461bcd60e51b815260206004820152603760248201527f5374726174656779466163746f72792e6465706c6f794e65775374726174656760448201527f793a20546f6b656e20697320626c61636b6c697374656400000000000000000060648201526084016200040d565b6001600160a01b03838116600090815260016020526040902054161562000be65760405162461bcd60e51b8152602060048201526044602482018190527f5374726174656779466163746f72792e6465706c6f794e657753747261746567908201527f793a20537472617465677920616c72656164792065786973747320666f72207460648201526337b5b2b760e11b608482015260a4016200040d565b600080546098546040516001600160a01b038781166024830152918216604482015291169063485cc95560e01b9060640160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000c5690620014b4565b62000c6392919062001916565b604051809103906000f08015801562000c80573d6000803e3d6000fd5b50905062000c8f84826200129f565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050828260008151811062000ceb5762000ceb620017d5565b60200260200101906001600160a01b031690816001600160a01b03168152505060008160008151811062000d235762000d23620017d5565b9115156020928302919091019091015260405163df5b354760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063df5b35479062000d8390859085906004016200197e565b600060405180830381600087803b15801562000d9e57600080fd5b505af115801562000db3573d6000803e3d6000fd5b509498975050505050505050565b62000dcb62001243565b62000dd760006200130a565b565b603354610100900460ff161580801562000dfa5750603354600160ff909116105b8062000e165750303b15801562000e16575060335460ff166001145b62000e7b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200040d565b6033805460ff19166001179055801562000e9f576033805461ff0019166101001790555b62000eaa856200130a565b62000eb684846200135c565b62000ec1826200144b565b801562000f08576033805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b62000f1962001243565b6001600160a01b03811662000f805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200040d565b62000421816200130a565b609860009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010059190620016ed565b6001600160a01b0316336001600160a01b031614620010385760405162461bcd60e51b81526004016200040d906200170d565b609954198119609954191614620010b85760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c697479000000000000000060648201526084016200040d565b609981905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200162000560565b620010fa62001243565b6040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b890620008f79085908590600401620019db565b6001600160a01b038116620011da5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a4016200040d565b609854604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1609880546001600160a01b0319166001600160a01b0392909216919091179055565b6066546001600160a01b0316331462000dd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200040d565b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f6852a55230ef089d785bce7ffbf757985de34026df90a87d7b4a6e56f95d251f910160405180910390a15050565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6098546001600160a01b03161580156200137e57506001600160a01b03821615155b620014025760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a4016200040d565b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a262001447826200114a565b5050565b600054604080516001600160a01b03928316815291831660208301527fe21755962a7d7e100b59b9c3e4d4b54085b146313719955efb6a7a25c5c7feee910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6108fa80620019fa83390190565b6001600160a01b03811681146200042157600080fd5b600060208284031215620014eb57600080fd5b8135620014f881620014c2565b9392505050565b6000602082840312156200151257600080fd5b5035919050565b60008083601f8401126200152c57600080fd5b50813567ffffffffffffffff8111156200154557600080fd5b6020830191508360208260051b85010111156200156157600080fd5b9250929050565b600080602083850312156200157c57600080fd5b823567ffffffffffffffff8111156200159457600080fd5b620015a28582860162001519565b90969095509350505050565b80151581146200042157600080fd5b60008060408385031215620015d157600080fd5b8235620015de81620014c2565b91506020830135620015f081620015ae565b809150509250929050565b6000602082840312156200160e57600080fd5b813560ff81168114620014f857600080fd5b600080600080604085870312156200163757600080fd5b843567ffffffffffffffff808211156200165057600080fd5b6200165e8883890162001519565b909650945060208701359150808211156200167857600080fd5b50620016878782880162001519565b95989497509550505050565b60008060008060808587031215620016aa57600080fd5b8435620016b781620014c2565b93506020850135620016c981620014c2565b9250604085013591506060850135620016e281620014c2565b939692955090935050565b6000602082840312156200170057600080fd5b8151620014f881620014c2565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b6000602082840312156200176a57600080fd5b8151620014f881620015ae565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006000198214156200180e57634e487b7160e01b600052601160045260246000fd5b5060010190565b600081518084526020808501945080840160005b83811015620018505781516001600160a01b03168752958201959082019060010162001829565b509495945050505050565b602081526000620014f8602083018462001815565b8183526000602080850194508260005b85811015620018505781356200189681620014c2565b6001600160a01b03168752958201959082019060010162001880565b604081526000620018c860408301868862001870565b8281036020848101919091528482528591810160005b8681101562001909578335620018f481620015ae565b151582529282019290820190600101620018de565b5098975050505050505050565b60018060a01b038316815260006020604081840152835180604085015260005b81811015620019545785810183015185820160600152820162001936565b8181111562001967576000606083870101525b50601f01601f191692909201606001949350505050565b60408152600062001993604083018562001815565b82810360208481019190915284518083528582019282019060005b81811015620019ce578451151583529383019391830191600101620019ae565b5090979650505050505050565b602081526000620019f160208301848662001870565b94935050505056fe60806040526040516108fa3803806108fa83398101604081905261002291610456565b61002e82826000610035565b5050610580565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610516565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610516565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108d3602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b60606001600160a01b0384163b6103495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610169565b600080856001600160a01b0316856040516103649190610531565b600060405180830381855af49150503d806000811461039f576040519150601f19603f3d011682016040523d82523d6000602084013e6103a4565b606091505b5090925090506103b58282866103bf565b9695505050505050565b606083156103ce5750816102c8565b8251156103de5782518084602001fd5b8160405162461bcd60e51b8152600401610169919061054d565b80516001600160a01b038116811461040f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044557818101518382015260200161042d565b838111156100f95750506000910152565b6000806040838503121561046957600080fd5b610472836103f8565b60208401519092506001600160401b038082111561048f57600080fd5b818501915085601f8301126104a357600080fd5b8151818111156104b5576104b5610414565b604051601f8201601f19908116603f011681019083821181831017156104dd576104dd610414565b816040528281528860208487010111156104f657600080fd5b61050783602083016020880161042a565b80955050505050509250929050565b60006020828403121561052857600080fd5b6102c8826103f8565b6000825161054381846020870161042a565b9190910192915050565b602081526000825180602084015261056c81604085016020870161042a565b601f01601f19169190910160400192915050565b6103448061058f6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102e860279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061023f565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b60606001600160a01b0384163b6101915760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b0316856040516101ac9190610298565b600060405180830381855af49150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50915091506101fc828286610206565b9695505050505050565b6060831561021557508161004e565b8251156102255782518084602001fd5b8160405162461bcd60e51b815260040161018891906102b4565b60006020828403121561025157600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028357818101518382015260200161026b565b83811115610292576000848401525b50505050565b600082516102aa818460208701610268565b9190910192915050565b60208152600082518060208401526102d3816040850160208701610268565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206225174df4b558257f66ac9aa53b52c29cdd29a561b03eb6d75a95018aff3e5864736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203850b53e42ae8221b51031a5b7bf9c35d3acaa4d98df4a686839adf9fb376edd64736f6c634300080c0033", } // StrategyFactoryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyManager/binding.go b/pkg/bindings/StrategyManager/binding.go index 65ecc0fdd..5770c37b7 100644 --- a/pkg/bindings/StrategyManager/binding.go +++ b/pkg/bindings/StrategyManager/binding.go @@ -32,7 +32,7 @@ var ( // StrategyManagerMetaData contains all meta data concerning the StrategyManager contract. var StrategyManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_eigenPodManager\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"},{\"name\":\"_slasher\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEPOSIT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWhitelister\",\"inputs\":[{\"name\":\"newStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyList\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"thirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdatedThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", - Bin: "0x6101006040523480156200001257600080fd5b506040516200338a3803806200338a833981016040819052620000359162000140565b6001600160a01b0380841660805280831660a052811660c0526200005862000065565b50504660e0525062000194565b600054610100900460ff1615620000d25760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000125576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013d57600080fd5b50565b6000806000606084860312156200015657600080fd5b8351620001638162000127565b6020850151909350620001768162000127565b6040850151909250620001898162000127565b809150509250925092565b60805160a05160c05160e0516131a0620001ea60003960006114bb0152600061046e0152600061028501526000818161051a01528181610b8401528181610ed101528181610f250152611a7101526131a06000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638da5cb5b1161011a578063c6656702116100ad578063df5cf7231161007c578063df5cf72314610515578063e7a050aa1461053c578063f2fde38b1461054f578063f698da2514610562578063fabc1cbc1461056a57600080fd5b8063c6656702146104c9578063cbc2bd62146104dc578063cf756fdf146104ef578063df5b35471461050257600080fd5b8063b1344271116100e9578063b134427114610469578063b5d8b5b814610490578063c4623ea1146104a3578063c608c7f3146104b657600080fd5b80638da5cb5b1461040157806394f649dd14610412578063967fc0d2146104335780639b4da03d1461044657600080fd5b80635ac86ab71161019d5780637a7e0d921161016c5780637a7e0d92146103675780637ecebe0014610392578063886f1195146103b25780638b8aac3c146103c55780638c80d4e5146103ee57600080fd5b80635ac86ab7146103015780635c975abb14610334578063663c1de41461033c578063715018a61461035f57600080fd5b80634665bcda116101d95780634665bcda1461028057806348825e94146102bf5780634e5a4263146102e6578063595c6a67146102f957600080fd5b806310d67a2f1461020b578063136439dd1461022057806320606b701461023357806332e89ace1461026d575b600080fd5b61021e6102193660046129e8565b61057d565b005b61021e61022e366004612a05565b610639565b61025a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020015b60405180910390f35b61025a61027b366004612a34565b610778565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610264565b61025a7f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922481565b61021e6102f4366004612b3d565b610a66565b61021e610a9e565b61032461030f366004612b76565b609854600160ff9092169190911b9081161490565b6040519015158152602001610264565b60985461025a565b61032461034a3660046129e8565b60d16020526000908152604090205460ff1681565b61021e610b65565b61025a610375366004612b99565b60cd60209081526000928352604080842090915290825290205481565b61025a6103a03660046129e8565b60ca6020526000908152604090205481565b6097546102a7906001600160a01b031681565b61025a6103d33660046129e8565b6001600160a01b0316600090815260ce602052604090205490565b61021e6103fc366004612bc7565b610b79565b6033546001600160a01b03166102a7565b6104256104203660046129e8565b610bd2565b604051610264929190612c08565b60cb546102a7906001600160a01b031681565b6103246104543660046129e8565b60d36020526000908152604090205460ff1681565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b61021e61049e366004612cd1565b610d52565b61021e6104b1366004612d13565b610ec6565b61021e6104c4366004612d64565b610f1a565b61021e6104d73660046129e8565b610fd2565b6102a76104ea366004612db7565b610fe3565b61021e6104fd366004612d13565b61101b565b61021e610510366004612de3565b61114f565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b61025a61054a366004612bc7565b611378565b61021e61055d3660046129e8565b611441565b61025a6114b7565b61021e610578366004612a05565b6114f5565b609760009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f49190612e4f565b6001600160a01b0316336001600160a01b03161461062d5760405162461bcd60e51b815260040161062490612e6c565b60405180910390fd5b61063681611651565b50565b60975460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190612eb6565b6106c15760405162461bcd60e51b815260040161062490612ed3565b6098548181161461073a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610624565b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6098546000908190600190811614156107cf5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610624565b600260655414156108225760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610624565b60026065556001600160a01b038816600090815260d3602052604090205460ff16156108c95760405162461bcd60e51b815260206004820152604a60248201527f53747261746567794d616e616765722e6465706f736974496e746f537472617460448201527f656779576974685369676e61747572653a207468697264207472616e736665726064820152691cc8191a5cd8589b195960b21b608482015260a401610624565b4284101561094b5760405162461bcd60e51b815260206004820152604360248201527f53747261746567794d616e616765722e6465706f736974496e746f537472617460448201527f656779576974685369676e61747572653a207369676e617475726520657870696064820152621c995960ea1b608482015260a401610624565b6001600160a01b03858116600081815260ca602090815260408083205481517f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922493810193909352908201939093528b84166060820152928a16608084015260a0830189905260c0830182905260e0830187905290916101000160408051601f1981840301815291815281516020928301206001600160a01b038a16600090815260ca9093529082206001850190559150610a036114b7565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050610a46888288611748565b610a52888c8c8c611907565b60016065559b9a5050505050505050505050565b60cb546001600160a01b03163314610a905760405162461bcd60e51b815260040161062490612f1b565b610a9a8282611ad6565b5050565b60975460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190612eb6565b610b265760405162461bcd60e51b815260040161062490612ed3565b600019609881905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b610b6d611b44565b610b776000611b9e565b565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bc15760405162461bcd60e51b815260040161062490612f85565b610bcc838383611bf0565b50505050565b6001600160a01b038116600090815260ce60205260408120546060918291908167ffffffffffffffff811115610c0a57610c0a612a1e565b604051908082528060200260200182016040528015610c33578160200160208202803683370190505b50905060005b82811015610cc4576001600160a01b038616600090815260cd6020908152604080832060ce9092528220805491929184908110610c7857610c78612fe3565b60009182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610cb157610cb1612fe3565b6020908102919091010152600101610c39565b5060ce6000866001600160a01b03166001600160a01b031681526020019081526020016000208181805480602002602001604051908101604052809291908181526020018280548015610d4057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d22575b50505050509150935093505050915091565b60cb546001600160a01b03163314610d7c5760405162461bcd60e51b815260040161062490612f1b565b8060005b81811015610bcc5760d16000858584818110610d9e57610d9e612fe3565b9050602002016020810190610db391906129e8565b6001600160a01b0316815260208101919091526040016000205460ff1615610ebe57600060d16000868685818110610ded57610ded612fe3565b9050602002016020810190610e0291906129e8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f4074413b4b443e4e58019f2855a8765113358c7c72e39509c6af45fc0f5ba030848483818110610e5d57610e5d612fe3565b9050602002016020810190610e7291906129e8565b6040516001600160a01b03909116815260200160405180910390a1610ebe848483818110610ea257610ea2612fe3565b9050602002016020810190610eb791906129e8565b6000611ad6565b600101610d80565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f0e5760405162461bcd60e51b815260040161062490612f85565b610bcc84848484611d4c565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f625760405162461bcd60e51b815260040161062490612f85565b604051636ce5768960e11b81526001600160a01b03858116600483015282811660248301526044820184905284169063d9caed1290606401600060405180830381600087803b158015610fb457600080fd5b505af1158015610fc8573d6000803e3d6000fd5b5050505050505050565b610fda611b44565b61063681611fd9565b60ce6020528160005260406000208181548110610fff57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600054610100900460ff161580801561103b5750600054600160ff909116105b806110555750303b158015611055575060005460ff166001145b6110b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610624565b6000805460ff1916600117905580156110db576000805461ff0019166101001790555b6110e3612042565b60c9556110f083836120d9565b6110f985611b9e565b61110284611fd9565b8015611148576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60cb546001600160a01b031633146111795760405162461bcd60e51b815260040161062490612f1b565b8281146112025760405162461bcd60e51b815260206004820152604b60248201527f53747261746567794d616e616765722e61646453747261746567696573546f4460448201527f65706f73697457686974656c6973743a206172726179206c656e67746873206460648201526a0de40dcdee840dac2e8c6d60ab1b608482015260a401610624565b8260005b818110156113705760d1600087878481811061122457611224612fe3565b905060200201602081019061123991906129e8565b6001600160a01b0316815260208101919091526040016000205460ff1661136857600160d1600088888581811061127257611272612fe3565b905060200201602081019061128791906129e8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f0c35b17d91c96eb2751cd456e1252f42a386e524ef9ff26ecc9950859fdc04fe8686838181106112e2576112e2612fe3565b90506020020160208101906112f791906129e8565b6040516001600160a01b03909116815260200160405180910390a161136886868381811061132757611327612fe3565b905060200201602081019061133c91906129e8565b85858481811061134e5761134e612fe3565b90506020020160208101906113639190612ff9565b611ad6565b600101611206565b505050505050565b6098546000908190600190811614156113cf5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610624565b600260655414156114225760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610624565b600260655561143333868686611907565b600160655595945050505050565b611449611b44565b6001600160a01b0381166114ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610624565b61063681611b9e565b60007f00000000000000000000000000000000000000000000000000000000000000004614156114e8575060c95490565b6114f0612042565b905090565b609760009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156c9190612e4f565b6001600160a01b0316336001600160a01b03161461159c5760405162461bcd60e51b815260040161062490612e6c565b60985419811960985419161461161a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610624565b609881905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200161076d565b6001600160a01b0381166116df5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610624565b609754604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1609780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383163b1561186757604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e90611788908690869060040161306e565b602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c99190613087565b6001600160e01b031916146118625760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610624565b505050565b826001600160a01b031661187b83836121bf565b6001600160a01b0316146118625760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610624565b6001600160a01b038316600090815260d16020526040812054849060ff166119ad5760405162461bcd60e51b815260206004820152604d60248201527f53747261746567794d616e616765722e6f6e6c7953747261746567696573576860448201527f6974656c6973746564466f724465706f7369743a207374726174656779206e6f60648201526c1d081dda1a5d195b1a5cdd1959609a1b608482015260a401610624565b6119c26001600160a01b0385163387866121e3565b6040516311f9fbc960e21b81526001600160a01b038581166004830152602482018590528616906347e7ef24906044016020604051808303816000875af1158015611a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3591906130b1565b9150611a4386858785611d4c565b604051631452b9d760e11b81526001600160a01b0387811660048301528681166024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906328a573ae90606401600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050505050949350505050565b604080516001600160a01b038416815282151560208201527f77d930df4937793473a95024d87a98fd2ccb9e92d3c2463b3dacd65d3e6a5786910160405180910390a16001600160a01b0391909116600090815260d360205260409020805460ff1916911515919091179055565b6033546001600160a01b03163314610b775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610624565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081611c655760405162461bcd60e51b815260206004820152603e60248201527f53747261746567794d616e616765722e5f72656d6f76655368617265733a207360448201527f68617265416d6f756e742073686f756c64206e6f74206265207a65726f2100006064820152608401610624565b6001600160a01b03808516600090815260cd602090815260408083209387168352929052205480831115611cf75760405162461bcd60e51b815260206004820152603360248201527f53747261746567794d616e616765722e5f72656d6f76655368617265733a20736044820152720d0c2e4ca82dadeeadce840e8dede40d0d2ced606b1b6064820152608401610624565b6001600160a01b03808616600090815260cd602090815260408083209388168352929052208382039081905590831415611d3f57611d35858561223d565b6001915050611d45565b60009150505b9392505050565b6001600160a01b038416611dc85760405162461bcd60e51b815260206004820152603960248201527f53747261746567794d616e616765722e5f6164645368617265733a207374616b60448201527f65722063616e6e6f74206265207a65726f2061646472657373000000000000006064820152608401610624565b80611e345760405162461bcd60e51b815260206004820152603660248201527f53747261746567794d616e616765722e5f6164645368617265733a207368617260448201527565732073686f756c64206e6f74206265207a65726f2160501b6064820152608401610624565b6001600160a01b03808516600090815260cd6020908152604080832093861683529290522054611f45576001600160a01b038416600090815260ce602090815260409091205410611f065760405162461bcd60e51b815260206004820152605060248201527f53747261746567794d616e616765722e5f6164645368617265733a206465706f60448201527f73697420776f756c6420657863656564204d41585f5354414b45525f5354524160648201526f0a88a8eb2be9892a6a8be988a9c8ea8960831b608482015260a401610624565b6001600160a01b03848116600090815260ce602090815260408220805460018101825590835291200180546001600160a01b0319169184169190911790555b6001600160a01b03808516600090815260cd6020908152604080832093861683529290529081208054839290611f7c9084906130e0565b9091555050604080516001600160a01b03868116825285811660208301528416818301526060810183905290517f7cfff908a4b583f36430b25d75964c458d8ede8a99bd61be750e97ee1b2f3a969181900360800190a150505050565b60cb54604080516001600160a01b03928316815291831660208301527f4264275e593955ff9d6146a51a4525f6ddace2e81db9391abcc9d1ca48047d29910160405180910390a160cb80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b6097546001600160a01b03161580156120fa57506001600160a01b03821615155b61217c5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610624565b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2610a9a82611651565b60008060006121ce858561242f565b915091506121db8161249f565b509392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610bcc90859061265a565b6001600160a01b038216600090815260ce6020526040812054905b81811015612358576001600160a01b03848116600090815260ce602052604090208054918516918390811061228f5761228f612fe3565b6000918252602090912001546001600160a01b03161415612350576001600160a01b038416600090815260ce6020526040902080546122d0906001906130f8565b815481106122e0576122e0612fe3565b60009182526020808320909101546001600160a01b03878116845260ce909252604090922080549190921691908390811061231d5761231d612fe3565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550612358565b600101612258565b818114156123e05760405162461bcd60e51b815260206004820152604960248201527f53747261746567794d616e616765722e5f72656d6f766553747261746567794660448201527f726f6d5374616b657253747261746567794c6973743a207374726174656779206064820152681b9bdd08199bdd5b9960ba1b608482015260a401610624565b6001600160a01b038416600090815260ce602052604090208054806124075761240761310f565b600082815260209020810160001990810180546001600160a01b031916905501905550505050565b6000808251604114156124665760208301516040840151606085015160001a61245a8782858561272c565b94509450505050612498565b8251604014156124905760208301516040840151612485868383612819565b935093505050612498565b506000905060025b9250929050565b60008160048111156124b3576124b3613125565b14156124bc5750565b60018160048111156124d0576124d0613125565b141561251e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610624565b600281600481111561253257612532613125565b14156125805760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610624565b600381600481111561259457612594613125565b14156125ed5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610624565b600481600481111561260157612601613125565b14156106365760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610624565b60006126af826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128529092919063ffffffff16565b80519091501561186257808060200190518101906126cd9190612eb6565b6118625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610624565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156127635750600090506003612810565b8460ff16601b1415801561277b57508460ff16601c14155b1561278c5750600090506004612810565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661280957600060019250925050612810565b9150600090505b94509492505050565b6000806001600160ff1b0383168161283660ff86901c601b6130e0565b90506128448782888561272c565b935093505050935093915050565b60606128618484600085612869565b949350505050565b6060824710156128ca5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610624565b6001600160a01b0385163b6129215760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610624565b600080866001600160a01b0316858760405161293d919061313b565b60006040518083038185875af1925050503d806000811461297a576040519150601f19603f3d011682016040523d82523d6000602084013e61297f565b606091505b509150915061298f82828661299a565b979650505050505050565b606083156129a9575081611d45565b8251156129b95782518084602001fd5b8160405162461bcd60e51b81526004016106249190613157565b6001600160a01b038116811461063657600080fd5b6000602082840312156129fa57600080fd5b8135611d45816129d3565b600060208284031215612a1757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c08789031215612a4d57600080fd5b8635612a58816129d3565b95506020870135612a68816129d3565b9450604087013593506060870135612a7f816129d3565b92506080870135915060a087013567ffffffffffffffff80821115612aa357600080fd5b818901915089601f830112612ab757600080fd5b813581811115612ac957612ac9612a1e565b604051601f8201601f19908116603f01168101908382118183101715612af157612af1612a1e565b816040528281528c6020848701011115612b0a57600080fd5b8260208601602083013760006020848301015280955050505050509295509295509295565b801515811461063657600080fd5b60008060408385031215612b5057600080fd5b8235612b5b816129d3565b91506020830135612b6b81612b2f565b809150509250929050565b600060208284031215612b8857600080fd5b813560ff81168114611d4557600080fd5b60008060408385031215612bac57600080fd5b8235612bb7816129d3565b91506020830135612b6b816129d3565b600080600060608486031215612bdc57600080fd5b8335612be7816129d3565b92506020840135612bf7816129d3565b929592945050506040919091013590565b604080825283519082018190526000906020906060840190828701845b82811015612c4a5781516001600160a01b031684529284019290840190600101612c25565b5050508381038285015284518082528583019183019060005b81811015612c7f57835183529284019291840191600101612c63565b5090979650505050505050565b60008083601f840112612c9e57600080fd5b50813567ffffffffffffffff811115612cb657600080fd5b6020830191508360208260051b850101111561249857600080fd5b60008060208385031215612ce457600080fd5b823567ffffffffffffffff811115612cfb57600080fd5b612d0785828601612c8c565b90969095509350505050565b60008060008060808587031215612d2957600080fd5b8435612d34816129d3565b93506020850135612d44816129d3565b92506040850135612d54816129d3565b9396929550929360600135925050565b60008060008060808587031215612d7a57600080fd5b8435612d85816129d3565b93506020850135612d95816129d3565b9250604085013591506060850135612dac816129d3565b939692955090935050565b60008060408385031215612dca57600080fd5b8235612dd5816129d3565b946020939093013593505050565b60008060008060408587031215612df957600080fd5b843567ffffffffffffffff80821115612e1157600080fd5b612e1d88838901612c8c565b90965094506020870135915080821115612e3657600080fd5b50612e4387828801612c8c565b95989497509550505050565b600060208284031215612e6157600080fd5b8151611d45816129d3565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215612ec857600080fd5b8151611d4581612b2f565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208082526044908201527f53747261746567794d616e616765722e6f6e6c7953747261746567795768697460408201527f656c69737465723a206e6f742074686520737472617465677957686974656c6960608201526339ba32b960e11b608082015260a00190565b602080825260409082018190527f53747261746567794d616e616765722e6f6e6c7944656c65676174696f6e4d61908201527f6e616765723a206e6f74207468652044656c65676174696f6e4d616e61676572606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561300b57600080fd5b8135611d4581612b2f565b60005b83811015613031578181015183820152602001613019565b83811115610bcc5750506000910152565b6000815180845261305a816020860160208601613016565b601f01601f19169290920160200192915050565b8281526040602082015260006128616040830184613042565b60006020828403121561309957600080fd5b81516001600160e01b031981168114611d4557600080fd5b6000602082840312156130c357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156130f3576130f36130ca565b500190565b60008282101561310a5761310a6130ca565b500390565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000825161314d818460208701613016565b9190910192915050565b602081526000611d45602083018461304256fea2646970667358221220e1eb2321685fb63a9aec2a407059955dbb014f9ba1598fed273d59a1889501d764736f6c634300080c0033", + Bin: "0x6101006040523480156200001257600080fd5b506040516200338a3803806200338a833981016040819052620000359162000140565b6001600160a01b0380841660805280831660a052811660c0526200005862000065565b50504660e0525062000194565b600054610100900460ff1615620000d25760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000125576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013d57600080fd5b50565b6000806000606084860312156200015657600080fd5b8351620001638162000127565b6020850151909350620001768162000127565b6040850151909250620001898162000127565b809150509250925092565b60805160a05160c05160e0516131a0620001ea60003960006114bb0152600061046e0152600061028501526000818161051a01528181610b8401528181610ed101528181610f250152611a7101526131a06000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638da5cb5b1161011a578063c6656702116100ad578063df5cf7231161007c578063df5cf72314610515578063e7a050aa1461053c578063f2fde38b1461054f578063f698da2514610562578063fabc1cbc1461056a57600080fd5b8063c6656702146104c9578063cbc2bd62146104dc578063cf756fdf146104ef578063df5b35471461050257600080fd5b8063b1344271116100e9578063b134427114610469578063b5d8b5b814610490578063c4623ea1146104a3578063c608c7f3146104b657600080fd5b80638da5cb5b1461040157806394f649dd14610412578063967fc0d2146104335780639b4da03d1461044657600080fd5b80635ac86ab71161019d5780637a7e0d921161016c5780637a7e0d92146103675780637ecebe0014610392578063886f1195146103b25780638b8aac3c146103c55780638c80d4e5146103ee57600080fd5b80635ac86ab7146103015780635c975abb14610334578063663c1de41461033c578063715018a61461035f57600080fd5b80634665bcda116101d95780634665bcda1461028057806348825e94146102bf5780634e5a4263146102e6578063595c6a67146102f957600080fd5b806310d67a2f1461020b578063136439dd1461022057806320606b701461023357806332e89ace1461026d575b600080fd5b61021e6102193660046129e8565b61057d565b005b61021e61022e366004612a05565b610639565b61025a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020015b60405180910390f35b61025a61027b366004612a34565b610778565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610264565b61025a7f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922481565b61021e6102f4366004612b3d565b610a66565b61021e610a9e565b61032461030f366004612b76565b609854600160ff9092169190911b9081161490565b6040519015158152602001610264565b60985461025a565b61032461034a3660046129e8565b60d16020526000908152604090205460ff1681565b61021e610b65565b61025a610375366004612b99565b60cd60209081526000928352604080842090915290825290205481565b61025a6103a03660046129e8565b60ca6020526000908152604090205481565b6097546102a7906001600160a01b031681565b61025a6103d33660046129e8565b6001600160a01b0316600090815260ce602052604090205490565b61021e6103fc366004612bc7565b610b79565b6033546001600160a01b03166102a7565b6104256104203660046129e8565b610bd2565b604051610264929190612c08565b60cb546102a7906001600160a01b031681565b6103246104543660046129e8565b60d36020526000908152604090205460ff1681565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b61021e61049e366004612cd1565b610d52565b61021e6104b1366004612d13565b610ec6565b61021e6104c4366004612d64565b610f1a565b61021e6104d73660046129e8565b610fd2565b6102a76104ea366004612db7565b610fe3565b61021e6104fd366004612d13565b61101b565b61021e610510366004612de3565b61114f565b6102a77f000000000000000000000000000000000000000000000000000000000000000081565b61025a61054a366004612bc7565b611378565b61021e61055d3660046129e8565b611441565b61025a6114b7565b61021e610578366004612a05565b6114f5565b609760009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f49190612e4f565b6001600160a01b0316336001600160a01b03161461062d5760405162461bcd60e51b815260040161062490612e6c565b60405180910390fd5b61063681611651565b50565b60975460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190612eb6565b6106c15760405162461bcd60e51b815260040161062490612ed3565b6098548181161461073a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610624565b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b6098546000908190600190811614156107cf5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610624565b600260655414156108225760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610624565b60026065556001600160a01b038816600090815260d3602052604090205460ff16156108c95760405162461bcd60e51b815260206004820152604a60248201527f53747261746567794d616e616765722e6465706f736974496e746f537472617460448201527f656779576974685369676e61747572653a207468697264207472616e736665726064820152691cc8191a5cd8589b195960b21b608482015260a401610624565b4284101561094b5760405162461bcd60e51b815260206004820152604360248201527f53747261746567794d616e616765722e6465706f736974496e746f537472617460448201527f656779576974685369676e61747572653a207369676e617475726520657870696064820152621c995960ea1b608482015260a401610624565b6001600160a01b03858116600081815260ca602090815260408083205481517f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922493810193909352908201939093528b84166060820152928a16608084015260a0830189905260c0830182905260e0830187905290916101000160408051601f1981840301815291815281516020928301206001600160a01b038a16600090815260ca9093529082206001850190559150610a036114b7565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050610a46888288611748565b610a52888c8c8c611907565b60016065559b9a5050505050505050505050565b60cb546001600160a01b03163314610a905760405162461bcd60e51b815260040161062490612f1b565b610a9a8282611ad6565b5050565b60975460405163237dfb4760e11b81523360048201526001600160a01b03909116906346fbf68e90602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190612eb6565b610b265760405162461bcd60e51b815260040161062490612ed3565b600019609881905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b610b6d611b44565b610b776000611b9e565b565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bc15760405162461bcd60e51b815260040161062490612f85565b610bcc838383611bf0565b50505050565b6001600160a01b038116600090815260ce60205260408120546060918291908167ffffffffffffffff811115610c0a57610c0a612a1e565b604051908082528060200260200182016040528015610c33578160200160208202803683370190505b50905060005b82811015610cc4576001600160a01b038616600090815260cd6020908152604080832060ce9092528220805491929184908110610c7857610c78612fe3565b60009182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610cb157610cb1612fe3565b6020908102919091010152600101610c39565b5060ce6000866001600160a01b03166001600160a01b031681526020019081526020016000208181805480602002602001604051908101604052809291908181526020018280548015610d4057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d22575b50505050509150935093505050915091565b60cb546001600160a01b03163314610d7c5760405162461bcd60e51b815260040161062490612f1b565b8060005b81811015610bcc5760d16000858584818110610d9e57610d9e612fe3565b9050602002016020810190610db391906129e8565b6001600160a01b0316815260208101919091526040016000205460ff1615610ebe57600060d16000868685818110610ded57610ded612fe3565b9050602002016020810190610e0291906129e8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f4074413b4b443e4e58019f2855a8765113358c7c72e39509c6af45fc0f5ba030848483818110610e5d57610e5d612fe3565b9050602002016020810190610e7291906129e8565b6040516001600160a01b03909116815260200160405180910390a1610ebe848483818110610ea257610ea2612fe3565b9050602002016020810190610eb791906129e8565b6000611ad6565b600101610d80565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f0e5760405162461bcd60e51b815260040161062490612f85565b610bcc84848484611d4c565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f625760405162461bcd60e51b815260040161062490612f85565b604051636ce5768960e11b81526001600160a01b03858116600483015282811660248301526044820184905284169063d9caed1290606401600060405180830381600087803b158015610fb457600080fd5b505af1158015610fc8573d6000803e3d6000fd5b5050505050505050565b610fda611b44565b61063681611fd9565b60ce6020528160005260406000208181548110610fff57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600054610100900460ff161580801561103b5750600054600160ff909116105b806110555750303b158015611055575060005460ff166001145b6110b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610624565b6000805460ff1916600117905580156110db576000805461ff0019166101001790555b6110e3612042565b60c9556110f083836120d9565b6110f985611b9e565b61110284611fd9565b8015611148576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60cb546001600160a01b031633146111795760405162461bcd60e51b815260040161062490612f1b565b8281146112025760405162461bcd60e51b815260206004820152604b60248201527f53747261746567794d616e616765722e61646453747261746567696573546f4460448201527f65706f73697457686974656c6973743a206172726179206c656e67746873206460648201526a0de40dcdee840dac2e8c6d60ab1b608482015260a401610624565b8260005b818110156113705760d1600087878481811061122457611224612fe3565b905060200201602081019061123991906129e8565b6001600160a01b0316815260208101919091526040016000205460ff1661136857600160d1600088888581811061127257611272612fe3565b905060200201602081019061128791906129e8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f0c35b17d91c96eb2751cd456e1252f42a386e524ef9ff26ecc9950859fdc04fe8686838181106112e2576112e2612fe3565b90506020020160208101906112f791906129e8565b6040516001600160a01b03909116815260200160405180910390a161136886868381811061132757611327612fe3565b905060200201602081019061133c91906129e8565b85858481811061134e5761134e612fe3565b90506020020160208101906113639190612ff9565b611ad6565b600101611206565b505050505050565b6098546000908190600190811614156113cf5760405162461bcd60e51b815260206004820152601960248201527814185d5cd8589b194e881a5b99195e081a5cc81c185d5cd959603a1b6044820152606401610624565b600260655414156114225760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610624565b600260655561143333868686611907565b600160655595945050505050565b611449611b44565b6001600160a01b0381166114ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610624565b61063681611b9e565b60007f00000000000000000000000000000000000000000000000000000000000000004614156114e8575060c95490565b6114f0612042565b905090565b609760009054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156c9190612e4f565b6001600160a01b0316336001600160a01b03161461159c5760405162461bcd60e51b815260040161062490612e6c565b60985419811960985419161461161a5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610624565b609881905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200161076d565b6001600160a01b0381166116df5760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610624565b609754604080516001600160a01b03928316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1609780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383163b1561186757604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e90611788908690869060040161306e565b602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c99190613087565b6001600160e01b031916146118625760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610624565b505050565b826001600160a01b031661187b83836121bf565b6001600160a01b0316146118625760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610624565b6001600160a01b038316600090815260d16020526040812054849060ff166119ad5760405162461bcd60e51b815260206004820152604d60248201527f53747261746567794d616e616765722e6f6e6c7953747261746567696573576860448201527f6974656c6973746564466f724465706f7369743a207374726174656779206e6f60648201526c1d081dda1a5d195b1a5cdd1959609a1b608482015260a401610624565b6119c26001600160a01b0385163387866121e3565b6040516311f9fbc960e21b81526001600160a01b038581166004830152602482018590528616906347e7ef24906044016020604051808303816000875af1158015611a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3591906130b1565b9150611a4386858785611d4c565b604051631452b9d760e11b81526001600160a01b0387811660048301528681166024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906328a573ae90606401600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050505050949350505050565b604080516001600160a01b038416815282151560208201527f77d930df4937793473a95024d87a98fd2ccb9e92d3c2463b3dacd65d3e6a5786910160405180910390a16001600160a01b0391909116600090815260d360205260409020805460ff1916911515919091179055565b6033546001600160a01b03163314610b775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610624565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081611c655760405162461bcd60e51b815260206004820152603e60248201527f53747261746567794d616e616765722e5f72656d6f76655368617265733a207360448201527f68617265416d6f756e742073686f756c64206e6f74206265207a65726f2100006064820152608401610624565b6001600160a01b03808516600090815260cd602090815260408083209387168352929052205480831115611cf75760405162461bcd60e51b815260206004820152603360248201527f53747261746567794d616e616765722e5f72656d6f76655368617265733a20736044820152720d0c2e4ca82dadeeadce840e8dede40d0d2ced606b1b6064820152608401610624565b6001600160a01b03808616600090815260cd602090815260408083209388168352929052208382039081905590831415611d3f57611d35858561223d565b6001915050611d45565b60009150505b9392505050565b6001600160a01b038416611dc85760405162461bcd60e51b815260206004820152603960248201527f53747261746567794d616e616765722e5f6164645368617265733a207374616b60448201527f65722063616e6e6f74206265207a65726f2061646472657373000000000000006064820152608401610624565b80611e345760405162461bcd60e51b815260206004820152603660248201527f53747261746567794d616e616765722e5f6164645368617265733a207368617260448201527565732073686f756c64206e6f74206265207a65726f2160501b6064820152608401610624565b6001600160a01b03808516600090815260cd6020908152604080832093861683529290522054611f45576001600160a01b038416600090815260ce602090815260409091205410611f065760405162461bcd60e51b815260206004820152605060248201527f53747261746567794d616e616765722e5f6164645368617265733a206465706f60448201527f73697420776f756c6420657863656564204d41585f5354414b45525f5354524160648201526f0a88a8eb2be9892a6a8be988a9c8ea8960831b608482015260a401610624565b6001600160a01b03848116600090815260ce602090815260408220805460018101825590835291200180546001600160a01b0319169184169190911790555b6001600160a01b03808516600090815260cd6020908152604080832093861683529290529081208054839290611f7c9084906130e0565b9091555050604080516001600160a01b03868116825285811660208301528416818301526060810183905290517f7cfff908a4b583f36430b25d75964c458d8ede8a99bd61be750e97ee1b2f3a969181900360800190a150505050565b60cb54604080516001600160a01b03928316815291831660208301527f4264275e593955ff9d6146a51a4525f6ddace2e81db9391abcc9d1ca48047d29910160405180910390a160cb80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252600a81526922b4b3b2b72630bcb2b960b11b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea81840152466060820152306080808301919091528351808303909101815260a0909101909252815191012090565b6097546001600160a01b03161580156120fa57506001600160a01b03821615155b61217c5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610624565b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2610a9a82611651565b60008060006121ce858561242f565b915091506121db8161249f565b509392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610bcc90859061265a565b6001600160a01b038216600090815260ce6020526040812054905b81811015612358576001600160a01b03848116600090815260ce602052604090208054918516918390811061228f5761228f612fe3565b6000918252602090912001546001600160a01b03161415612350576001600160a01b038416600090815260ce6020526040902080546122d0906001906130f8565b815481106122e0576122e0612fe3565b60009182526020808320909101546001600160a01b03878116845260ce909252604090922080549190921691908390811061231d5761231d612fe3565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550612358565b600101612258565b818114156123e05760405162461bcd60e51b815260206004820152604960248201527f53747261746567794d616e616765722e5f72656d6f766553747261746567794660448201527f726f6d5374616b657253747261746567794c6973743a207374726174656779206064820152681b9bdd08199bdd5b9960ba1b608482015260a401610624565b6001600160a01b038416600090815260ce602052604090208054806124075761240761310f565b600082815260209020810160001990810180546001600160a01b031916905501905550505050565b6000808251604114156124665760208301516040840151606085015160001a61245a8782858561272c565b94509450505050612498565b8251604014156124905760208301516040840151612485868383612819565b935093505050612498565b506000905060025b9250929050565b60008160048111156124b3576124b3613125565b14156124bc5750565b60018160048111156124d0576124d0613125565b141561251e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610624565b600281600481111561253257612532613125565b14156125805760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610624565b600381600481111561259457612594613125565b14156125ed5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610624565b600481600481111561260157612601613125565b14156106365760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610624565b60006126af826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128529092919063ffffffff16565b80519091501561186257808060200190518101906126cd9190612eb6565b6118625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610624565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156127635750600090506003612810565b8460ff16601b1415801561277b57508460ff16601c14155b1561278c5750600090506004612810565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661280957600060019250925050612810565b9150600090505b94509492505050565b6000806001600160ff1b0383168161283660ff86901c601b6130e0565b90506128448782888561272c565b935093505050935093915050565b60606128618484600085612869565b949350505050565b6060824710156128ca5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610624565b6001600160a01b0385163b6129215760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610624565b600080866001600160a01b0316858760405161293d919061313b565b60006040518083038185875af1925050503d806000811461297a576040519150601f19603f3d011682016040523d82523d6000602084013e61297f565b606091505b509150915061298f82828661299a565b979650505050505050565b606083156129a9575081611d45565b8251156129b95782518084602001fd5b8160405162461bcd60e51b81526004016106249190613157565b6001600160a01b038116811461063657600080fd5b6000602082840312156129fa57600080fd5b8135611d45816129d3565b600060208284031215612a1757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c08789031215612a4d57600080fd5b8635612a58816129d3565b95506020870135612a68816129d3565b9450604087013593506060870135612a7f816129d3565b92506080870135915060a087013567ffffffffffffffff80821115612aa357600080fd5b818901915089601f830112612ab757600080fd5b813581811115612ac957612ac9612a1e565b604051601f8201601f19908116603f01168101908382118183101715612af157612af1612a1e565b816040528281528c6020848701011115612b0a57600080fd5b8260208601602083013760006020848301015280955050505050509295509295509295565b801515811461063657600080fd5b60008060408385031215612b5057600080fd5b8235612b5b816129d3565b91506020830135612b6b81612b2f565b809150509250929050565b600060208284031215612b8857600080fd5b813560ff81168114611d4557600080fd5b60008060408385031215612bac57600080fd5b8235612bb7816129d3565b91506020830135612b6b816129d3565b600080600060608486031215612bdc57600080fd5b8335612be7816129d3565b92506020840135612bf7816129d3565b929592945050506040919091013590565b604080825283519082018190526000906020906060840190828701845b82811015612c4a5781516001600160a01b031684529284019290840190600101612c25565b5050508381038285015284518082528583019183019060005b81811015612c7f57835183529284019291840191600101612c63565b5090979650505050505050565b60008083601f840112612c9e57600080fd5b50813567ffffffffffffffff811115612cb657600080fd5b6020830191508360208260051b850101111561249857600080fd5b60008060208385031215612ce457600080fd5b823567ffffffffffffffff811115612cfb57600080fd5b612d0785828601612c8c565b90969095509350505050565b60008060008060808587031215612d2957600080fd5b8435612d34816129d3565b93506020850135612d44816129d3565b92506040850135612d54816129d3565b9396929550929360600135925050565b60008060008060808587031215612d7a57600080fd5b8435612d85816129d3565b93506020850135612d95816129d3565b9250604085013591506060850135612dac816129d3565b939692955090935050565b60008060408385031215612dca57600080fd5b8235612dd5816129d3565b946020939093013593505050565b60008060008060408587031215612df957600080fd5b843567ffffffffffffffff80821115612e1157600080fd5b612e1d88838901612c8c565b90965094506020870135915080821115612e3657600080fd5b50612e4387828801612c8c565b95989497509550505050565b600060208284031215612e6157600080fd5b8151611d45816129d3565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b600060208284031215612ec857600080fd5b8151611d4581612b2f565b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b60208082526044908201527f53747261746567794d616e616765722e6f6e6c7953747261746567795768697460408201527f656c69737465723a206e6f742074686520737472617465677957686974656c6960608201526339ba32b960e11b608082015260a00190565b602080825260409082018190527f53747261746567794d616e616765722e6f6e6c7944656c65676174696f6e4d61908201527f6e616765723a206e6f74207468652044656c65676174696f6e4d616e61676572606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561300b57600080fd5b8135611d4581612b2f565b60005b83811015613031578181015183820152602001613019565b83811115610bcc5750506000910152565b6000815180845261305a816020860160208601613016565b601f01601f19169290920160200192915050565b8281526040602082015260006128616040830184613042565b60006020828403121561309957600080fd5b81516001600160e01b031981168114611d4557600080fd5b6000602082840312156130c357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156130f3576130f36130ca565b500190565b60008282101561310a5761310a6130ca565b500390565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000825161314d818460208701613016565b9190910192915050565b602081526000611d45602083018461304256fea26469706673582212205880e7930549202bcf415ebbdea3c344ae6662297ac40a2f8cee87c18eb4d6a764736f6c634300080c0033", } // StrategyManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyManagerStorage/binding.go b/pkg/bindings/StrategyManagerStorage/binding.go index 3dc3ddcac..7e3b2edf6 100644 --- a/pkg/bindings/StrategyManagerStorage/binding.go +++ b/pkg/bindings/StrategyManagerStorage/binding.go @@ -31,7 +31,7 @@ var ( // StrategyManagerStorageMetaData contains all meta data concerning the StrategyManagerStorage contract. var StrategyManagerStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"DEPOSIT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyList\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"thirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdatedThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", + ABI: "[{\"type\":\"function\",\"name\":\"DEPOSIT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DOMAIN_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"thirdPartyTransfersForbiddenValues\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWhitelister\",\"inputs\":[{\"name\":\"newStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slasher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISlasher\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyList\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyShares\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"thirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdatedThirdPartyTransfersForbidden\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", } // StrategyManagerStorageABI is the input ABI used to generate the binding from. @@ -273,6 +273,37 @@ func (_StrategyManagerStorage *StrategyManagerStorageCallerSession) Delegation() return _StrategyManagerStorage.Contract.Delegation(&_StrategyManagerStorage.CallOpts) } +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_StrategyManagerStorage *StrategyManagerStorageCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _StrategyManagerStorage.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_StrategyManagerStorage *StrategyManagerStorageSession) DomainSeparator() ([32]byte, error) { + return _StrategyManagerStorage.Contract.DomainSeparator(&_StrategyManagerStorage.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_StrategyManagerStorage *StrategyManagerStorageCallerSession) DomainSeparator() ([32]byte, error) { + return _StrategyManagerStorage.Contract.DomainSeparator(&_StrategyManagerStorage.CallOpts) +} + // EigenPodManager is a free data retrieval call binding the contract method 0x4665bcda. // // Solidity: function eigenPodManager() view returns(address) @@ -710,6 +741,27 @@ func (_StrategyManagerStorage *StrategyManagerStorageTransactorSession) RemoveSt return _StrategyManagerStorage.Contract.RemoveStrategiesFromDepositWhitelist(&_StrategyManagerStorage.TransactOpts, strategiesToRemoveFromWhitelist) } +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_StrategyManagerStorage *StrategyManagerStorageTransactor) SetStrategyWhitelister(opts *bind.TransactOpts, newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _StrategyManagerStorage.contract.Transact(opts, "setStrategyWhitelister", newStrategyWhitelister) +} + +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_StrategyManagerStorage *StrategyManagerStorageSession) SetStrategyWhitelister(newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _StrategyManagerStorage.Contract.SetStrategyWhitelister(&_StrategyManagerStorage.TransactOpts, newStrategyWhitelister) +} + +// SetStrategyWhitelister is a paid mutator transaction binding the contract method 0xc6656702. +// +// Solidity: function setStrategyWhitelister(address newStrategyWhitelister) returns() +func (_StrategyManagerStorage *StrategyManagerStorageTransactorSession) SetStrategyWhitelister(newStrategyWhitelister common.Address) (*types.Transaction, error) { + return _StrategyManagerStorage.Contract.SetStrategyWhitelister(&_StrategyManagerStorage.TransactOpts, newStrategyWhitelister) +} + // SetThirdPartyTransfersForbidden is a paid mutator transaction binding the contract method 0x4e5a4263. // // Solidity: function setThirdPartyTransfersForbidden(address strategy, bool value) returns() diff --git a/pkg/bindings/StructuredLinkedList/binding.go b/pkg/bindings/StructuredLinkedList/binding.go index b291ef98d..4c8459a0a 100644 --- a/pkg/bindings/StructuredLinkedList/binding.go +++ b/pkg/bindings/StructuredLinkedList/binding.go @@ -32,7 +32,7 @@ var ( // StructuredLinkedListMetaData contains all meta data concerning the StructuredLinkedList contract. var StructuredLinkedListMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b0f3aa07997f25ddb2b0dd17a1b6104304d811d2cec7f2d2dfcae3e3d618f6964736f6c634300080c0033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209aa0fdc747c11eea27d67e8f053e69034bfdcc6b71664ab3afb1518486f35b4064736f6c634300080c0033", } // StructuredLinkedListABI is the input ABI used to generate the binding from. diff --git a/script/admin/mainnet/Mainnet_Unpause_Deposits.s.sol b/script/admin/mainnet/Mainnet_Unpause_Deposits.s.sol index 8384613db..fce2a75b9 100644 --- a/script/admin/mainnet/Mainnet_Unpause_Deposits.s.sol +++ b/script/admin/mainnet/Mainnet_Unpause_Deposits.s.sol @@ -9,7 +9,7 @@ contract Mainnet_Unpause_Deposits is ExistingDeploymentParser, TimelockEncoding Vm cheats = Vm(HEVM_ADDRESS); // Tues Apr 16 2024 12:00:00 GMT-0700 (Pacific Daylight Time) - uint256 timelockEta = 1713250800; + uint256 timelockEta = 1_713_250_800; function run() external virtual { _parseDeployedContracts("script/output/mainnet/M1_deployment_mainnet_2023_6_9.json"); @@ -27,7 +27,8 @@ contract Mainnet_Unpause_Deposits is ExistingDeploymentParser, TimelockEncoding operation: ISafe.Operation.Call }); - (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) = encodeForTimelock({ + (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) = + encodeForTimelock({ // address to be called from the timelock to: executorMultisig, // value to send in tx @@ -47,7 +48,7 @@ contract Mainnet_Unpause_Deposits is ExistingDeploymentParser, TimelockEncoding emit log_named_bytes32("expectedTxHash", expectedTxHash); cheats.prank(operationsMultisig); - (bool success, ) = timelock.call(calldata_to_timelock_queuing_action); + (bool success,) = timelock.call(calldata_to_timelock_queuing_action); require(success, "call to timelock queuing action failed"); require(ITimelock(timelock).queuedTransactions(expectedTxHash), "expectedTxHash not queued"); @@ -55,7 +56,7 @@ contract Mainnet_Unpause_Deposits is ExistingDeploymentParser, TimelockEncoding // test performing the upgrade cheats.warp(timelockEta); cheats.prank(operationsMultisig); - (success, ) = timelock.call(calldata_to_timelock_executing_action); + (success,) = timelock.call(calldata_to_timelock_executing_action); require(success, "call to timelock executing action failed"); // Check correctness after upgrade @@ -66,6 +67,6 @@ contract Mainnet_Unpause_Deposits is ExistingDeploymentParser, TimelockEncoding // empty bytes bytes memory signature; bytes32 txHash = keccak256(abi.encode(target, _value, signature, _data, eta)); - return txHash; + return txHash; } -} \ No newline at end of file +} diff --git a/script/deploy/holesky/Deploy_Preprod_RewardsCoordinator.s.sol b/script/deploy/holesky/Deploy_Preprod_RewardsCoordinator.s.sol index fa077f934..352b9aa7e 100644 --- a/script/deploy/holesky/Deploy_Preprod_RewardsCoordinator.s.sol +++ b/script/deploy/holesky/Deploy_Preprod_RewardsCoordinator.s.sol @@ -16,7 +16,9 @@ import "./Deploy_Test_RewardsCoordinator.s.sol"; * */ contract Deploy_Preprod_RewardsCoordinator is Deploy_Test_RewardsCoordinator { - function run(string memory deployArg) external virtual { + function run( + string memory deployArg + ) external virtual { _parseInitialDeploymentParams("script/configs/holesky/eigenlayer_preprod.config.json"); _parseDeployedContracts("script/output/holesky/M2_deploy_preprod.output.json"); diff --git a/script/deploy/holesky/Deploy_Test_RewardsCoordinator.s.sol b/script/deploy/holesky/Deploy_Test_RewardsCoordinator.s.sol index 480123d70..fcf8e098f 100644 --- a/script/deploy/holesky/Deploy_Test_RewardsCoordinator.s.sol +++ b/script/deploy/holesky/Deploy_Test_RewardsCoordinator.s.sol @@ -11,7 +11,6 @@ import "../../utils/ExistingDeploymentParser.sol"; * */ contract Deploy_Test_RewardsCoordinator is ExistingDeploymentParser { - address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; @@ -71,7 +70,7 @@ contract Deploy_Test_RewardsCoordinator is ExistingDeploymentParser { ); } - /** + /** * @notice Deploy RewardsCoordinator Implementation for Holesky and upgrade the proxy */ function _upgradeRewardsCoordinator() internal { @@ -87,31 +86,29 @@ contract Deploy_Test_RewardsCoordinator is ExistingDeploymentParser { ); eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(rewardsCoordinator))), - address(rewardsCoordinatorImplementation) + TransparentUpgradeableProxy(payable(address(rewardsCoordinator))), address(rewardsCoordinatorImplementation) ); } function _deployImplementation() internal { // Existing values for current RewardsCoordinator implementationt on holesky require( - REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS == 604800, + REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS == 604_800, "REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS must be 604800" ); require( - REWARDS_COORDINATOR_MAX_REWARDS_DURATION == 6048000, + REWARDS_COORDINATOR_MAX_REWARDS_DURATION == 6_048_000, "REWARDS_COORDINATOR_MAX_REWARDS_DURATION must be 6048000" ); require( - REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH == 7776000, + REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH == 7_776_000, "REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH must be 7776000" ); require( - REWARDS_COORDINATOR_MAX_FUTURE_LENGTH == 2592000, - "REWARDS_COORDINATOR_MAX_FUTURE_LENGTH must be 2592000" + REWARDS_COORDINATOR_MAX_FUTURE_LENGTH == 2_592_000, "REWARDS_COORDINATOR_MAX_FUTURE_LENGTH must be 2592000" ); require( - REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP == 1710979200, + REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP == 1_710_979_200, "REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP must be 1710979200" ); diff --git a/script/deploy/holesky/Eigen_Strategy_Deploy.s.sol b/script/deploy/holesky/Eigen_Strategy_Deploy.s.sol index 233f158bb..056a00c06 100644 --- a/script/deploy/holesky/Eigen_Strategy_Deploy.s.sol +++ b/script/deploy/holesky/Eigen_Strategy_Deploy.s.sol @@ -9,7 +9,6 @@ import "../../utils/ExistingDeploymentParser.sol"; * forge script script/deploy/holesky/Eigen_Strategy_Deploy.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --broadcast -vvvv */ contract Eigen_Strategy_Deploy is ExistingDeploymentParser { - function run() external virtual { _parseDeployedContracts("script/configs/holesky/Holesky_current_deployment.config.json"); @@ -35,14 +34,9 @@ contract Eigen_Strategy_Deploy is ExistingDeploymentParser { eigenStrategy = EigenStrategy( address( new TransparentUpgradeableProxy( - address(eigenStrategyImpl), - address(eigenLayerProxyAdmin), - abi.encodeWithSelector( - EigenStrategy.initialize.selector, - EIGEN, - bEIGEN, - eigenLayerPauserReg - ) + address(eigenStrategyImpl), + address(eigenLayerProxyAdmin), + abi.encodeWithSelector(EigenStrategy.initialize.selector, EIGEN, bEIGEN, eigenLayerPauserReg) ) ) ); diff --git a/script/deploy/holesky/Eigen_Token_Deploy.s.sol b/script/deploy/holesky/Eigen_Token_Deploy.s.sol index bd130a034..cbeb27d8e 100644 --- a/script/deploy/holesky/Eigen_Token_Deploy.s.sol +++ b/script/deploy/holesky/Eigen_Token_Deploy.s.sol @@ -25,7 +25,7 @@ contract Eigen_Token_Deploy is Script, Test { BackingEigen public bEIGENImpl; BackingEigen public bEIGEN; - uint256 constant TOTAL_SUPPLY = 1673646668284660000000000000; + uint256 constant TOTAL_SUPPLY = 1_673_646_668_284_660_000_000_000_000; function run() external virtual { vm.startBroadcast(); @@ -49,13 +49,10 @@ contract Eigen_Token_Deploy is Script, Test { // Deploy ProxyAdmin, later set admins for all proxies to be executorMultisig tokenProxyAdmin = new ProxyAdmin(); - EIGEN = Eigen( - address(new TransparentUpgradeableProxy(address(emptyContract), address(tokenProxyAdmin), "")) - ); + EIGEN = Eigen(address(new TransparentUpgradeableProxy(address(emptyContract), address(tokenProxyAdmin), ""))); - bEIGEN = BackingEigen( - address(new TransparentUpgradeableProxy(address(emptyContract), address(tokenProxyAdmin), "")) - ); + bEIGEN = + BackingEigen(address(new TransparentUpgradeableProxy(address(emptyContract), address(tokenProxyAdmin), ""))); // deploy impls EIGENImpl = new Eigen(IERC20(address(bEIGEN))); @@ -71,26 +68,17 @@ contract Eigen_Token_Deploy is Script, Test { // upgrade and initialize proxies tokenProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(EIGEN))), - address(EIGENImpl), - abi.encodeWithSelector( - Eigen.initialize.selector, - msg.sender, - minters, - mintingAllowances, - mintAllowedAfters - ) + TransparentUpgradeableProxy(payable(address(EIGEN))), + address(EIGENImpl), + abi.encodeWithSelector(Eigen.initialize.selector, msg.sender, minters, mintingAllowances, mintAllowedAfters) ); EIGEN.mint(); tokenProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(bEIGEN))), + TransparentUpgradeableProxy(payable(address(bEIGEN))), address(bEIGENImpl), - abi.encodeWithSelector( - BackingEigen.initialize.selector, - msg.sender - ) + abi.encodeWithSelector(BackingEigen.initialize.selector, msg.sender) ); tokenProxyAdmin.transferOwnership(operationsMultisig); @@ -106,8 +94,16 @@ contract Eigen_Token_Deploy is Script, Test { require(EIGEN.owner() == msg.sender, "Eigen_Token_Deploy: EIGEN owner mismatch"); require(bEIGEN.owner() == msg.sender, "Eigen_Token_Deploy: bEIGEN owner mismatch"); - require(tokenProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN)))) == address(EIGENImpl), "Eigen_Token_Deploy: EIGEN implementation mismatch"); - require(tokenProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN)))) == address(bEIGENImpl), "Eigen_Token_Deploy: bEIGEN implementation mismatch"); + require( + tokenProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN)))) + == address(EIGENImpl), + "Eigen_Token_Deploy: EIGEN implementation mismatch" + ); + require( + tokenProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN)))) + == address(bEIGENImpl), + "Eigen_Token_Deploy: bEIGEN implementation mismatch" + ); require(tokenProxyAdmin.owner() == operationsMultisig, "Eigen_Token_Deploy: ProxyAdmin owner mismatch"); } diff --git a/script/deploy/holesky/M2_Deploy_From_Scratch.s.sol b/script/deploy/holesky/M2_Deploy_From_Scratch.s.sol index 1e7e371ea..ee3ba55a5 100644 --- a/script/deploy/holesky/M2_Deploy_From_Scratch.s.sol +++ b/script/deploy/holesky/M2_Deploy_From_Scratch.s.sol @@ -7,7 +7,7 @@ import "../../utils/ExistingDeploymentParser.sol"; * @notice Script used for the first deployment of EigenLayer core contracts to Holesky * forge script script/deploy/holesky/M2_Deploy_From_Scratch.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv * forge script script/deploy/holesky/M2_Deploy_From_Scratch.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --broadcast -vvvv - * + * */ contract M2_Deploy_Holesky_From_Scratch is ExistingDeploymentParser { function run() external virtual { @@ -61,18 +61,14 @@ contract M2_Deploy_Holesky_From_Scratch is ExistingDeploymentParser { strategyManager = StrategyManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - slasher = Slasher( - address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) - ); + slasher = + Slasher(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); eigenPodManager = EigenPodManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); // Deploy EigenPod Contracts - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); + eigenPodImplementation = + new EigenPod(IETHPOSDeposit(ETHPOSDepositAddress), eigenPodManager, EIGENPOD_GENESIS_TIME); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); avsDirectoryImplementation = new AVSDirectory(delegationManager); @@ -80,11 +76,7 @@ contract M2_Deploy_Holesky_From_Scratch is ExistingDeploymentParser { strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); slasherImplementation = new Slasher(strategyManager, delegationManager); eigenPodManagerImplementation = new EigenPodManager( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodBeacon, - strategyManager, - slasher, - delegationManager + IETHPOSDeposit(ETHPOSDepositAddress), eigenPodBeacon, strategyManager, slasher, delegationManager ); // Third, upgrade the proxy contracts to point to the implementations @@ -132,10 +124,7 @@ contract M2_Deploy_Holesky_From_Scratch is ExistingDeploymentParser { TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation), abi.encodeWithSelector( - Slasher.initialize.selector, - executorMultisig, - eigenLayerPauserReg, - SLASHER_INIT_PAUSED_STATUS + Slasher.initialize.selector, executorMultisig, eigenLayerPauserReg, SLASHER_INIT_PAUSED_STATUS ) ); // EigenPodManager diff --git a/script/deploy/holesky/Preprod_Upgrade_bEIGEN_and_EIGEN.s.sol b/script/deploy/holesky/Preprod_Upgrade_bEIGEN_and_EIGEN.s.sol index b8d7484a9..9036869f7 100644 --- a/script/deploy/holesky/Preprod_Upgrade_bEIGEN_and_EIGEN.s.sol +++ b/script/deploy/holesky/Preprod_Upgrade_bEIGEN_and_EIGEN.s.sol @@ -30,28 +30,22 @@ contract Preprod_Upgrade_bEIGEN_and_EIGEN is Script, Test { uint256 chainId = block.chainid; emit log_named_uint("You are deploying on ChainID", chainId); - if (chainId != 17000) { + if (chainId != 17_000) { revert("Chain not supported"); } bEIGEN_addressBefore = EIGEN_proxy.bEIGEN(); - require(bEIGEN_addressBefore == IERC20(0xA72942289a043874249E60469F68f08B8c6ECCe8), - "something horribly wrong"); + require(bEIGEN_addressBefore == IERC20(0xA72942289a043874249E60469F68f08B8c6ECCe8), "something horribly wrong"); EIGEN_addressBefore = bEIGEN_proxy.EIGEN(); - require(EIGEN_addressBefore == IERC20(0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926), - "something horribly wrong"); + require(EIGEN_addressBefore == IERC20(0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926), "something horribly wrong"); // Begin deployment vm.startBroadcast(); // Deploy new implmementation contracts - EIGEN_implementation = new Eigen({ - _bEIGEN: bEIGEN_addressBefore - }); - bEIGEN_implementation = new BackingEigen({ - _EIGEN: EIGEN_addressBefore - }); + EIGEN_implementation = new Eigen({_bEIGEN: bEIGEN_addressBefore}); + bEIGEN_implementation = new BackingEigen({_EIGEN: EIGEN_addressBefore}); vm.stopBroadcast(); @@ -61,13 +55,11 @@ contract Preprod_Upgrade_bEIGEN_and_EIGEN is Script, Test { // Perform upgrade vm.startBroadcast(); EIGEN_ProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), - address(bEIGEN_implementation) - ); + TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), address(bEIGEN_implementation) + ); EIGEN_ProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), - address(EIGEN_implementation) - ); + TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), address(EIGEN_implementation) + ); vm.stopBroadcast(); // Perform post-upgrade tests @@ -77,14 +69,18 @@ contract Preprod_Upgrade_bEIGEN_and_EIGEN is Script, Test { function checkUpgradeCorrectness() public { cheats.startPrank(address(proxyAdminOwner)); - require(EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) == address(EIGEN_implementation), - "implementation set incorrectly"); - require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, - "bEIGEN address changed unexpectedly"); - require(EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) == address(bEIGEN_implementation), - "implementation set incorrectly"); - require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, - "EIGEN address changed unexpectedly"); + require( + EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) + == address(EIGEN_implementation), + "implementation set incorrectly" + ); + require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, "bEIGEN address changed unexpectedly"); + require( + EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) + == address(bEIGEN_implementation), + "implementation set incorrectly" + ); + require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, "EIGEN address changed unexpectedly"); cheats.stopPrank(); } diff --git a/script/deploy/holesky/bEIGEN_and_EIGEN_upgrade.s.sol b/script/deploy/holesky/bEIGEN_and_EIGEN_upgrade.s.sol index f63c8e25c..49550ea94 100644 --- a/script/deploy/holesky/bEIGEN_and_EIGEN_upgrade.s.sol +++ b/script/deploy/holesky/bEIGEN_and_EIGEN_upgrade.s.sol @@ -34,28 +34,22 @@ contract bEIGEN_and_EIGEN_upgrade is Script, Test { uint256 chainId = block.chainid; emit log_named_uint("You are deploying on ChainID", chainId); - if (chainId != 17000) { + if (chainId != 17_000) { revert("Chain not supported"); } bEIGEN_addressBefore = EIGEN_proxy.bEIGEN(); EIGEN_addressBefore = bEIGEN_proxy.EIGEN(); - require(bEIGEN_addressBefore == IERC20(0x275cCf9Be51f4a6C94aBa6114cdf2a4c45B9cb27), - "something horribly wrong"); - require(EIGEN_addressBefore == IERC20(0x3B78576F7D6837500bA3De27A60c7f594934027E), - "something horribly wrong"); + require(bEIGEN_addressBefore == IERC20(0x275cCf9Be51f4a6C94aBa6114cdf2a4c45B9cb27), "something horribly wrong"); + require(EIGEN_addressBefore == IERC20(0x3B78576F7D6837500bA3De27A60c7f594934027E), "something horribly wrong"); // Begin deployment vm.startBroadcast(); // Deploy new implementation contracts - EIGEN_implementation = new Eigen({ - _bEIGEN: bEIGEN_addressBefore - }); - bEIGEN_implementation = new BackingEigen({ - _EIGEN: EIGEN_addressBefore - }); + EIGEN_implementation = new Eigen({_bEIGEN: bEIGEN_addressBefore}); + bEIGEN_implementation = new BackingEigen({_EIGEN: EIGEN_addressBefore}); vm.stopBroadcast(); emit log_named_address("EIGEN_implementation", address(EIGEN_implementation)); @@ -70,21 +64,29 @@ contract bEIGEN_and_EIGEN_upgrade is Script, Test { function simulatePerformingUpgrade() public { cheats.startPrank(opsMultisig); // Upgrade contracts - token_ProxyAdmin.upgrade(TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), address(EIGEN_implementation)); - token_ProxyAdmin.upgrade(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), address(bEIGEN_implementation)); + token_ProxyAdmin.upgrade( + TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), address(EIGEN_implementation) + ); + token_ProxyAdmin.upgrade( + TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), address(bEIGEN_implementation) + ); cheats.stopPrank(); } function checkUpgradeCorrectness() public { vm.startPrank(opsMultisig); - require(token_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) == address(EIGEN_implementation), - "implementation set incorrectly"); - require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, - "bEIGEN address changed unexpectedly"); - require(token_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) == address(bEIGEN_implementation), - "implementation set incorrectly"); - require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, - "EIGEN address changed unexpectedly"); + require( + token_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) + == address(EIGEN_implementation), + "implementation set incorrectly" + ); + require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, "bEIGEN address changed unexpectedly"); + require( + token_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) + == address(bEIGEN_implementation), + "implementation set incorrectly" + ); + require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, "EIGEN address changed unexpectedly"); cheats.stopPrank(); } @@ -109,4 +111,4 @@ contract bEIGEN_and_EIGEN_upgrade is Script, Test { require(bEIGEN_balanceAfter == bEIGEN_balanceStart, "unwrapping did not transfer in bEIGEN"); require(EIGEN_balanceAfter == EIGEN_balanceStart, "unwrapping did not transfer out EIGEN"); } -} \ No newline at end of file +} diff --git a/script/deploy/holesky/longtail-preprod-upgrade.s.sol b/script/deploy/holesky/longtail-preprod-upgrade.s.sol index 2a9b7b9cf..69e6362a2 100644 --- a/script/deploy/holesky/longtail-preprod-upgrade.s.sol +++ b/script/deploy/holesky/longtail-preprod-upgrade.s.sol @@ -9,17 +9,12 @@ import "../../utils/ExistingDeploymentParser.sol"; * forge script script/deploy/holesky/longtail-preprod-upgrade.s.sol:Longtail_Upgrade_Preprod --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --verify --broadcast -vvvv */ contract Longtail_Upgrade_Preprod is ExistingDeploymentParser { - address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; function run() external virtual { - _parseInitialDeploymentParams( - "script/configs/holesky/eigenlayer_preprod.config.json" - ); - _parseDeployedContracts( - "script/configs/holesky/eigenlayer_addresses_preprod.config.json" - ); + _parseInitialDeploymentParams("script/configs/holesky/eigenlayer_preprod.config.json"); + _parseDeployedContracts("script/configs/holesky/eigenlayer_addresses_preprod.config.json"); emit log_named_address("Deployer Address", msg.sender); @@ -44,17 +39,17 @@ contract Longtail_Upgrade_Preprod is ExistingDeploymentParser { // Deploy and initialize proxies strategyBeacon = new UpgradeableBeacon(address(strategyFactoryBeaconImplementation)); - strategyFactory = StrategyFactory(address(new TransparentUpgradeableProxy( - address(strategyFactoryImplementation), - address(eigenLayerProxyAdmin), - abi.encodeWithSelector( - StrategyFactory.initialize.selector, - initOwner, - eigenLayerPauserReg, - 0, - strategyBeacon + strategyFactory = StrategyFactory( + address( + new TransparentUpgradeableProxy( + address(strategyFactoryImplementation), + address(eigenLayerProxyAdmin), + abi.encodeWithSelector( + StrategyFactory.initialize.selector, initOwner, eigenLayerPauserReg, 0, strategyBeacon + ) + ) ) - ))); + ); } function _tokensToBlacklist() internal pure returns (IERC20[] memory) { @@ -66,7 +61,7 @@ contract Longtail_Upgrade_Preprod is ExistingDeploymentParser { t[1] = IERC20(0xa63f56985F9C7F3bc9fFc5685535649e0C1a55f3); // sfrxETH t[2] = IERC20(0x8783C9C904e1bdC87d9168AE703c8481E8a477Fd); // ankrETH t[3] = IERC20(0xe3C063B1BEe9de02eb28352b55D49D85514C67FF); // mETH - t[4] = IERC20(0xF603c5A3F774F05d4D848A9bB139809790890864); // osETH + t[4] = IERC20(0xF603c5A3F774F05d4D848A9bB139809790890864); // osETH t[5] = IERC20(0x1d8b30cC38Dba8aBce1ac29Ea27d9cFd05379A09); // lsETH t[6] = IERC20(0x17845EA6a9BfD2caF1b9E558948BB4999dF2656e); // frxETH t[7] = IERC20(0x8720095Fa5739Ab051799211B146a2EEE4Dd8B37); // cbETH @@ -88,18 +83,26 @@ contract Longtail_Upgrade_Preprod is ExistingDeploymentParser { function _sanityChecks() internal { // Sanity checks - require(eigenLayerProxyAdmin.getProxyAdmin(TransparentUpgradeableProxy(payable(address(strategyFactory)))) == address(eigenLayerProxyAdmin), "proxy admin not set correctly"); - require(eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(strategyFactory)))) == address(strategyFactoryImplementation), "proxy impl not set correctly"); + require( + eigenLayerProxyAdmin.getProxyAdmin(TransparentUpgradeableProxy(payable(address(strategyFactory)))) + == address(eigenLayerProxyAdmin), + "proxy admin not set correctly" + ); + require( + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(strategyFactory)))) + == address(strategyFactoryImplementation), + "proxy impl not set correctly" + ); require(strategyFactory.owner() == initOwner, "owner not set correctly"); require(strategyFactory.pauserRegistry() == eigenLayerPauserReg, "pauser not set correctly"); require(strategyFactory.strategyBeacon() == strategyBeacon, "beacon not set correctly"); require(strategyFactory.strategyManager() == strategyManager, "strategy manager not set correctly"); - + require(strategyManager.strategyWhitelister() == address(strategyFactory), "whitelist role not set correctly"); - + IERC20[] memory tokensToBlacklist = _tokensToBlacklist(); - for (uint i = 0; i < tokensToBlacklist.length; i++) { + for (uint256 i = 0; i < tokensToBlacklist.length; i++) { require(strategyFactory.isBlacklisted(tokensToBlacklist[i]), "token not blacklisted"); } diff --git a/script/deploy/holesky/v0.4.3-upgrade_testnet_rewardsCoordinator.s.sol b/script/deploy/holesky/v0.4.3-upgrade_testnet_rewardsCoordinator.s.sol index aeed0cc37..631c28b48 100644 --- a/script/deploy/holesky/v0.4.3-upgrade_testnet_rewardsCoordinator.s.sol +++ b/script/deploy/holesky/v0.4.3-upgrade_testnet_rewardsCoordinator.s.sol @@ -42,10 +42,10 @@ contract Upgrade_Testnet_RewardsCoordinator is Deploy_Test_RewardsCoordinator, T TransparentUpgradeableProxy(payable(address(rewardsCoordinator))), rewardsCoordinatorImplementation ); - + bytes memory final_calldata_to_executor_multisig = encodeForExecutor( communityMultisig, //from - address(eigenLayerProxyAdmin), //to + address(eigenLayerProxyAdmin), //to 0, // value calldata_to_proxy_admin, // data ISafe.Operation.Call // operation @@ -53,7 +53,7 @@ contract Upgrade_Testnet_RewardsCoordinator is Deploy_Test_RewardsCoordinator, T // Simulate Transaction vm.prank(communityMultisig); - (bool success, ) = address(executorMultisig).call(final_calldata_to_executor_multisig); + (bool success,) = address(executorMultisig).call(final_calldata_to_executor_multisig); require(success, "Transaction failed"); // Sanity Checks @@ -65,40 +65,18 @@ contract Upgrade_Testnet_RewardsCoordinator is Deploy_Test_RewardsCoordinator, T function _sanityCheckImplementations(RewardsCoordinator oldRc, RewardsCoordinator newRc) internal { // Verify configs between both rewardsCoordinatorImplementations - assertEq( - address(oldRc.delegationManager()), - address(newRc.delegationManager()), - "DM mismatch" - ); - assertEq( - address(oldRc.strategyManager()), - address(newRc.strategyManager()), - "SM mismatch" - ); + assertEq(address(oldRc.delegationManager()), address(newRc.delegationManager()), "DM mismatch"); + assertEq(address(oldRc.strategyManager()), address(newRc.strategyManager()), "SM mismatch"); assertEq( oldRc.CALCULATION_INTERVAL_SECONDS(), newRc.CALCULATION_INTERVAL_SECONDS(), "CALCULATION_INTERVAL_SECONDS mismatch" ); + assertEq(oldRc.MAX_REWARDS_DURATION(), newRc.MAX_REWARDS_DURATION(), "MAX_REWARDS_DURATION mismatch"); + assertEq(oldRc.MAX_RETROACTIVE_LENGTH(), newRc.MAX_RETROACTIVE_LENGTH(), "MAX_RETROACTIVE_LENGTH mismatch"); + assertEq(oldRc.MAX_FUTURE_LENGTH(), newRc.MAX_FUTURE_LENGTH(), "MAX_FUTURE_LENGTH mismatch"); assertEq( - oldRc.MAX_REWARDS_DURATION(), - newRc.MAX_REWARDS_DURATION(), - "MAX_REWARDS_DURATION mismatch" - ); - assertEq( - oldRc.MAX_RETROACTIVE_LENGTH(), - newRc.MAX_RETROACTIVE_LENGTH(), - "MAX_RETROACTIVE_LENGTH mismatch" - ); - assertEq( - oldRc.MAX_FUTURE_LENGTH(), - newRc.MAX_FUTURE_LENGTH(), - "MAX_FUTURE_LENGTH mismatch" - ); - assertEq( - oldRc.GENESIS_REWARDS_TIMESTAMP(), - newRc.GENESIS_REWARDS_TIMESTAMP(), - "GENESIS_REWARDS_TIMESTAMP mismatch" + oldRc.GENESIS_REWARDS_TIMESTAMP(), newRc.GENESIS_REWARDS_TIMESTAMP(), "GENESIS_REWARDS_TIMESTAMP mismatch" ); } @@ -114,4 +92,4 @@ contract Upgrade_Testnet_RewardsCoordinator is Deploy_Test_RewardsCoordinator, T require(rewardsCoordinator.isRewardsForAllSubmitter(hopper), "Hopper is not set as rewards for all submitter"); } -} \ No newline at end of file +} diff --git a/script/deploy/holesky/v040-holesky-pepe.s.sol b/script/deploy/holesky/v040-holesky-pepe.s.sol index 6b12ccf56..a9603917f 100644 --- a/script/deploy/holesky/v040-holesky-pepe.s.sol +++ b/script/deploy/holesky/v040-holesky-pepe.s.sol @@ -10,17 +10,12 @@ import "../../utils/ExistingDeploymentParser.sol"; * forge script script/deploy/holesky/v040-holesky-pepe.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --verify --broadcast -vvvv */ contract PEPE_Deploy_Preprod is ExistingDeploymentParser { - address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; function run() external virtual { - _parseInitialDeploymentParams( - "script/configs/holesky/eigenlayer_preprod.config.json" - ); - _parseDeployedContracts( - "script/configs/holesky/eigenlayer_addresses.config.json" - ); + _parseInitialDeploymentParams("script/configs/holesky/eigenlayer_preprod.config.json"); + _parseDeployedContracts("script/configs/holesky/eigenlayer_addresses.config.json"); emit log_named_address("Deployer Address", msg.sender); @@ -49,19 +44,12 @@ contract PEPE_Deploy_Preprod is ExistingDeploymentParser { function _deployPEPE() internal { // Deploy EigenPod - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); + eigenPodImplementation = + new EigenPod(IETHPOSDeposit(ETHPOSDepositAddress), eigenPodManager, EIGENPOD_GENESIS_TIME); // Deploy EigenPodManager eigenPodManagerImplementation = new EigenPodManager( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodBeacon, - strategyManager, - slasher, - delegationManager + IETHPOSDeposit(ETHPOSDepositAddress), eigenPodBeacon, strategyManager, slasher, delegationManager ); } @@ -71,8 +59,7 @@ contract PEPE_Deploy_Preprod is ExistingDeploymentParser { // upgrade TUPS eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); } } diff --git a/script/deploy/local/Deploy_From_Scratch.s.sol b/script/deploy/local/Deploy_From_Scratch.s.sol index a6e56b723..a4aa9ad26 100644 --- a/script/deploy/local/Deploy_From_Scratch.s.sol +++ b/script/deploy/local/Deploy_From_Scratch.s.sol @@ -77,7 +77,7 @@ contract DeployFromScratch is Script, Test { StrategyBaseTVLLimits[] public deployedStrategyArray; // IMMUTABLES TO SET - uint64 GOERLI_GENESIS_TIME = 1616508000; + uint64 GOERLI_GENESIS_TIME = 1_616_508_000; // OTHER DEPLOYMENT PARAMETERS uint256 STRATEGY_MANAGER_INIT_PAUSED_STATUS; @@ -102,7 +102,9 @@ contract DeployFromScratch is Script, Test { uint32 STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS; uint256 DELEGATION_WITHDRAWAL_DELAY_BLOCKS; - function run(string memory configFileName) public { + function run( + string memory configFileName + ) public { // read and log the chainID uint256 chainId = block.chainid; emit log_named_uint("You are deploying on ChainID", chainId); @@ -117,35 +119,31 @@ contract DeployFromScratch is Script, Test { DELEGATION_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".delegation.init_paused_status"); DELEGATION_WITHDRAWAL_DELAY_BLOCKS = stdJson.readUint(config_data, ".delegation.init_withdrawal_delay_blocks"); EIGENPOD_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".eigenPodManager.init_paused_status"); - REWARDS_COORDINATOR_INIT_PAUSED_STATUS = stdJson.readUint( - config_data, - ".rewardsCoordinator.init_paused_status" - ); - REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = uint32( - stdJson.readUint(config_data, ".rewardsCoordinator.CALCULATION_INTERVAL_SECONDS") - ); - REWARDS_COORDINATOR_MAX_REWARDS_DURATION = uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_REWARDS_DURATION")); - REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH = uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_RETROACTIVE_LENGTH")); - REWARDS_COORDINATOR_MAX_FUTURE_LENGTH = uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_FUTURE_LENGTH")); - REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP = uint32(stdJson.readUint(config_data, ".rewardsCoordinator.GENESIS_REWARDS_TIMESTAMP")); + REWARDS_COORDINATOR_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".rewardsCoordinator.init_paused_status"); + REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.CALCULATION_INTERVAL_SECONDS")); + REWARDS_COORDINATOR_MAX_REWARDS_DURATION = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_REWARDS_DURATION")); + REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_RETROACTIVE_LENGTH")); + REWARDS_COORDINATOR_MAX_FUTURE_LENGTH = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.MAX_FUTURE_LENGTH")); + REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.GENESIS_REWARDS_TIMESTAMP")); REWARDS_COORDINATOR_UPDATER = stdJson.readAddress(config_data, ".rewardsCoordinator.rewards_updater_address"); - REWARDS_COORDINATOR_ACTIVATION_DELAY = uint32(stdJson.readUint(config_data, ".rewardsCoordinator.activation_delay")); - REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = uint32( - stdJson.readUint(config_data, ".rewardsCoordinator.calculation_interval_seconds") - ); - REWARDS_COORDINATOR_GLOBAL_OPERATOR_COMMISSION_BIPS = uint32( - stdJson.readUint(config_data, ".rewardsCoordinator.global_operator_commission_bips") - ); - REWARDS_COORDINATOR_OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP = uint32( - stdJson.readUint(config_data, ".rewardsCoordinator.OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP") - ); - REWARDS_COORDINATOR_OPERATOR_SET_MAX_RETROACTIVE_LENGTH = uint32( - stdJson.readUint(config_data, ".rewardsCoordinator.OPERATOR_SET_MAX_RETROACTIVE_LENGTH") - ); - - STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS = uint32( - stdJson.readUint(config_data, ".strategyManager.init_withdrawal_delay_blocks") - ); + REWARDS_COORDINATOR_ACTIVATION_DELAY = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.activation_delay")); + REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.calculation_interval_seconds")); + REWARDS_COORDINATOR_GLOBAL_OPERATOR_COMMISSION_BIPS = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.global_operator_commission_bips")); + REWARDS_COORDINATOR_OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP")); + REWARDS_COORDINATOR_OPERATOR_SET_MAX_RETROACTIVE_LENGTH = + uint32(stdJson.readUint(config_data, ".rewardsCoordinator.OPERATOR_SET_MAX_RETROACTIVE_LENGTH")); + + STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS = + uint32(stdJson.readUint(config_data, ".strategyManager.init_withdrawal_delay_blocks")); // tokens to deploy strategies for StrategyConfig[] memory strategyConfigs; @@ -189,9 +187,8 @@ contract DeployFromScratch is Script, Test { avsDirectory = AVSDirectory( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - slasher = Slasher( - address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) - ); + slasher = + Slasher(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); eigenPodManager = EigenPodManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); @@ -206,11 +203,7 @@ contract DeployFromScratch is Script, Test { } else { ethPOSDeposit = IETHPOSDeposit(stdJson.readAddress(config_data, ".ethPOSDepositAddress")); } - eigenPodImplementation = new EigenPod( - ethPOSDeposit, - eigenPodManager, - GOERLI_GENESIS_TIME - ); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, GOERLI_GENESIS_TIME); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -219,13 +212,8 @@ contract DeployFromScratch is Script, Test { strategyManagerImplementation = new StrategyManager(delegation, eigenPodManager, slasher); avsDirectoryImplementation = new AVSDirectory(delegation); slasherImplementation = new Slasher(strategyManager, delegation); - eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegation - ); + eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegation); rewardsCoordinatorImplementation = new RewardsCoordinator( delegation, strategyManager, @@ -269,10 +257,7 @@ contract DeployFromScratch is Script, Test { TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation), abi.encodeWithSelector( - Slasher.initialize.selector, - executorMultisig, - eigenLayerPauserReg, - SLASHER_INIT_PAUSED_STATUS + Slasher.initialize.selector, executorMultisig, eigenLayerPauserReg, SLASHER_INIT_PAUSED_STATUS ) ); eigenLayerProxyAdmin.upgradeAndCall( @@ -309,7 +294,9 @@ contract DeployFromScratch is Script, Test { // create upgradeable proxies that each point to the implementation and initialize them for (uint256 i = 0; i < strategyConfigs.length; ++i) { if (strategyConfigs[i].tokenAddress == address(0)) { - strategyConfigs[i].tokenAddress = address(new ERC20PresetFixedSupply("TestToken", "TEST", uint256(type(uint128).max), executorMultisig)); + strategyConfigs[i].tokenAddress = address( + new ERC20PresetFixedSupply("TestToken", "TEST", uint256(type(uint128).max), executorMultisig) + ); } deployedStrategyArray.push( StrategyBaseTVLLimits( @@ -344,13 +331,7 @@ contract DeployFromScratch is Script, Test { eigenPodManagerImplementation, rewardsCoordinatorImplementation ); - _verifyContractsPointAtOneAnother( - delegation, - strategyManager, - slasher, - eigenPodManager, - rewardsCoordinator - ); + _verifyContractsPointAtOneAnother(delegation, strategyManager, slasher, eigenPodManager, rewardsCoordinator); _verifyImplementationsSetCorrectly(); _verifyInitialOwners(); _checkPauserInitializations(); @@ -382,37 +363,25 @@ contract DeployFromScratch is Script, Test { vm.serializeAddress(deployed_addresses, "avsDirectory", address(avsDirectory)); vm.serializeAddress(deployed_addresses, "avsDirectoryImplementation", address(avsDirectoryImplementation)); vm.serializeAddress(deployed_addresses, "strategyManager", address(strategyManager)); - vm.serializeAddress( - deployed_addresses, - "strategyManagerImplementation", - address(strategyManagerImplementation) - ); + vm.serializeAddress(deployed_addresses, "strategyManagerImplementation", address(strategyManagerImplementation)); vm.serializeAddress(deployed_addresses, "eigenPodManager", address(eigenPodManager)); - vm.serializeAddress( - deployed_addresses, - "eigenPodManagerImplementation", - address(eigenPodManagerImplementation) - ); + vm.serializeAddress(deployed_addresses, "eigenPodManagerImplementation", address(eigenPodManagerImplementation)); vm.serializeAddress(deployed_addresses, "rewardsCoordinator", address(rewardsCoordinator)); vm.serializeAddress( - deployed_addresses, - "rewardsCoordinatorImplementation", - address(rewardsCoordinatorImplementation) + deployed_addresses, "rewardsCoordinatorImplementation", address(rewardsCoordinatorImplementation) ); vm.serializeAddress(deployed_addresses, "eigenPodBeacon", address(eigenPodBeacon)); vm.serializeAddress(deployed_addresses, "eigenPodImplementation", address(eigenPodImplementation)); vm.serializeAddress(deployed_addresses, "baseStrategyImplementation", address(baseStrategyImplementation)); vm.serializeAddress(deployed_addresses, "emptyContract", address(emptyContract)); - string memory deployed_addresses_output = vm.serializeString( - deployed_addresses, - "strategies", - deployed_strategies_output - ); + string memory deployed_addresses_output = + vm.serializeString(deployed_addresses, "strategies", deployed_strategies_output); { // dummy token data - string memory token = '{"tokenProxyAdmin": "0x0000000000000000000000000000000000000000", "EIGEN": "0x0000000000000000000000000000000000000000","bEIGEN": "0x0000000000000000000000000000000000000000","EIGENImpl": "0x0000000000000000000000000000000000000000","bEIGENImpl": "0x0000000000000000000000000000000000000000","eigenStrategy": "0x0000000000000000000000000000000000000000","eigenStrategyImpl": "0x0000000000000000000000000000000000000000"}'; + string memory token = + '{"tokenProxyAdmin": "0x0000000000000000000000000000000000000000", "EIGEN": "0x0000000000000000000000000000000000000000","bEIGEN": "0x0000000000000000000000000000000000000000","EIGENImpl": "0x0000000000000000000000000000000000000000","bEIGENImpl": "0x0000000000000000000000000000000000000000","eigenStrategy": "0x0000000000000000000000000000000000000000","eigenStrategyImpl": "0x0000000000000000000000000000000000000000"}'; deployed_addresses_output = vm.serializeString(deployed_addresses, "token", token); } @@ -445,7 +414,7 @@ contract DeployFromScratch is Script, Test { function _verifyContractsPointAtOneAnother( DelegationManager delegationContract, StrategyManager strategyManagerContract, - Slasher /*slasherContract*/, + Slasher, /*slasherContract*/ EigenPodManager eigenPodManagerContract, RewardsCoordinator rewardsCoordinatorContract ) internal view { @@ -457,8 +426,7 @@ contract DeployFromScratch is Script, Test { require(strategyManagerContract.slasher() == slasher, "strategyManager: slasher address not set correctly"); require( - strategyManagerContract.delegation() == delegation, - "strategyManager: delegation address not set correctly" + strategyManagerContract.delegation() == delegation, "strategyManager: delegation address not set correctly" ); require( strategyManagerContract.eigenPodManager() == eigenPodManager, @@ -482,42 +450,39 @@ contract DeployFromScratch is Script, Test { "eigenPodManager: strategyManager contract address not set correctly" ); require( - eigenPodManagerContract.slasher() == slasher, - "eigenPodManager: slasher contract address not set correctly" + eigenPodManagerContract.slasher() == slasher, "eigenPodManager: slasher contract address not set correctly" ); require( - rewardsCoordinatorContract.delegationManager() == delegation, + rewardsCoordinatorContract.delegationManager() == delegation, "rewardsCoordinator: delegation address not set correctly" ); require( - rewardsCoordinatorContract.strategyManager() == strategyManager, + rewardsCoordinatorContract.strategyManager() == strategyManager, "rewardsCoordinator: strategyManager address not set correctly" ); } function _verifyImplementationsSetCorrectly() internal view { require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(delegation)))) == - address(delegationImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(delegation)))) + == address(delegationImplementation), "delegation: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(strategyManager))) - ) == address(strategyManagerImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(strategyManager)))) + == address(strategyManagerImplementation), "strategyManager: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(slasher)))) == - address(slasherImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(slasher)))) + == address(slasherImplementation), "slasher: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(eigenPodManager))) - ) == address(eigenPodManagerImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(eigenPodManager)))) + == address(eigenPodManagerImplementation), "eigenPodManager: implementation set incorrectly" ); require( @@ -580,10 +545,7 @@ contract DeployFromScratch is Script, Test { deployedStrategyArray[i].pauserRegistry() == eigenLayerPauserReg, "StrategyBaseTVLLimits: pauser registry not set correctly" ); - require( - deployedStrategyArray[i].paused() == 0, - "StrategyBaseTVLLimits: init paused status set incorrectly" - ); + require(deployedStrategyArray[i].paused() == 0, "StrategyBaseTVLLimits: init paused status set incorrectly"); } // // pause *nothing* @@ -628,15 +590,11 @@ contract DeployFromScratch is Script, Test { ); string memory config_data = vm.readFile(deployConfigPath); - for (uint i = 0; i < deployedStrategyArray.length; i++) { - uint256 maxPerDeposit = stdJson.readUint( - config_data, - string.concat(".strategies[", vm.toString(i), "].max_per_deposit") - ); - uint256 maxDeposits = stdJson.readUint( - config_data, - string.concat(".strategies[", vm.toString(i), "].max_deposits") - ); + for (uint256 i = 0; i < deployedStrategyArray.length; i++) { + uint256 maxPerDeposit = + stdJson.readUint(config_data, string.concat(".strategies[", vm.toString(i), "].max_per_deposit")); + uint256 maxDeposits = + stdJson.readUint(config_data, string.concat(".strategies[", vm.toString(i), "].max_deposits")); (uint256 setMaxPerDeposit, uint256 setMaxDeposits) = deployedStrategyArray[i].getTVLLimits(); require(setMaxPerDeposit == maxPerDeposit, "setMaxPerDeposit not set correctly"); require(setMaxDeposits == maxDeposits, "setMaxDeposits not set correctly"); diff --git a/script/deploy/mainnet/EIGEN_timelock_reduction.s.sol b/script/deploy/mainnet/EIGEN_timelock_reduction.s.sol index 279d23e5c..35d70caae 100644 --- a/script/deploy/mainnet/EIGEN_timelock_reduction.s.sol +++ b/script/deploy/mainnet/EIGEN_timelock_reduction.s.sol @@ -14,7 +14,8 @@ import "forge-std/Test.sol"; contract EIGEN_timelock_reduction is Script, Test { Vm cheats = Vm(HEVM_ADDRESS); - TimelockController public EIGEN_TimelockController = TimelockController(payable(0x2520C6b2C1FBE1813AB5c7c1018CDa39529e9FF2)); + TimelockController public EIGEN_TimelockController = + TimelockController(payable(0x2520C6b2C1FBE1813AB5c7c1018CDa39529e9FF2)); address public EIGEN_TimelockAdmin = 0xbb00DDa2832850a43840A3A86515E3Fe226865F2; uint256 public newDelay = 0; @@ -32,13 +33,9 @@ contract EIGEN_timelock_reduction is Script, Test { uint256 minDelayBefore = EIGEN_TimelockController.getMinDelay(); - require(minDelayBefore == 10 days, - "something horribly wrong"); + require(minDelayBefore == 10 days, "something horribly wrong"); - bytes memory proposalData = abi.encodeWithSelector( - TimelockController.updateDelay.selector, - newDelay - ); + bytes memory proposalData = abi.encodeWithSelector(TimelockController.updateDelay.selector, newDelay); emit log_named_bytes("proposalData", proposalData); // propose change to zero delay @@ -66,7 +63,6 @@ contract EIGEN_timelock_reduction is Script, Test { uint256 minDelayAfter = EIGEN_TimelockController.getMinDelay(); - require(minDelayAfter == 0, - "min delay not set to zero"); + require(minDelayAfter == 0, "min delay not set to zero"); } -} \ No newline at end of file +} diff --git a/script/deploy/mainnet/EIGEN_upgrade.s.sol b/script/deploy/mainnet/EIGEN_upgrade.s.sol index 7c1adabf7..5eaec6af2 100644 --- a/script/deploy/mainnet/EIGEN_upgrade.s.sol +++ b/script/deploy/mainnet/EIGEN_upgrade.s.sol @@ -24,7 +24,8 @@ contract EIGEN_upgrade is Script, Test { Eigen public EIGEN_proxy = Eigen(0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83); Eigen public EIGEN_implementation; ProxyAdmin public EIGEN_ProxyAdmin = ProxyAdmin(0xB8915E195121f2B5D989Ec5727fd47a5259F1CEC); - TimelockController public EIGEN_TimelockController = TimelockController(payable(0x2520C6b2C1FBE1813AB5c7c1018CDa39529e9FF2)); + TimelockController public EIGEN_TimelockController = + TimelockController(payable(0x2520C6b2C1FBE1813AB5c7c1018CDa39529e9FF2)); address public EIGEN_TimelockAdmin = 0xbb00DDa2832850a43840A3A86515E3Fe226865F2; IERC20 public bEIGEN_addressBefore; @@ -42,16 +43,13 @@ contract EIGEN_upgrade is Script, Test { bEIGEN_addressBefore = EIGEN_proxy.bEIGEN(); - require(bEIGEN_addressBefore == IERC20(0x83E9115d334D248Ce39a6f36144aEaB5b3456e75), - "something horribly wrong"); + require(bEIGEN_addressBefore == IERC20(0x83E9115d334D248Ce39a6f36144aEaB5b3456e75), "something horribly wrong"); // Begin deployment vm.startBroadcast(); // Deploy new implmementation contract - EIGEN_implementation = new Eigen({ - _bEIGEN: bEIGEN_addressBefore - }); + EIGEN_implementation = new Eigen({_bEIGEN: bEIGEN_addressBefore}); vm.stopBroadcast(); @@ -67,9 +65,9 @@ contract EIGEN_upgrade is Script, Test { // Upgrade beacon uint256 delay = EIGEN_TimelockController.getMinDelay(); bytes memory data = abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), - EIGEN_implementation + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(EIGEN_proxy))), + EIGEN_implementation ); emit log_named_bytes("data", data); @@ -97,10 +95,12 @@ contract EIGEN_upgrade is Script, Test { function checkUpgradeCorrectness() public { vm.prank(address(EIGEN_TimelockController)); - require(EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) == address(EIGEN_implementation), - "implementation set incorrectly"); - require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, - "bEIGEN address changed unexpectedly"); + require( + EIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(EIGEN_proxy)))) + == address(EIGEN_implementation), + "implementation set incorrectly" + ); + require(EIGEN_proxy.bEIGEN() == bEIGEN_addressBefore, "bEIGEN address changed unexpectedly"); } function simulateWrapAndUnwrap() public { @@ -124,4 +124,4 @@ contract EIGEN_upgrade is Script, Test { require(bEIGEN_balanceAfter == bEIGEN_balanceStart, "unwrapping did not transfer in bEIGEN"); require(EIGEN_balanceAfter == EIGEN_balanceStart, "unwrapping did not transfer out EIGEN"); } -} \ No newline at end of file +} diff --git a/script/deploy/mainnet/EigenPod_Minor_Upgrade_Deploy.s.sol b/script/deploy/mainnet/EigenPod_Minor_Upgrade_Deploy.s.sol index 774e85dc8..afd2a5178 100644 --- a/script/deploy/mainnet/EigenPod_Minor_Upgrade_Deploy.s.sol +++ b/script/deploy/mainnet/EigenPod_Minor_Upgrade_Deploy.s.sol @@ -105,11 +105,8 @@ contract EigenPod_Minor_Upgrade_Deploy is Script, Test { string memory chain_info_output = vm.serializeUint(chain_info, "chainId", chainId); // Serialize new implementation addresses - string memory deployed_addresses_output = vm.serializeAddress( - deployed_addresses, - "eigenPodImplementation", - address(eigenPodImplementation) - ); + string memory deployed_addresses_output = + vm.serializeAddress(deployed_addresses, "eigenPodImplementation", address(eigenPodImplementation)); // Save addresses vm.serializeString(parent_object, deployed_addresses, deployed_addresses_output); @@ -135,25 +132,25 @@ contract EigenPod_Minor_Upgrade_Deploy is Script, Test { function _verifyEigenPodCorrectness() public view { // Check that state is correct - require(eigenPodBeacon.implementation() == address(eigenPodImplementation), - "implementation set incorrectly"); - require(eigenPodImplementation.ethPOS() == ethPOS, - "ethPOS set incorrectly"); - require(eigenPodImplementation.eigenPodManager() == eigenPodManager, - "eigenPodManager set incorrectly"); + require(eigenPodBeacon.implementation() == address(eigenPodImplementation), "implementation set incorrectly"); + require(eigenPodImplementation.ethPOS() == ethPOS, "ethPOS set incorrectly"); + require(eigenPodImplementation.eigenPodManager() == eigenPodManager, "eigenPodManager set incorrectly"); // check that values are unchanged // require(eigenPodImplementation.MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR() == maxRestakedBalanceBefore, // "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR set incorrectly"); - require(eigenPodImplementation.GENESIS_TIME() == genesisTimeBefore, - "GENESIS_TIME set incorrectly"); + require(eigenPodImplementation.GENESIS_TIME() == genesisTimeBefore, "GENESIS_TIME set incorrectly"); // redundant checks on correct values // require(eigenPodImplementation.MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR() == 32 gwei, // "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR set incorrectly"); - require(eigenPodImplementation.GENESIS_TIME() == 1606824023, - "GENESIS_TIME set incorrectly"); - + require(eigenPodImplementation.GENESIS_TIME() == 1_606_824_023, "GENESIS_TIME set incorrectly"); - require(address(EigenPod(payable(eigenPodBeacon.implementation())).eigenPodManager()) == 0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338); - require(address(EigenPod(payable(eigenPodBeacon.implementation())).ethPOS()) == 0x00000000219ab540356cBB839Cbe05303d7705Fa); + require( + address(EigenPod(payable(eigenPodBeacon.implementation())).eigenPodManager()) + == 0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338 + ); + require( + address(EigenPod(payable(eigenPodBeacon.implementation())).ethPOS()) + == 0x00000000219ab540356cBB839Cbe05303d7705Fa + ); } -} \ No newline at end of file +} diff --git a/script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol b/script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol index c69bbe108..0fabf22a1 100644 --- a/script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol +++ b/script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol @@ -9,7 +9,7 @@ import "../../utils/Multisend.sol"; * @notice Script used for the first deployment of EigenLayer core contracts to Holesky * anvil --fork-url $RPC_MAINNET * forge script script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol:M2_Mainnet_Upgrade --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * + * * forge script script/deploy/mainnet/M2_Mainnet_Upgrade.s.sol:M2_Mainnet_Upgrade --rpc-url $RPC_MAINNET --private-key $PRIVATE_KEY --broadcast -vvvv * */ @@ -62,25 +62,17 @@ contract M2_Mainnet_Upgrade is ExistingDeploymentParser { ); // 2. Deploy Implementations - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); + eigenPodImplementation = + new EigenPod(IETHPOSDeposit(ETHPOSDepositAddress), eigenPodManager, EIGENPOD_GENESIS_TIME); delegationManagerImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); slasherImplementation = new Slasher(strategyManager, delegationManager); eigenPodManagerImplementation = new EigenPodManager( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodBeacon, - strategyManager, - slasher, - delegationManager + IETHPOSDeposit(ETHPOSDepositAddress), eigenPodBeacon, strategyManager, slasher, delegationManager ); } function _simulateUpgrade() internal { - vm.startPrank(executorMultisig); // First, upgrade the proxy contracts to point to the implementations @@ -91,23 +83,19 @@ contract M2_Mainnet_Upgrade is ExistingDeploymentParser { // ); // DelegationManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(delegationManager))), - address(delegationManagerImplementation) + TransparentUpgradeableProxy(payable(address(delegationManager))), address(delegationManagerImplementation) ); // StrategyManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(strategyManager))), - address(strategyManagerImplementation) + TransparentUpgradeableProxy(payable(address(strategyManager))), address(strategyManagerImplementation) ); // Slasher eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(slasher))), - address(slasherImplementation) + TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation) ); // EigenPodManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); // Second, configure additional settings and paused statuses @@ -126,7 +114,7 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { Vm cheats = Vm(HEVM_ADDRESS); // Thurs Apr 08 2024 12:00:00 GMT-0700 (Pacific Daylight Time) - uint256 timelockEta = 1712559600; + uint256 timelockEta = 1_712_559_600; function test_queueUpgrade() external { _parseDeployedContracts("script/output/mainnet/M2_mainnet_upgrade.output.json"); @@ -138,8 +126,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { address(eigenLayerProxyAdmin), 0, abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(delegationManager))), + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(delegationManager))), delegationManagerImplementation ) ); @@ -148,8 +136,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { address(eigenLayerProxyAdmin), 0, abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(slasher))), + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(slasher))), slasherImplementation ) ); @@ -158,8 +146,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { address(eigenLayerProxyAdmin), 0, abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(strategyManager))), + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(strategyManager))), strategyManagerImplementation ) ); @@ -168,8 +156,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { // address(eigenLayerProxyAdmin), // 0, // abi.encodeWithSelector( - // ProxyAdmin.upgrade.selector, - // TransparentUpgradeableProxy(payable(address(delayedWithdrawalRouter))), + // ProxyAdmin.upgrade.selector, + // TransparentUpgradeableProxy(payable(address(delayedWithdrawalRouter))), // delayedWithdrawalRouterImplementation // ) // ); @@ -178,8 +166,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { address(eigenLayerProxyAdmin), 0, abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(eigenPodManager))), + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(eigenPodManager))), eigenPodManagerImplementation ) ); @@ -187,48 +175,48 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { txs[5] = Tx( address(eigenPodBeacon), 0, - abi.encodeWithSelector( - UpgradeableBeacon.upgradeTo.selector, - eigenPodImplementation - ) + abi.encodeWithSelector(UpgradeableBeacon.upgradeTo.selector, eigenPodImplementation) ); // set the min withdrawal delay blocks on the DelegationManager txs[6] = Tx( - address(delegationManager), + address(delegationManager), 0, // value - abi.encodeWithSelector(DelegationManager.setMinWithdrawalDelayBlocks.selector, DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS) + abi.encodeWithSelector( + DelegationManager.setMinWithdrawalDelayBlocks.selector, DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS + ) ); // set beacon chain oracle on EigenPodManager // txs[7] = Tx( - // address(eigenPodManager), + // address(eigenPodManager), // 0, // value // abi.encodeWithSelector(EigenPodManager.updateBeaconChainOracle.selector, beaconOracle) // ); // set Deneb fork timestamp on EigenPodManager // txs[8] = Tx( - // address(eigenPodManager), + // address(eigenPodManager), // 0, // value // abi.encodeWithSelector(EigenPodManager.setDenebForkTimestamp.selector, EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP) // ); // unpause everything on DelegationManager txs[9] = Tx( - address(delegationManager), + address(delegationManager), 0, // value abi.encodeWithSelector(Pausable.unpause.selector, 0) ); // unpause everything on EigenPodManager txs[10] = Tx( - address(eigenPodManager), + address(eigenPodManager), 0, // value abi.encodeWithSelector(Pausable.unpause.selector, 0) ); - bytes memory calldata_to_multisend_contract = abi.encodeWithSelector(MultiSendCallOnly.multiSend.selector, encodeMultisendTxs(txs)); + bytes memory calldata_to_multisend_contract = + abi.encodeWithSelector(MultiSendCallOnly.multiSend.selector, encodeMultisendTxs(txs)); emit log_named_bytes("calldata_to_multisend_contract", calldata_to_multisend_contract); bytes memory final_calldata_to_executor_multisig = encodeForExecutor({ @@ -244,7 +232,8 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { operation: ISafe.Operation.DelegateCall }); - (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) = encodeForTimelock({ + (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) = + encodeForTimelock({ // address to be called from the timelock to: executorMultisig, // value to send in tx @@ -264,7 +253,7 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { emit log_named_bytes32("expectedTxHash", expectedTxHash); cheats.prank(operationsMultisig); - (bool success, ) = timelock.call(calldata_to_timelock_queuing_action); + (bool success,) = timelock.call(calldata_to_timelock_queuing_action); require(success, "call to timelock queuing action failed"); require(ITimelock(timelock).queuedTransactions(expectedTxHash), "expectedTxHash not queued"); @@ -272,7 +261,7 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { // test performing the upgrade cheats.warp(timelockEta); cheats.prank(operationsMultisig); - (success, ) = timelock.call(calldata_to_timelock_executing_action); + (success,) = timelock.call(calldata_to_timelock_executing_action); require(success, "call to timelock executing action failed"); // Check correctness after upgrade @@ -293,20 +282,12 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { IERC20(rETH).transfer(address(this), amount); IERC20(rETH).approve(address(strategyManager), amount); cheats.expectRevert("Pausable: index is paused"); - strategyManager.depositIntoStrategy({ - strategy: IStrategy(rETH_Strategy), - token: IERC20(rETH), - amount: amount - }); + strategyManager.depositIntoStrategy({strategy: IStrategy(rETH_Strategy), token: IERC20(rETH), amount: amount}); // unpause LST deposits and check that a deposit works cheats.prank(executorMultisig); strategyManager.unpause(0); - strategyManager.depositIntoStrategy({ - strategy: IStrategy(rETH_Strategy), - token: IERC20(rETH), - amount: amount - }); + strategyManager.depositIntoStrategy({strategy: IStrategy(rETH_Strategy), token: IERC20(rETH), amount: amount}); // check that EigenPod proofs are live (although this still reverts later in the call) EigenPod existingEigenPod = EigenPod(payable(0x0b347D5E38296277E829CE1D8C6b82e4c63C2Df3)); @@ -318,11 +299,7 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { existingEigenPod.startCheckpoint(false); cheats.expectRevert("EigenPodManager.getBlockRootAtTimestamp: state root at timestamp not yet finalized"); existingEigenPod.verifyWithdrawalCredentials( - uint64(block.timestamp), - stateRootProof, - validatorIndices, - validatorFieldsProofs, - validatorFields + uint64(block.timestamp), stateRootProof, validatorIndices, validatorFieldsProofs, validatorFields ); } @@ -330,6 +307,6 @@ contract Queue_M2_Upgrade is M2_Mainnet_Upgrade, TimelockEncoding { // empty bytes bytes memory signature; bytes32 txHash = keccak256(abi.encode(target, _value, signature, _data, eta)); - return txHash; + return txHash; } } diff --git a/script/deploy/mainnet/bEIGEN_timelock_reduction.s.sol b/script/deploy/mainnet/bEIGEN_timelock_reduction.s.sol index d4d0b4813..77dc4131f 100644 --- a/script/deploy/mainnet/bEIGEN_timelock_reduction.s.sol +++ b/script/deploy/mainnet/bEIGEN_timelock_reduction.s.sol @@ -14,7 +14,8 @@ import "forge-std/Test.sol"; contract bEIGEN_timelock_reduction is Script, Test { Vm cheats = Vm(HEVM_ADDRESS); - TimelockController public bEIGEN_TimelockController = TimelockController(payable(0xd6EC41E453C5E7dA5494f4d51A053Ab571712E6f)); + TimelockController public bEIGEN_TimelockController = + TimelockController(payable(0xd6EC41E453C5E7dA5494f4d51A053Ab571712E6f)); address public bEIGEN_TimelockAdmin = 0xbb00DDa2832850a43840A3A86515E3Fe226865F2; uint256 public newDelay = 0; @@ -32,13 +33,9 @@ contract bEIGEN_timelock_reduction is Script, Test { uint256 minDelayBefore = bEIGEN_TimelockController.getMinDelay(); - require(minDelayBefore == 24 days, - "something horribly wrong"); + require(minDelayBefore == 24 days, "something horribly wrong"); - bytes memory proposalData = abi.encodeWithSelector( - TimelockController.updateDelay.selector, - newDelay - ); + bytes memory proposalData = abi.encodeWithSelector(TimelockController.updateDelay.selector, newDelay); emit log_named_bytes("proposalData", proposalData); // propose change to zero delay @@ -66,7 +63,6 @@ contract bEIGEN_timelock_reduction is Script, Test { uint256 minDelayAfter = bEIGEN_TimelockController.getMinDelay(); - require(minDelayAfter == 0, - "min delay not set to zero"); + require(minDelayAfter == 0, "min delay not set to zero"); } -} \ No newline at end of file +} diff --git a/script/deploy/mainnet/bEIGEN_upgrade.s.sol b/script/deploy/mainnet/bEIGEN_upgrade.s.sol index b4eabdbc2..cf75d2a3c 100644 --- a/script/deploy/mainnet/bEIGEN_upgrade.s.sol +++ b/script/deploy/mainnet/bEIGEN_upgrade.s.sol @@ -21,7 +21,8 @@ contract bEIGEN_upgrade is Script, Test { BackingEigen public bEIGEN_proxy = BackingEigen(0x83E9115d334D248Ce39a6f36144aEaB5b3456e75); BackingEigen public bEIGEN_implementation; ProxyAdmin public bEIGEN_ProxyAdmin = ProxyAdmin(0x3f5Ab2D4418d38568705bFd6672630fCC3435CC9); - TimelockController public bEIGEN_TimelockController = TimelockController(payable(0xd6EC41E453C5E7dA5494f4d51A053Ab571712E6f)); + TimelockController public bEIGEN_TimelockController = + TimelockController(payable(0xd6EC41E453C5E7dA5494f4d51A053Ab571712E6f)); address public bEIGEN_TimelockAdmin = 0xbb00DDa2832850a43840A3A86515E3Fe226865F2; // // RPC url to fork from for pre-upgrade state change tests @@ -42,16 +43,13 @@ contract bEIGEN_upgrade is Script, Test { EIGEN_addressBefore = bEIGEN_proxy.EIGEN(); - require(EIGEN_addressBefore == IERC20(0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83), - "something horribly wrong"); + require(EIGEN_addressBefore == IERC20(0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83), "something horribly wrong"); // Begin deployment vm.startBroadcast(); // Deploy new implmementation contract - bEIGEN_implementation = new BackingEigen({ - _EIGEN: EIGEN_addressBefore - }); + bEIGEN_implementation = new BackingEigen({_EIGEN: EIGEN_addressBefore}); vm.stopBroadcast(); @@ -66,9 +64,9 @@ contract bEIGEN_upgrade is Script, Test { // Upgrade beacon uint256 delay = bEIGEN_TimelockController.getMinDelay(); bytes memory data = abi.encodeWithSelector( - ProxyAdmin.upgrade.selector, - TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), - bEIGEN_implementation + ProxyAdmin.upgrade.selector, + TransparentUpgradeableProxy(payable(address(bEIGEN_proxy))), + bEIGEN_implementation ); emit log_named_bytes("data", data); @@ -96,9 +94,11 @@ contract bEIGEN_upgrade is Script, Test { function checkUpgradeCorrectness() public { vm.prank(address(bEIGEN_TimelockController)); - require(bEIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) == address(bEIGEN_implementation), - "implementation set incorrectly"); - require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, - "EIGEN address changed unexpectedly"); + require( + bEIGEN_ProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(bEIGEN_proxy)))) + == address(bEIGEN_implementation), + "implementation set incorrectly" + ); + require(bEIGEN_proxy.EIGEN() == EIGEN_addressBefore, "EIGEN address changed unexpectedly"); } -} \ No newline at end of file +} diff --git a/script/deploy/mainnet/v0.3.0-mainnet-rewards.s.sol b/script/deploy/mainnet/v0.3.0-mainnet-rewards.s.sol index 1fe59bed4..1e28fb509 100644 --- a/script/deploy/mainnet/v0.3.0-mainnet-rewards.s.sol +++ b/script/deploy/mainnet/v0.3.0-mainnet-rewards.s.sol @@ -16,12 +16,8 @@ import "../../utils/ExistingDeploymentParser.sol"; */ contract MainnetRewardsCoordinatorDeploy is ExistingDeploymentParser { function run() external virtual { - _parseInitialDeploymentParams( - "script/configs/mainnet/v0.3.0-mainnet-rewards.config.json" - ); - _parseDeployedContracts( - "script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json" - ); + _parseInitialDeploymentParams("script/configs/mainnet/v0.3.0-mainnet-rewards.config.json"); + _parseDeployedContracts("script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json"); // START RECORDING TRANSACTIONS FOR DEPLOYMENT vm.startBroadcast(); @@ -46,8 +42,6 @@ contract MainnetRewardsCoordinatorDeploy is ExistingDeploymentParser { * @notice Deploy RewardsCoordinator for Holesky */ function _deployRewardsCoordinator() internal { - - // Deploy RewardsCoordinator proxy and implementation rewardsCoordinatorImplementation = new RewardsCoordinator( delegationManager, @@ -93,8 +87,7 @@ contract MainnetRewardsCoordinatorDeploy is ExistingDeploymentParser { ); eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(rewardsCoordinator))), - address(rewardsCoordinatorImplementation) + TransparentUpgradeableProxy(payable(address(rewardsCoordinator))), address(rewardsCoordinatorImplementation) ); } } diff --git a/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol b/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol index 9d3447e07..0ce157e75 100644 --- a/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol +++ b/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol @@ -15,12 +15,8 @@ import "../../utils/ExistingDeploymentParser.sol"; */ contract MainnetPEPEDeploy is ExistingDeploymentParser { function run() external virtual { - _parseInitialDeploymentParams( - "script/configs/mainnet/mainnet-config.config.json" - ); - _parseDeployedContracts( - "script/configs/mainnet/mainnet-addresses.config.json" - ); + _parseInitialDeploymentParams("script/configs/mainnet/mainnet-config.config.json"); + _parseDeployedContracts("script/configs/mainnet/mainnet-addresses.config.json"); // START RECORDING TRANSACTIONS FOR DEPLOYMENT vm.startBroadcast(); @@ -47,19 +43,12 @@ contract MainnetPEPEDeploy is ExistingDeploymentParser { function _deployPEPE() internal { // Deploy EigenPod - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); + eigenPodImplementation = + new EigenPod(IETHPOSDeposit(ETHPOSDepositAddress), eigenPodManager, EIGENPOD_GENESIS_TIME); // Deploy EigenPodManager eigenPodManagerImplementation = new EigenPodManager( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodBeacon, - strategyManager, - slasher, - delegationManager + IETHPOSDeposit(ETHPOSDepositAddress), eigenPodBeacon, strategyManager, slasher, delegationManager ); } @@ -71,8 +60,7 @@ contract MainnetPEPEDeploy is ExistingDeploymentParser { // upgrade TUPS eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); vm.stopPrank(); diff --git a/script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol b/script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol index 5513b1ee3..87958744e 100644 --- a/script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol +++ b/script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol @@ -13,12 +13,11 @@ import "script/utils/TimelockEncoding.sol"; * Test: forge test --mc Upgrade_Mainnet_RewardsCoordinator --mt test_set_reward_for_all_submitter --rpc-url $MAINNET_RPC -vv */ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, TimelockEncoding { - // CALLDATA FOR CALL TO TIMELOCK // TUESDAY, SEPTEMBER 27 2024 22:00:00 GMT (6pm EST/3pm PST) - uint256 timelockEta = 1727474400; + uint256 timelockEta = 1_727_474_400; - uint256 dayToQueueAction = 1726610400; + uint256 dayToQueueAction = 1_726_610_400; // Calldatas for upgrading RC bytes final_calldata_to_executor_multisig; @@ -41,7 +40,7 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc if (chainId != 1) { revert("Chain not supported"); } - + RewardsCoordinator oldRewardsCoordinator = rewardsCoordinatorImplementation; // Deploy Rewards Coordinator @@ -82,15 +81,13 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc txs[1] = Tx({ to: address(rewardsCoordinator), value: 0, - data: abi.encodeWithSelector( - Ownable.transferOwnership.selector, - address(operationsMultisig) - ) + data: abi.encodeWithSelector(Ownable.transferOwnership.selector, address(operationsMultisig)) }); - bytes memory calldata_to_multisend_contract = abi.encodeWithSelector(MultiSendCallOnly.multiSend.selector, encodeMultisendTxs(txs)); + bytes memory calldata_to_multisend_contract = + abi.encodeWithSelector(MultiSendCallOnly.multiSend.selector, encodeMultisendTxs(txs)); emit log_named_bytes("calldata_to_multisend_contract", calldata_to_multisend_contract); - + final_calldata_to_executor_multisig = encodeForExecutor({ from: timelock, to: multiSendCallOnly, @@ -99,7 +96,8 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc operation: ISafe.Operation.DelegateCall }); - calldata_to_timelock_queuing_action = abi.encodeWithSelector(ITimelock.queueTransaction.selector, + calldata_to_timelock_queuing_action = abi.encodeWithSelector( + ITimelock.queueTransaction.selector, timelockTarget, timelockValue, timelockSignature, @@ -109,7 +107,8 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc emit log_named_bytes("calldata_to_timelock_queuing_action", calldata_to_timelock_queuing_action); - calldata_to_timelock_executing_action = abi.encodeWithSelector(ITimelock.executeTransaction.selector, + calldata_to_timelock_executing_action = abi.encodeWithSelector( + ITimelock.executeTransaction.selector, timelockTarget, timelockValue, timelockSignature, @@ -121,23 +120,27 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc } function test_mainnet_rc_upgrade() public { - run(); + run(); vm.warp(dayToQueueAction); // Queue Transaction vm.prank(operationsMultisig); - (bool success, ) = address(timelock).call(calldata_to_timelock_queuing_action); + (bool success,) = address(timelock).call(calldata_to_timelock_queuing_action); require(success, "Timelock queueTransaction failed"); // Fast forwart to after ETA vm.warp(timelockEta + 1); vm.prank(operationsMultisig); - (success, ) = address(timelock).call(calldata_to_timelock_executing_action); + (success,) = address(timelock).call(calldata_to_timelock_executing_action); require(success, "Timelock executeTransaction failed"); // Assert owner - assertEq(address(rewardsCoordinator.owner()), address(operationsMultisig), "RewardsCoordinator owner is not OperationsMultisig"); + assertEq( + address(rewardsCoordinator.owner()), + address(operationsMultisig), + "RewardsCoordinator owner is not OperationsMultisig" + ); // Sanity Checks _verifyContractPointers(); @@ -148,50 +151,30 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc function _sanityCheckImplementations(RewardsCoordinator oldRc, RewardsCoordinator newRc) internal { // Verify configs between both rewardsCoordinatorImplementations - assertEq( - address(oldRc.delegationManager()), - address(newRc.delegationManager()), - "DM mismatch" - ); - assertEq( - address(oldRc.strategyManager()), - address(newRc.strategyManager()), - "SM mismatch" - ); + assertEq(address(oldRc.delegationManager()), address(newRc.delegationManager()), "DM mismatch"); + assertEq(address(oldRc.strategyManager()), address(newRc.strategyManager()), "SM mismatch"); assertEq( oldRc.CALCULATION_INTERVAL_SECONDS(), newRc.CALCULATION_INTERVAL_SECONDS(), "CALCULATION_INTERVAL_SECONDS mismatch" ); + assertEq(oldRc.MAX_REWARDS_DURATION(), newRc.MAX_REWARDS_DURATION(), "MAX_REWARDS_DURATION mismatch"); + assertEq(oldRc.MAX_RETROACTIVE_LENGTH(), newRc.MAX_RETROACTIVE_LENGTH(), "MAX_RETROACTIVE_LENGTH mismatch"); + assertEq(oldRc.MAX_FUTURE_LENGTH(), newRc.MAX_FUTURE_LENGTH(), "MAX_FUTURE_LENGTH mismatch"); assertEq( - oldRc.MAX_REWARDS_DURATION(), - newRc.MAX_REWARDS_DURATION(), - "MAX_REWARDS_DURATION mismatch" - ); - assertEq( - oldRc.MAX_RETROACTIVE_LENGTH(), - newRc.MAX_RETROACTIVE_LENGTH(), - "MAX_RETROACTIVE_LENGTH mismatch" - ); - assertEq( - oldRc.MAX_FUTURE_LENGTH(), - newRc.MAX_FUTURE_LENGTH(), - "MAX_FUTURE_LENGTH mismatch" - ); - assertEq( - oldRc.GENESIS_REWARDS_TIMESTAMP(), - newRc.GENESIS_REWARDS_TIMESTAMP(), - "GENESIS_REWARDS_TIMESTAMP mismatch" + oldRc.GENESIS_REWARDS_TIMESTAMP(), newRc.GENESIS_REWARDS_TIMESTAMP(), "GENESIS_REWARDS_TIMESTAMP mismatch" ); } - function test_set_reward_for_all_submitter(address hopper) public { + function test_set_reward_for_all_submitter( + address hopper + ) public { test_mainnet_rc_upgrade(); - + // Set reward for all submitters vm.prank(operationsMultisig); rewardsCoordinator.setRewardsForAllSubmitter(hopper, true); - + assertTrue(rewardsCoordinator.isRewardsForAllSubmitter(hopper), "Hopper not set for all submitters"); } -} \ No newline at end of file +} diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index 6fcb29a2e..f4102e6f2 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -129,7 +129,9 @@ contract ExistingDeploymentParser is Script, Test { uint256 STRATEGY_MAX_TOTAL_DEPOSITS; /// @notice use for parsing already deployed EigenLayer contracts - function _parseDeployedContracts(string memory existingDeploymentInfoPath) internal virtual { + function _parseDeployedContracts( + string memory existingDeploymentInfoPath + ) internal virtual { // read and log the chainID uint256 currentChainId = block.chainid; emit log_named_uint("You are parsing on ChainID", currentChainId); @@ -151,51 +153,38 @@ contract ExistingDeploymentParser is Script, Test { pauserMultisig = stdJson.readAddress(existingDeploymentData, ".parameters.pauserMultisig"); timelock = stdJson.readAddress(existingDeploymentData, ".parameters.timelock"); - eigenLayerProxyAdmin = ProxyAdmin( - stdJson.readAddress(existingDeploymentData, ".addresses.eigenLayerProxyAdmin") - ); - eigenLayerPauserReg = PauserRegistry( - stdJson.readAddress(existingDeploymentData, ".addresses.eigenLayerPauserReg") - ); + eigenLayerProxyAdmin = + ProxyAdmin(stdJson.readAddress(existingDeploymentData, ".addresses.eigenLayerProxyAdmin")); + eigenLayerPauserReg = + PauserRegistry(stdJson.readAddress(existingDeploymentData, ".addresses.eigenLayerPauserReg")); slasher = Slasher(stdJson.readAddress(existingDeploymentData, ".addresses.slasher")); - slasherImplementation = Slasher( - stdJson.readAddress(existingDeploymentData, ".addresses.slasherImplementation") - ); - delegationManager = DelegationManager( - stdJson.readAddress(existingDeploymentData, ".addresses.delegationManager") - ); - delegationManagerImplementation = DelegationManager( - stdJson.readAddress(existingDeploymentData, ".addresses.delegationManagerImplementation") - ); + slasherImplementation = Slasher(stdJson.readAddress(existingDeploymentData, ".addresses.slasherImplementation")); + delegationManager = + DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegationManager")); + delegationManagerImplementation = + DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegationManagerImplementation")); avsDirectory = AVSDirectory(stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectory")); - avsDirectoryImplementation = AVSDirectory( - stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectoryImplementation") - ); - rewardsCoordinator = RewardsCoordinator( - stdJson.readAddress(existingDeploymentData, ".addresses.rewardsCoordinator") - ); + avsDirectoryImplementation = + AVSDirectory(stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectoryImplementation")); + rewardsCoordinator = + RewardsCoordinator(stdJson.readAddress(existingDeploymentData, ".addresses.rewardsCoordinator")); rewardsCoordinatorImplementation = RewardsCoordinator( stdJson.readAddress(existingDeploymentData, ".addresses.rewardsCoordinatorImplementation") ); strategyManager = StrategyManager(stdJson.readAddress(existingDeploymentData, ".addresses.strategyManager")); - strategyManagerImplementation = StrategyManager( - stdJson.readAddress(existingDeploymentData, ".addresses.strategyManagerImplementation") - ); + strategyManagerImplementation = + StrategyManager(stdJson.readAddress(existingDeploymentData, ".addresses.strategyManagerImplementation")); strategyFactory = StrategyFactory(stdJson.readAddress(existingDeploymentData, ".addresses.strategyFactory")); - strategyFactoryImplementation = StrategyFactory( - stdJson.readAddress(existingDeploymentData, ".addresses.strategyFactoryImplementation") - ); + strategyFactoryImplementation = + StrategyFactory(stdJson.readAddress(existingDeploymentData, ".addresses.strategyFactoryImplementation")); eigenPodManager = EigenPodManager(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodManager")); - eigenPodManagerImplementation = EigenPodManager( - stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodManagerImplementation") - ); + eigenPodManagerImplementation = + EigenPodManager(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodManagerImplementation")); eigenPodBeacon = UpgradeableBeacon(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodBeacon")); - eigenPodImplementation = EigenPod( - payable(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodImplementation")) - ); - baseStrategyImplementation = StrategyBase( - stdJson.readAddress(existingDeploymentData, ".addresses.baseStrategyImplementation") - ); + eigenPodImplementation = + EigenPod(payable(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodImplementation"))); + baseStrategyImplementation = + StrategyBase(stdJson.readAddress(existingDeploymentData, ".addresses.baseStrategyImplementation")); emptyContract = EmptyContract(stdJson.readAddress(existingDeploymentData, ".addresses.emptyContract")); // Strategies Deployed, load strategy list @@ -216,10 +205,13 @@ contract ExistingDeploymentParser is Script, Test { bEIGEN = IBackingEigen(stdJson.readAddress(existingDeploymentData, ".addresses.token.bEIGEN")); bEIGENImpl = IBackingEigen(stdJson.readAddress(existingDeploymentData, ".addresses.token.bEIGENImpl")); eigenStrategy = EigenStrategy(stdJson.readAddress(existingDeploymentData, ".addresses.token.eigenStrategy")); - eigenStrategyImpl = EigenStrategy(stdJson.readAddress(existingDeploymentData, ".addresses.token.eigenStrategyImpl")); + eigenStrategyImpl = + EigenStrategy(stdJson.readAddress(existingDeploymentData, ".addresses.token.eigenStrategyImpl")); } - function _parseDeployedEigenPods(string memory existingDeploymentInfoPath) internal returns (DeployedEigenPods memory) { + function _parseDeployedEigenPods( + string memory existingDeploymentInfoPath + ) internal returns (DeployedEigenPods memory) { uint256 currentChainId = block.chainid; // READ JSON CONFIG DATA @@ -242,7 +234,9 @@ contract ExistingDeploymentParser is Script, Test { /// @notice use for deploying a new set of EigenLayer contracts /// Note that this does require multisigs to already be deployed - function _parseInitialDeploymentParams(string memory initialDeploymentParamsPath) internal virtual { + function _parseInitialDeploymentParams( + string memory initialDeploymentParamsPath + ) internal virtual { // read and log the chainID uint256 currentChainId = block.chainid; emit log_named_uint("You are parsing on ChainID", currentChainId); @@ -275,56 +269,47 @@ contract ExistingDeploymentParser is Script, Test { bytes memory tokenInfoBytes = stdJson.parseRaw(initialDeploymentData, key); // Decode the token information into the Token struct - StrategyUnderlyingTokenConfig memory tokenInfo = abi.decode( - tokenInfoBytes, - (StrategyUnderlyingTokenConfig) - ); + StrategyUnderlyingTokenConfig memory tokenInfo = abi.decode(tokenInfoBytes, (StrategyUnderlyingTokenConfig)); strategiesToDeploy.push(tokenInfo); } // Read initialize params for upgradeable contracts - STRATEGY_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint( - initialDeploymentData, - ".strategyManager.init_paused_status" - ); - STRATEGY_MANAGER_WHITELISTER = stdJson.readAddress( - initialDeploymentData, - ".strategyManager.init_strategy_whitelister" - ); + STRATEGY_MANAGER_INIT_PAUSED_STATUS = + stdJson.readUint(initialDeploymentData, ".strategyManager.init_paused_status"); + STRATEGY_MANAGER_WHITELISTER = + stdJson.readAddress(initialDeploymentData, ".strategyManager.init_strategy_whitelister"); // Slasher SLASHER_INIT_PAUSED_STATUS = stdJson.readUint(initialDeploymentData, ".slasher.init_paused_status"); // DelegationManager - DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS = stdJson.readUint( - initialDeploymentData, - ".delegationManager.init_minWithdrawalDelayBlocks" - ); - DELEGATION_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint( - initialDeploymentData, - ".delegationManager.init_paused_status" - ); + DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS = + stdJson.readUint(initialDeploymentData, ".delegationManager.init_minWithdrawalDelayBlocks"); + DELEGATION_MANAGER_INIT_PAUSED_STATUS = + stdJson.readUint(initialDeploymentData, ".delegationManager.init_paused_status"); // RewardsCoordinator - REWARDS_COORDINATOR_INIT_PAUSED_STATUS = stdJson.readUint( - initialDeploymentData, - ".rewardsCoordinator.init_paused_status" - ); - REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.CALCULATION_INTERVAL_SECONDS")); - REWARDS_COORDINATOR_MAX_REWARDS_DURATION = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_REWARDS_DURATION")); - REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_RETROACTIVE_LENGTH")); - REWARDS_COORDINATOR_MAX_FUTURE_LENGTH = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_FUTURE_LENGTH")); - REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.GENESIS_REWARDS_TIMESTAMP")); - REWARDS_COORDINATOR_UPDATER = stdJson.readAddress(initialDeploymentData, ".rewardsCoordinator.rewards_updater_address"); - REWARDS_COORDINATOR_ACTIVATION_DELAY = uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.activation_delay")); - REWARDS_COORDINATOR_GLOBAL_OPERATOR_COMMISSION_BIPS = uint32( - stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.global_operator_commission_bips") - ); + REWARDS_COORDINATOR_INIT_PAUSED_STATUS = + stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.init_paused_status"); + REWARDS_COORDINATOR_CALCULATION_INTERVAL_SECONDS = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.CALCULATION_INTERVAL_SECONDS")); + REWARDS_COORDINATOR_MAX_REWARDS_DURATION = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_REWARDS_DURATION")); + REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_RETROACTIVE_LENGTH")); + REWARDS_COORDINATOR_MAX_FUTURE_LENGTH = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.MAX_FUTURE_LENGTH")); + REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.GENESIS_REWARDS_TIMESTAMP")); + REWARDS_COORDINATOR_UPDATER = + stdJson.readAddress(initialDeploymentData, ".rewardsCoordinator.rewards_updater_address"); + REWARDS_COORDINATOR_ACTIVATION_DELAY = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.activation_delay")); + REWARDS_COORDINATOR_GLOBAL_OPERATOR_COMMISSION_BIPS = + uint32(stdJson.readUint(initialDeploymentData, ".rewardsCoordinator.global_operator_commission_bips")); // AVSDirectory AVS_DIRECTORY_INIT_PAUSED_STATUS = stdJson.readUint(initialDeploymentData, ".avsDirectory.init_paused_status"); // EigenPodManager - EIGENPOD_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint( - initialDeploymentData, - ".eigenPodManager.init_paused_status" - ); + EIGENPOD_MANAGER_INIT_PAUSED_STATUS = + stdJson.readUint(initialDeploymentData, ".eigenPodManager.init_paused_status"); // EigenPod EIGENPOD_GENESIS_TIME = uint64(stdJson.readUint(initialDeploymentData, ".eigenPod.GENESIS_TIME")); ETHPOSDepositAddress = stdJson.readAddress(initialDeploymentData, ".ethPOSDepositAddress"); @@ -336,8 +321,7 @@ contract ExistingDeploymentParser is Script, Test { function _verifyContractPointers() internal view virtual { // AVSDirectory require( - avsDirectory.delegation() == delegationManager, - "avsDirectory: delegationManager address not set correctly" + avsDirectory.delegation() == delegationManager, "avsDirectory: delegationManager address not set correctly" ); // RewardsCoordinator require( @@ -391,8 +375,8 @@ contract ExistingDeploymentParser is Script, Test { /// @notice verify implementations for Transparent Upgradeable Proxies function _verifyImplementations() internal view virtual { require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(avsDirectory)))) == - address(avsDirectoryImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(avsDirectory)))) + == address(avsDirectoryImplementation), "avsDirectory: implementation set incorrectly" ); require( @@ -408,20 +392,18 @@ contract ExistingDeploymentParser is Script, Test { "delegationManager: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(strategyManager))) - ) == address(strategyManagerImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(strategyManager)))) + == address(strategyManagerImplementation), "strategyManager: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(slasher)))) == - address(slasherImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(slasher)))) + == address(slasherImplementation), "slasher: implementation set incorrectly" ); require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(eigenPodManager))) - ) == address(eigenPodManagerImplementation), + eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(eigenPodManager)))) + == address(eigenPodManagerImplementation), "eigenPodManager: implementation set incorrectly" ); @@ -475,19 +457,12 @@ contract ExistingDeploymentParser is Script, Test { strategyManager.initialize(address(0), address(0), eigenLayerPauserReg, STRATEGY_MANAGER_INIT_PAUSED_STATUS); // EigenPodManager vm.expectRevert(bytes("Initializable: contract is already initialized")); - eigenPodManager.initialize( - address(0), - eigenLayerPauserReg, - EIGENPOD_MANAGER_INIT_PAUSED_STATUS - ); + eigenPodManager.initialize(address(0), eigenLayerPauserReg, EIGENPOD_MANAGER_INIT_PAUSED_STATUS); // Strategies for (uint256 i = 0; i < deployedStrategyArray.length; ++i) { vm.expectRevert(bytes("Initializable: contract is already initialized")); StrategyBaseTVLLimits(address(deployedStrategyArray[i])).initialize( - 0, - 0, - IERC20(address(0)), - eigenLayerPauserReg + 0, 0, IERC20(address(0)), eigenLayerPauserReg ); } } @@ -495,10 +470,7 @@ contract ExistingDeploymentParser is Script, Test { /// @notice Verify params based on config constants that are updated from calling `_parseInitialDeploymentParams` function _verifyInitializationParams() internal view virtual { // AVSDirectory - require( - avsDirectory.pauserRegistry() == eigenLayerPauserReg, - "avsdirectory: pauser registry not set correctly" - ); + require(avsDirectory.pauserRegistry() == eigenLayerPauserReg, "avsdirectory: pauser registry not set correctly"); require(avsDirectory.owner() == executorMultisig, "avsdirectory: owner not set correctly"); require( avsDirectory.paused() == AVS_DIRECTORY_INIT_PAUSED_STATUS, @@ -578,12 +550,12 @@ contract ExistingDeploymentParser is Script, Test { strategyManager.strategyWhitelister() == address(strategyFactory), "strategyManager: strategyWhitelister not set correctly" ); - } else if (block.chainid == 17000) { + } else if (block.chainid == 17_000) { // On holesky, for ease of whitelisting we set to executorMultisig // require( // strategyManager.strategyWhitelister() == executorMultisig, // "strategyManager: strategyWhitelister not set correctly" - // ); + // ); } // EigenPodManager require( @@ -616,10 +588,7 @@ contract ExistingDeploymentParser is Script, Test { deployedStrategyArray[i].pauserRegistry() == eigenLayerPauserReg, "StrategyBaseTVLLimits: pauser registry not set correctly" ); - require( - deployedStrategyArray[i].paused() == 0, - "StrategyBaseTVLLimits: init paused status set incorrectly" - ); + require(deployedStrategyArray[i].paused() == 0, "StrategyBaseTVLLimits: init paused status set incorrectly"); require( strategyManager.strategyIsWhitelistedForDeposit(deployedStrategyArray[i]), "StrategyBaseTVLLimits: strategy should be whitelisted" @@ -645,8 +614,7 @@ contract ExistingDeploymentParser is Script, Test { emit log_named_address("STRATEGY_MANAGER_WHITELISTER", STRATEGY_MANAGER_WHITELISTER); emit log_named_uint("SLASHER_INIT_PAUSED_STATUS", SLASHER_INIT_PAUSED_STATUS); emit log_named_uint( - "DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS", - DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS + "DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS", DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS ); emit log_named_uint("DELEGATION_MANAGER_INIT_PAUSED_STATUS", DELEGATION_MANAGER_INIT_PAUSED_STATUS); emit log_named_uint("AVS_DIRECTORY_INIT_PAUSED_STATUS", AVS_DIRECTORY_INIT_PAUSED_STATUS); @@ -671,16 +639,16 @@ contract ExistingDeploymentParser is Script, Test { /** * @notice Log contract addresses and write to output json file */ - function logAndOutputContractAddresses(string memory outputPath) public { + function logAndOutputContractAddresses( + string memory outputPath + ) public { // WRITE JSON DATA string memory parent_object = "parent object"; string memory deployed_strategies = "strategies"; for (uint256 i = 0; i < numStrategiesToDeploy; ++i) { vm.serializeAddress( - deployed_strategies, - strategiesToDeploy[i].tokenSymbol, - address(deployedStrategyArray[i]) + deployed_strategies, strategiesToDeploy[i].tokenSymbol, address(deployedStrategyArray[i]) ); } string memory deployed_strategies_output = numStrategiesToDeploy == 0 @@ -700,37 +668,22 @@ contract ExistingDeploymentParser is Script, Test { vm.serializeAddress(deployed_addresses, "avsDirectoryImplementation", address(avsDirectoryImplementation)); vm.serializeAddress(deployed_addresses, "delegationManager", address(delegationManager)); vm.serializeAddress( - deployed_addresses, - "delegationManagerImplementation", - address(delegationManagerImplementation) + deployed_addresses, "delegationManagerImplementation", address(delegationManagerImplementation) ); vm.serializeAddress(deployed_addresses, "strategyManager", address(strategyManager)); - vm.serializeAddress( - deployed_addresses, - "strategyManagerImplementation", - address(strategyManagerImplementation) - ); + vm.serializeAddress(deployed_addresses, "strategyManagerImplementation", address(strategyManagerImplementation)); vm.serializeAddress(deployed_addresses, "rewardsCoordinator", address(rewardsCoordinator)); vm.serializeAddress( - deployed_addresses, - "rewardsCoordinatorImplementation", - address(rewardsCoordinatorImplementation) + deployed_addresses, "rewardsCoordinatorImplementation", address(rewardsCoordinatorImplementation) ); vm.serializeAddress(deployed_addresses, "eigenPodManager", address(eigenPodManager)); - vm.serializeAddress( - deployed_addresses, - "eigenPodManagerImplementation", - address(eigenPodManagerImplementation) - ); + vm.serializeAddress(deployed_addresses, "eigenPodManagerImplementation", address(eigenPodManagerImplementation)); vm.serializeAddress(deployed_addresses, "eigenPodBeacon", address(eigenPodBeacon)); vm.serializeAddress(deployed_addresses, "eigenPodImplementation", address(eigenPodImplementation)); vm.serializeAddress(deployed_addresses, "baseStrategyImplementation", address(baseStrategyImplementation)); vm.serializeAddress(deployed_addresses, "emptyContract", address(emptyContract)); - string memory deployed_addresses_output = vm.serializeString( - deployed_addresses, - "strategies", - deployed_strategies_output - ); + string memory deployed_addresses_output = + vm.serializeString(deployed_addresses, "strategies", deployed_strategies_output); string memory parameters = "parameters"; vm.serializeAddress(parameters, "executorMultisig", executorMultisig); diff --git a/script/utils/Multisend.sol b/script/utils/Multisend.sol index 72637959a..dff98b4d5 100644 --- a/script/utils/Multisend.sol +++ b/script/utils/Multisend.sol @@ -18,7 +18,9 @@ contract MultiSendCallOnly { /// but reverts if a transaction tries to use a delegatecall. /// @notice This method is payable as delegatecalls keep the msg.value from the previous call /// If the calling method (e.g. execTransaction) received ETH this would revert otherwise - function multiSend(bytes memory transactions) public payable { + function multiSend( + bytes memory transactions + ) public payable { // solhint-disable-next-line no-inline-assembly assembly { let length := mload(transactions) @@ -43,19 +45,13 @@ contract MultiSendCallOnly { let data := add(transactions, add(i, 0x55)) let success := 0 switch operation - case 0 { - success := call(gas(), to, value, data, dataLength, 0, 0) - } - // This version does not allow delegatecalls - case 1 { - revert(0, 0) - } - if eq(success, 0) { - revert(0, 0) - } + case 0 { success := call(gas(), to, value, data, dataLength, 0, 0) } + // This version does not allow delegatecalls + case 1 { revert(0, 0) } + if eq(success, 0) { revert(0, 0) } // Next entry starts at 85 byte + data length i := add(i, add(0x55, dataLength)) } } } -} \ No newline at end of file +} diff --git a/script/utils/TimelockEncoding.sol b/script/utils/TimelockEncoding.sol index cbb0c8da3..4cf49075c 100644 --- a/script/utils/TimelockEncoding.sol +++ b/script/utils/TimelockEncoding.sol @@ -27,23 +27,17 @@ contract TimelockEncoding is Test { uint256 value, bytes memory data, uint256 timelockEta - ) public returns (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) { - calldata_to_timelock_queuing_action = abi.encodeWithSelector(ITimelock.queueTransaction.selector, - to, - value, - timelockSignature, - data, - timelockEta - ); + ) + public + returns (bytes memory calldata_to_timelock_queuing_action, bytes memory calldata_to_timelock_executing_action) + { + calldata_to_timelock_queuing_action = + abi.encodeWithSelector(ITimelock.queueTransaction.selector, to, value, timelockSignature, data, timelockEta); emit log_named_bytes("calldata_to_timelock_queuing_action", calldata_to_timelock_queuing_action); - calldata_to_timelock_executing_action = abi.encodeWithSelector(ITimelock.executeTransaction.selector, - to, - value, - timelockSignature, - data, - timelockEta + calldata_to_timelock_executing_action = abi.encodeWithSelector( + ITimelock.executeTransaction.selector, to, value, timelockSignature, data, timelockEta ); emit log_named_bytes("calldata_to_timelock_executing_action", calldata_to_timelock_executing_action); @@ -62,10 +56,11 @@ contract TimelockEncoding is Test { bytes1 v = bytes1(uint8(1)); bytes32 r = bytes32(uint256(uint160(from))); bytes32 s; - bytes memory sig = abi.encodePacked(r,s,v); + bytes memory sig = abi.encodePacked(r, s, v); emit log_named_bytes("sig", sig); - bytes memory final_calldata_to_executor_multisig = abi.encodeWithSelector(ISafe.execTransaction.selector, + bytes memory final_calldata_to_executor_multisig = abi.encodeWithSelector( + ISafe.execTransaction.selector, to, value, data, @@ -76,7 +71,7 @@ contract TimelockEncoding is Test { gasToken, refundReceiver, sig - ); + ); emit log_named_bytes("final_calldata_to_executor_multisig", final_calldata_to_executor_multisig); @@ -89,18 +84,13 @@ contract TimelockEncoding is Test { bytes data; } - function encodeMultisendTxs(Tx[] memory txs) public pure returns (bytes memory) { + function encodeMultisendTxs( + Tx[] memory txs + ) public pure returns (bytes memory) { bytes memory ret = new bytes(0); for (uint256 i = 0; i < txs.length; i++) { ret = abi.encodePacked( - ret, - abi.encodePacked( - uint8(0), - txs[i].to, - txs[i].value, - uint256(txs[i].data.length), - txs[i].data - ) + ret, abi.encodePacked(uint8(0), txs[i].to, txs[i].value, uint256(txs[i].data.length), txs[i].data) ); } return ret; diff --git a/script/utils/TxEncodingInterfaces.sol b/script/utils/TxEncodingInterfaces.sol index a967da943..684e38801 100644 --- a/script/utils/TxEncodingInterfaces.sol +++ b/script/utils/TxEncodingInterfaces.sol @@ -16,13 +16,29 @@ interface ISafe { bytes memory signatures ) external; - enum Operation {Call, DelegateCall} + enum Operation { + Call, + DelegateCall + } } // based on https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol interface ITimelock { - function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) external returns (bytes32); - function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) external payable returns (bytes memory); - function queuedTransactions(bytes32) external view returns (bool); + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external returns (bytes32); + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external payable returns (bytes memory); + function queuedTransactions( + bytes32 + ) external view returns (bool); } - diff --git a/script/whitelist/ERC20PresetMinterPauser.sol b/script/whitelist/ERC20PresetMinterPauser.sol index 9aa3fb4b1..68b126a97 100644 --- a/script/whitelist/ERC20PresetMinterPauser.sol +++ b/script/whitelist/ERC20PresetMinterPauser.sol @@ -7,7 +7,6 @@ import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; - /** * @dev {ERC20} token, including: * @@ -66,7 +65,6 @@ contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burna */ function pause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); - } /** @@ -82,11 +80,7 @@ contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burna require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); } - function _beforeTokenTransfer( - address from, - address to, - uint256 amount - ) internal virtual override(ERC20) { + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20) { super._beforeTokenTransfer(from, to, amount); } -} \ No newline at end of file +} diff --git a/script/whitelist/Staker.sol b/script/whitelist/Staker.sol index f353610ce..300456bb4 100644 --- a/script/whitelist/Staker.sol +++ b/script/whitelist/Staker.sol @@ -11,13 +11,12 @@ import "@openzeppelin/contracts/access/Ownable.sol"; import "forge-std/Test.sol"; contract Staker is Ownable { - constructor( - IStrategy strategy, + IStrategy strategy, IStrategyManager strategyManager, IDelegationManager delegation, - IERC20 token, - uint256 amount, + IERC20 token, + uint256 amount, address operator ) Ownable() { token.approve(address(strategyManager), type(uint256).max); @@ -25,27 +24,16 @@ contract Staker is Ownable { ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry; delegation.delegateTo(operator, signatureWithExpiry, bytes32(0)); } - - function callAddress(address implementation, bytes memory data) external onlyOwner returns(bytes memory) { + + function callAddress(address implementation, bytes memory data) external onlyOwner returns (bytes memory) { uint256 length = data.length; - bytes memory returndata; - assembly{ - let result := call( - gas(), - implementation, - callvalue(), - add(data, 32), - length, - 0, - 0 - ) + bytes memory returndata; + assembly { + let result := call(gas(), implementation, callvalue(), add(data, 32), length, 0, 0) mstore(returndata, returndatasize()) returndatacopy(add(returndata, 32), 0, returndatasize()) } - return returndata; - } - } diff --git a/script/whitelist/delegationFaucet/DelegationFaucet.sol b/script/whitelist/delegationFaucet/DelegationFaucet.sol index 327e8e678..76240b95e 100644 --- a/script/whitelist/delegationFaucet/DelegationFaucet.sol +++ b/script/whitelist/delegationFaucet/DelegationFaucet.sol @@ -115,10 +115,7 @@ contract DelegationFaucet is IDelegationFaucet, Ownable { bytes32 _approverSalt ) public onlyOwner returns (bytes memory) { bytes memory data = abi.encodeWithSelector( - IDelegationManager.delegateTo.selector, - _operator, - _approverSignatureAndExpiry, - _approverSalt + IDelegationManager.delegateTo.selector, _operator, _approverSignatureAndExpiry, _approverSalt ); return DelegationFaucetStaker(getStaker(_operator)).callAddress(address(delegation), data); } @@ -128,12 +125,9 @@ contract DelegationFaucet is IDelegationFaucet, Ownable { */ function queueWithdrawal( address staker, - IDelegationManager.QueuedWithdrawalParams[] calldata queuedWithdrawalParams + IDelegationManager.QueuedWithdrawalParams[] calldata queuedWithdrawalParams ) public onlyOwner returns (bytes memory) { - bytes memory data = abi.encodeWithSelector( - IDelegationManager.queueWithdrawals.selector, - queuedWithdrawalParams - ); + bytes memory data = abi.encodeWithSelector(IDelegationManager.queueWithdrawals.selector, queuedWithdrawalParams); return DelegationFaucetStaker(staker).callAddress(address(delegation), data); } @@ -186,14 +180,15 @@ contract DelegationFaucet is IDelegationFaucet, Ownable { * @notice Returns the deterministic staker contract address for the operator * @param _operator The operator to get the staker contract address for */ - function getStaker(address _operator) public view returns (address) { - return - Create2.computeAddress( - bytes32(uint256(uint160(_operator))), //salt - keccak256( - abi.encodePacked(type(DelegationFaucetStaker).creationCode, abi.encode(strategyManager, stakeToken)) - ) - ); + function getStaker( + address _operator + ) public view returns (address) { + return Create2.computeAddress( + bytes32(uint256(uint160(_operator))), //salt + keccak256( + abi.encodePacked(type(DelegationFaucetStaker).creationCode, abi.encode(strategyManager, stakeToken)) + ) + ); } /** @@ -205,12 +200,8 @@ contract DelegationFaucet is IDelegationFaucet, Ownable { IERC20 _token, uint256 _amount ) internal returns (bytes memory) { - bytes memory data = abi.encodeWithSelector( - IStrategyManager.depositIntoStrategy.selector, - _strategy, - _token, - _amount - ); + bytes memory data = + abi.encodeWithSelector(IStrategyManager.depositIntoStrategy.selector, _strategy, _token, _amount); return DelegationFaucetStaker(_staker).callAddress(address(strategyManager), data); } } diff --git a/script/whitelist/delegationFaucet/DeployDelegationFaucet.sol b/script/whitelist/delegationFaucet/DeployDelegationFaucet.sol index db458e99d..9805ebbd9 100644 --- a/script/whitelist/delegationFaucet/DeployDelegationFaucet.sol +++ b/script/whitelist/delegationFaucet/DeployDelegationFaucet.sol @@ -73,7 +73,9 @@ contract DeployDelegationFaucet is Script, DSTest { vm.stopBroadcast(); } - function _setAddresses(string memory config) internal { + function _setAddresses( + string memory config + ) internal { eigenLayerProxyAdminAddress = stdJson.readAddress(config, ".addresses.eigenLayerProxyAdmin"); eigenLayerPauserRegAddress = stdJson.readAddress(config, ".addresses.eigenLayerPauserReg"); delegationAddress = stdJson.readAddress(config, ".addresses.delegation"); diff --git a/src/contracts/core/AVSDirectory.sol b/src/contracts/core/AVSDirectory.sol index 9c3a0a65f..52b997192 100644 --- a/src/contracts/core/AVSDirectory.sol +++ b/src/contracts/core/AVSDirectory.sol @@ -31,7 +31,9 @@ contract AVSDirectory is * @dev Initializes the immutable addresses of the strategy mananger, delegationManager, slasher, * and eigenpodManager contracts */ - constructor(IDelegationManager _delegation) AVSDirectoryStorage(_delegation) { + constructor( + IDelegationManager _delegation + ) AVSDirectoryStorage(_delegation) { _disableInitializers(); ORIGINAL_CHAIN_ID = block.chainid; } @@ -104,10 +106,9 @@ contract AVSDirectory is } /// @inheritdoc IAVSDirectory - function deregisterOperatorFromAVS(address operator) - external - onlyWhenNotPaused(PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS) - { + function deregisterOperatorFromAVS( + address operator + ) external onlyWhenNotPaused(PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS) { require( avsOperatorStatus[msg.sender][operator] == OperatorAVSRegistrationStatus.REGISTERED, "AVSDirectory.deregisterOperatorFromAVS: operator not registered" @@ -120,12 +121,16 @@ contract AVSDirectory is } /// @inheritdoc IAVSDirectory - function updateAVSMetadataURI(string calldata metadataURI) external { + function updateAVSMetadataURI( + string calldata metadataURI + ) external { emit AVSMetadataURIUpdated(msg.sender, metadataURI); } /// @inheritdoc IAVSDirectory - function cancelSalt(bytes32 salt) external { + function cancelSalt( + bytes32 salt + ) external { require(!operatorSaltIsSpent[msg.sender][salt], "AVSDirectory.cancelSalt: cannot cancel spent salt"); operatorSaltIsSpent[msg.sender][salt] = true; } diff --git a/src/contracts/core/AVSDirectoryStorage.sol b/src/contracts/core/AVSDirectoryStorage.sol index 47a326f16..d29e143ef 100644 --- a/src/contracts/core/AVSDirectoryStorage.sol +++ b/src/contracts/core/AVSDirectoryStorage.sol @@ -30,7 +30,9 @@ abstract contract AVSDirectoryStorage is IAVSDirectory { /// @dev Salt is used in the `registerOperatorToAVS` function. mapping(address => mapping(bytes32 => bool)) public operatorSaltIsSpent; - constructor(IDelegationManager _delegation) { + constructor( + IDelegationManager _delegation + ) { delegation = _delegation; } diff --git a/src/contracts/core/DelegationManager.sol b/src/contracts/core/DelegationManager.sol index cdf71f070..15706daed 100644 --- a/src/contracts/core/DelegationManager.sol +++ b/src/contracts/core/DelegationManager.sol @@ -111,13 +111,17 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function modifyOperatorDetails(OperatorDetails calldata newOperatorDetails) external { + function modifyOperatorDetails( + OperatorDetails calldata newOperatorDetails + ) external { require(isOperator(msg.sender), "DelegationManager.modifyOperatorDetails: caller must be an operator"); _setOperatorDetails(msg.sender, newOperatorDetails); } /// @inheritdoc IDelegationManager - function updateOperatorMetadataURI(string calldata metadataURI) external { + function updateOperatorMetadataURI( + string calldata metadataURI + ) external { require(isOperator(msg.sender), "DelegationManager.updateOperatorMetadataURI: caller must be an operator"); emit OperatorMetadataURIUpdated(msg.sender, metadataURI); } @@ -168,11 +172,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function undelegate(address staker) - external - onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) - returns (bytes32[] memory withdrawalRoots) - { + function undelegate( + address staker + ) external onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) returns (bytes32[] memory withdrawalRoots) { require(isDelegated(staker), "DelegationManager.undelegate: staker must be delegated to undelegate"); require(!isOperator(staker), "DelegationManager.undelegate: operators cannot be undelegated"); require(staker != address(0), "DelegationManager.undelegate: cannot undelegate zero address"); @@ -221,11 +223,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function queueWithdrawals(QueuedWithdrawalParams[] calldata queuedWithdrawalParams) - external - onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) - returns (bytes32[] memory) - { + function queueWithdrawals( + QueuedWithdrawalParams[] calldata queuedWithdrawalParams + ) external onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) returns (bytes32[] memory) { bytes32[] memory withdrawalRoots = new bytes32[](queuedWithdrawalParams.length); address operator = delegatedTo[msg.sender]; @@ -312,7 +312,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) external onlyOwner { + function setMinWithdrawalDelayBlocks( + uint256 newMinWithdrawalDelayBlocks + ) external onlyOwner { _setMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks); } @@ -646,7 +648,9 @@ contract DelegationManager is } } - function _setMinWithdrawalDelayBlocks(uint256 _minWithdrawalDelayBlocks) internal { + function _setMinWithdrawalDelayBlocks( + uint256 _minWithdrawalDelayBlocks + ) internal { require( _minWithdrawalDelayBlocks <= MAX_WITHDRAWAL_DELAY_BLOCKS, "DelegationManager._setMinWithdrawalDelayBlocks: _minWithdrawalDelayBlocks cannot be > MAX_WITHDRAWAL_DELAY_BLOCKS" @@ -701,27 +705,37 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function isDelegated(address staker) public view returns (bool) { + function isDelegated( + address staker + ) public view returns (bool) { return (delegatedTo[staker] != address(0)); } /// @inheritdoc IDelegationManager - function isOperator(address operator) public view returns (bool) { + function isOperator( + address operator + ) public view returns (bool) { return operator != address(0) && delegatedTo[operator] == operator; } /// @inheritdoc IDelegationManager - function operatorDetails(address operator) external view returns (OperatorDetails memory) { + function operatorDetails( + address operator + ) external view returns (OperatorDetails memory) { return _operatorDetails[operator]; } /// @inheritdoc IDelegationManager - function delegationApprover(address operator) external view returns (address) { + function delegationApprover( + address operator + ) external view returns (address) { return _operatorDetails[operator].delegationApprover; } /// @inheritdoc IDelegationManager - function stakerOptOutWindowBlocks(address operator) external view returns (uint256) { + function stakerOptOutWindowBlocks( + address operator + ) external view returns (uint256) { return _operatorDetails[operator].stakerOptOutWindowBlocks; } @@ -738,7 +752,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function getDelegatableShares(address staker) public view returns (IStrategy[] memory, uint256[] memory) { + function getDelegatableShares( + address staker + ) public view returns (IStrategy[] memory, uint256[] memory) { // Get currently active shares and strategies for `staker` int256 podShares = eigenPodManager.podOwnerShares(staker); (IStrategy[] memory strategyManagerStrats, uint256[] memory strategyManagerShares) = @@ -784,7 +800,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function getWithdrawalDelay(IStrategy[] calldata strategies) public view returns (uint256) { + function getWithdrawalDelay( + IStrategy[] calldata strategies + ) public view returns (uint256) { uint256 withdrawalDelay = minWithdrawalDelayBlocks; for (uint256 i = 0; i < strategies.length; ++i) { uint256 currWithdrawalDelay = strategyWithdrawalDelayBlocks[strategies[i]]; @@ -796,7 +814,9 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function calculateWithdrawalRoot(Withdrawal memory withdrawal) public pure returns (bytes32) { + function calculateWithdrawalRoot( + Withdrawal memory withdrawal + ) public pure returns (bytes32) { return keccak256(abi.encode(withdrawal)); } diff --git a/src/contracts/core/RewardsCoordinator.sol b/src/contracts/core/RewardsCoordinator.sol index 7e74a3e54..a38f5fc84 100644 --- a/src/contracts/core/RewardsCoordinator.sol +++ b/src/contracts/core/RewardsCoordinator.sol @@ -118,11 +118,9 @@ contract RewardsCoordinator is */ /// @inheritdoc IRewardsCoordinator - function createAVSRewardsSubmission(RewardsSubmission[] calldata rewardsSubmissions) - external - onlyWhenNotPaused(PAUSED_AVS_REWARDS_SUBMISSION) - nonReentrant - { + function createAVSRewardsSubmission( + RewardsSubmission[] calldata rewardsSubmissions + ) external onlyWhenNotPaused(PAUSED_AVS_REWARDS_SUBMISSION) nonReentrant { for (uint256 i = 0; i < rewardsSubmissions.length; i++) { RewardsSubmission calldata rewardsSubmission = rewardsSubmissions[i]; uint256 nonce = submissionNonce[msg.sender]; @@ -139,12 +137,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function createRewardsForAllSubmission(RewardsSubmission[] calldata rewardsSubmissions) - external - onlyWhenNotPaused(PAUSED_REWARDS_FOR_ALL_SUBMISSION) - onlyRewardsForAllSubmitter - nonReentrant - { + function createRewardsForAllSubmission( + RewardsSubmission[] calldata rewardsSubmissions + ) external onlyWhenNotPaused(PAUSED_REWARDS_FOR_ALL_SUBMISSION) onlyRewardsForAllSubmitter nonReentrant { for (uint256 i = 0; i < rewardsSubmissions.length; i++) { RewardsSubmission calldata rewardsSubmission = rewardsSubmissions[i]; uint256 nonce = submissionNonce[msg.sender]; @@ -161,12 +156,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function createRewardsForAllEarners(RewardsSubmission[] calldata rewardsSubmissions) - external - onlyWhenNotPaused(PAUSED_REWARD_ALL_STAKERS_AND_OPERATORS) - onlyRewardsForAllSubmitter - nonReentrant - { + function createRewardsForAllEarners( + RewardsSubmission[] calldata rewardsSubmissions + ) external onlyWhenNotPaused(PAUSED_REWARD_ALL_STAKERS_AND_OPERATORS) onlyRewardsForAllSubmitter nonReentrant { for (uint256 i = 0; i < rewardsSubmissions.length; i++) { RewardsSubmission calldata rewardsSubmission = rewardsSubmissions[i]; uint256 nonce = submissionNonce[msg.sender]; @@ -244,7 +236,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function disableRoot(uint32 rootIndex) external onlyWhenNotPaused(PAUSED_SUBMIT_DISABLE_ROOTS) onlyRewardsUpdater { + function disableRoot( + uint32 rootIndex + ) external onlyWhenNotPaused(PAUSED_SUBMIT_DISABLE_ROOTS) onlyRewardsUpdater { require(rootIndex < _distributionRoots.length, "RewardsCoordinator.disableRoot: invalid rootIndex"); DistributionRoot storage root = _distributionRoots[rootIndex]; require(!root.disabled, "RewardsCoordinator.disableRoot: root already disabled"); @@ -254,7 +248,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function setClaimerFor(address claimer) external { + function setClaimerFor( + address claimer + ) external { address earner = msg.sender; address prevClaimer = claimerFor[earner]; claimerFor[earner] = claimer; @@ -262,17 +258,23 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function setActivationDelay(uint32 _activationDelay) external onlyOwner { + function setActivationDelay( + uint32 _activationDelay + ) external onlyOwner { _setActivationDelay(_activationDelay); } /// @inheritdoc IRewardsCoordinator - function setGlobalOperatorCommission(uint16 _globalCommissionBips) external onlyOwner { + function setGlobalOperatorCommission( + uint16 _globalCommissionBips + ) external onlyOwner { _setGlobalOperatorCommission(_globalCommissionBips); } /// @inheritdoc IRewardsCoordinator - function setRewardsUpdater(address _rewardsUpdater) external onlyOwner { + function setRewardsUpdater( + address _rewardsUpdater + ) external onlyOwner { _setRewardsUpdater(_rewardsUpdater); } @@ -292,7 +294,9 @@ contract RewardsCoordinator is /** * @notice Validate a RewardsSubmission. Called from both `createAVSRewardsSubmission` and `createRewardsForAllSubmission` */ - function _validateRewardsSubmission(RewardsSubmission calldata rewardsSubmission) internal view { + function _validateRewardsSubmission( + RewardsSubmission calldata rewardsSubmission + ) internal view { require( rewardsSubmission.strategiesAndMultipliers.length > 0, "RewardsCoordinator._validateRewardsSubmission: no strategies set" @@ -439,17 +443,23 @@ contract RewardsCoordinator is ); } - function _setActivationDelay(uint32 _activationDelay) internal { + function _setActivationDelay( + uint32 _activationDelay + ) internal { emit ActivationDelaySet(activationDelay, _activationDelay); activationDelay = _activationDelay; } - function _setGlobalOperatorCommission(uint16 _globalCommissionBips) internal { + function _setGlobalOperatorCommission( + uint16 _globalCommissionBips + ) internal { emit GlobalCommissionBipsSet(globalOperatorCommissionBips, _globalCommissionBips); globalOperatorCommissionBips = _globalCommissionBips; } - function _setRewardsUpdater(address _rewardsUpdater) internal { + function _setRewardsUpdater( + address _rewardsUpdater + ) internal { emit RewardsUpdaterSet(rewardsUpdater, _rewardsUpdater); rewardsUpdater = _rewardsUpdater; } @@ -461,17 +471,23 @@ contract RewardsCoordinator is */ /// @inheritdoc IRewardsCoordinator - function calculateEarnerLeafHash(EarnerTreeMerkleLeaf calldata leaf) public pure returns (bytes32) { + function calculateEarnerLeafHash( + EarnerTreeMerkleLeaf calldata leaf + ) public pure returns (bytes32) { return keccak256(abi.encodePacked(EARNER_LEAF_SALT, leaf.earner, leaf.earnerTokenRoot)); } /// @inheritdoc IRewardsCoordinator - function calculateTokenLeafHash(TokenTreeMerkleLeaf calldata leaf) public pure returns (bytes32) { + function calculateTokenLeafHash( + TokenTreeMerkleLeaf calldata leaf + ) public pure returns (bytes32) { return keccak256(abi.encodePacked(TOKEN_LEAF_SALT, leaf.token, leaf.cumulativeEarnings)); } /// @inheritdoc IRewardsCoordinator - function checkClaim(RewardsMerkleClaim calldata claim) public view returns (bool) { + function checkClaim( + RewardsMerkleClaim calldata claim + ) public view returns (bool) { _checkClaim(claim, _distributionRoots[claim.rootIndex]); return true; } @@ -487,7 +503,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function getDistributionRootAtIndex(uint256 index) external view returns (DistributionRoot memory) { + function getDistributionRootAtIndex( + uint256 index + ) external view returns (DistributionRoot memory) { return _distributionRoots[index]; } @@ -507,7 +525,9 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function getRootIndexFromHash(bytes32 rootHash) public view returns (uint32) { + function getRootIndexFromHash( + bytes32 rootHash + ) public view returns (uint32) { for (uint32 i = uint32(_distributionRoots.length); i > 0; i--) { if (_distributionRoots[i - 1].root == rootHash) { return i - 1; diff --git a/src/contracts/core/Slasher.sol b/src/contracts/core/Slasher.sol index 9a05a560a..28f147feb 100644 --- a/src/contracts/core/Slasher.sol +++ b/src/contracts/core/Slasher.sol @@ -29,11 +29,17 @@ contract Slasher is Initializable, OwnableUpgradeable, ISlasher, Pausable { function initialize(address, IPauserRegistry, uint256) external {} - function optIntoSlashing(address) external {} + function optIntoSlashing( + address + ) external {} - function freezeOperator(address) external {} + function freezeOperator( + address + ) external {} - function resetFrozenStatus(address[] calldata) external {} + function resetFrozenStatus( + address[] calldata + ) external {} function recordFirstStakeUpdate(address, uint32) external {} @@ -45,7 +51,9 @@ contract Slasher is Initializable, OwnableUpgradeable, ISlasher, Pausable { function delegation() external view returns (IDelegationManager) {} - function isFrozen(address) external view returns (bool) {} + function isFrozen( + address + ) external view returns (bool) {} function canSlash(address, address) external view returns (bool) {} @@ -59,13 +67,17 @@ contract Slasher is Initializable, OwnableUpgradeable, ISlasher, Pausable { function operatorToMiddlewareTimes(address, uint256) external view returns (MiddlewareTimes memory) {} - function middlewareTimesLength(address) external view returns (uint256) {} + function middlewareTimesLength( + address + ) external view returns (uint256) {} function getMiddlewareTimesIndexStalestUpdateBlock(address, uint32) external view returns (uint32) {} function getMiddlewareTimesIndexServeUntilBlock(address, uint32) external view returns (uint32) {} - function operatorWhitelistedContractsLinkedListSize(address) external view returns (uint256) {} + function operatorWhitelistedContractsLinkedListSize( + address + ) external view returns (uint256) {} function operatorWhitelistedContractsLinkedListEntry( address, diff --git a/src/contracts/core/StrategyManager.sol b/src/contracts/core/StrategyManager.sol index 4deeb4a97..dac8e492b 100644 --- a/src/contracts/core/StrategyManager.sol +++ b/src/contracts/core/StrategyManager.sol @@ -41,7 +41,9 @@ contract StrategyManager is _; } - modifier onlyStrategiesWhitelistedForDeposit(IStrategy strategy) { + modifier onlyStrategiesWhitelistedForDeposit( + IStrategy strategy + ) { require( strategyIsWhitelistedForDeposit[strategy], "StrategyManager.onlyStrategiesWhitelistedForDeposit: strategy not whitelisted" @@ -166,7 +168,9 @@ contract StrategyManager is } /// @inheritdoc IStrategyManager - function setStrategyWhitelister(address newStrategyWhitelister) external onlyOwner { + function setStrategyWhitelister( + address newStrategyWhitelister + ) external onlyOwner { _setStrategyWhitelister(newStrategyWhitelister); } @@ -194,10 +198,9 @@ contract StrategyManager is } /// @inheritdoc IStrategyManager - function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) - external - onlyStrategyWhitelister - { + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external onlyStrategyWhitelister { uint256 strategiesToRemoveFromWhitelistLength = strategiesToRemoveFromWhitelist.length; for (uint256 i = 0; i < strategiesToRemoveFromWhitelistLength;) { // change storage and emit event only if strategy is already in whitelist @@ -350,7 +353,9 @@ contract StrategyManager is * @notice Internal function for modifying the `strategyWhitelister`. Used inside of the `setStrategyWhitelister` and `initialize` functions. * @param newStrategyWhitelister The new address for the `strategyWhitelister` to take. */ - function _setStrategyWhitelister(address newStrategyWhitelister) internal { + function _setStrategyWhitelister( + address newStrategyWhitelister + ) internal { emit StrategyWhitelisterChanged(strategyWhitelister, newStrategyWhitelister); strategyWhitelister = newStrategyWhitelister; } @@ -358,7 +363,9 @@ contract StrategyManager is // VIEW FUNCTIONS /// @inheritdoc IStrategyManager - function getDeposits(address staker) external view returns (IStrategy[] memory, uint256[] memory) { + function getDeposits( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory) { uint256 strategiesLength = stakerStrategyList[staker].length; uint256[] memory shares = new uint256[](strategiesLength); @@ -372,7 +379,9 @@ contract StrategyManager is } /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. - function stakerStrategyListLength(address staker) external view returns (uint256) { + function stakerStrategyListLength( + address staker + ) external view returns (uint256) { return stakerStrategyList[staker].length; } diff --git a/src/contracts/interfaces/IAVSDirectory.sol b/src/contracts/interfaces/IAVSDirectory.sol index 2c3f767d8..b6fd35ae6 100644 --- a/src/contracts/interfaces/IAVSDirectory.sol +++ b/src/contracts/interfaces/IAVSDirectory.sol @@ -36,14 +36,18 @@ interface IAVSDirectory is ISignatureUtils { * @notice Called by an avs to deregister an operator with the avs. * @param operator The address of the operator to deregister. */ - function deregisterOperatorFromAVS(address operator) external; + function deregisterOperatorFromAVS( + address operator + ) external; /** * @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. * @param metadataURI The URI for metadata associated with an AVS * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `AVSMetadataURIUpdated` event */ - function updateAVSMetadataURI(string calldata metadataURI) external; + function updateAVSMetadataURI( + string calldata metadataURI + ) external; /** * @notice Returns whether or not the salt has already been used by the operator. @@ -72,7 +76,9 @@ interface IAVSDirectory is ISignatureUtils { * @notice Called by an operator to cancel a salt that has been used to register with an AVS. * @param salt A unique and single use value associated with the approver signature. */ - function cancelSalt(bytes32 salt) external; + function cancelSalt( + bytes32 salt + ) external; /** * @notice Getter function for the current EIP-712 domain separator for this contract. diff --git a/src/contracts/interfaces/IBackingEigen.sol b/src/contracts/interfaces/IBackingEigen.sol index 2542d734a..c8e031bd6 100644 --- a/src/contracts/interfaces/IBackingEigen.sol +++ b/src/contracts/interfaces/IBackingEigen.sol @@ -26,7 +26,9 @@ interface IBackingEigen is IERC20 { /** * @notice An initializer function that sets initial values for the contract's state variables. */ - function initialize(address initialOwner) external; + function initialize( + address initialOwner + ) external; // @notice Allows the contract owner to modify an entry in the `isMinter` mapping. function setIsMinter(address minterAddress, bool newStatus) external; @@ -42,7 +44,9 @@ interface IBackingEigen is IERC20 { * * See {ERC20-_burn}. */ - function burn(uint256 amount) external; + function burn( + uint256 amount + ) external; /// @notice the address of the wrapped Eigen token EIGEN function EIGEN() external view returns (IERC20); diff --git a/src/contracts/interfaces/IDelegationFaucet.sol b/src/contracts/interfaces/IDelegationFaucet.sol index 8741208db..5642c1342 100644 --- a/src/contracts/interfaces/IDelegationFaucet.sol +++ b/src/contracts/interfaces/IDelegationFaucet.sol @@ -13,7 +13,9 @@ interface IDelegationFaucet { uint256 _depositAmount ) external; - function getStaker(address operator) external returns (address); + function getStaker( + address operator + ) external returns (address); function depositIntoStrategy( address staker, diff --git a/src/contracts/interfaces/IDelegationManager.sol b/src/contracts/interfaces/IDelegationManager.sol index 2fcb8d03d..1d806ea91 100644 --- a/src/contracts/interfaces/IDelegationManager.sol +++ b/src/contracts/interfaces/IDelegationManager.sol @@ -162,14 +162,18 @@ interface IDelegationManager is ISignatureUtils { * * @dev The caller must have previously registered as an operator in EigenLayer. */ - function modifyOperatorDetails(OperatorDetails calldata newOperatorDetails) external; + function modifyOperatorDetails( + OperatorDetails calldata newOperatorDetails + ) external; /** * @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated. * @param metadataURI The URI for metadata associated with an operator * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event */ - function updateOperatorMetadataURI(string calldata metadataURI) external; + function updateOperatorMetadataURI( + string calldata metadataURI + ) external; /** * @notice Caller delegates their stake to an operator. @@ -225,7 +229,9 @@ interface IDelegationManager is ISignatureUtils { * @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover" * @dev Reverts if the `staker` is already undelegated. */ - function undelegate(address staker) external returns (bytes32[] memory withdrawalRoot); + function undelegate( + address staker + ) external returns (bytes32[] memory withdrawalRoot); /** * Allows a staker to withdraw some shares. Withdrawn shares/strategies are immediately removed @@ -234,9 +240,9 @@ interface IDelegationManager is ISignatureUtils { * * All withdrawn shares/strategies are placed in a queue and can be fully withdrawn after a delay. */ - function queueWithdrawals(QueuedWithdrawalParams[] calldata queuedWithdrawalParams) - external - returns (bytes32[] memory); + function queueWithdrawals( + QueuedWithdrawalParams[] calldata queuedWithdrawalParams + ) external returns (bytes32[] memory); /** * @notice Used to complete the specified `withdrawal`. The caller must match `withdrawal.withdrawer` @@ -301,7 +307,9 @@ interface IDelegationManager is ISignatureUtils { * @notice Owner-only function for modifying the value of the `minWithdrawalDelayBlocks` variable. * @param newMinWithdrawalDelayBlocks new value of `minWithdrawalDelayBlocks`. */ - function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) external; + function setMinWithdrawalDelayBlocks( + uint256 newMinWithdrawalDelayBlocks + ) external; /** * @notice Called by owner to set the minimum withdrawal delay blocks for each passed in strategy @@ -310,29 +318,40 @@ interface IDelegationManager is ISignatureUtils { * @param strategies The strategies to set the minimum withdrawal delay blocks for * @param withdrawalDelayBlocks The minimum withdrawal delay blocks to set for each strategy */ - function setStrategyWithdrawalDelayBlocks(IStrategy[] calldata strategies, uint256[] calldata withdrawalDelayBlocks) external; + function setStrategyWithdrawalDelayBlocks( + IStrategy[] calldata strategies, + uint256[] calldata withdrawalDelayBlocks + ) external; /** * @notice returns the address of the operator that `staker` is delegated to. * @notice Mapping: staker => operator whom the staker is currently delegated to. * @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator. */ - function delegatedTo(address staker) external view returns (address); + function delegatedTo( + address staker + ) external view returns (address); /** * @notice Returns the OperatorDetails struct associated with an `operator`. */ - function operatorDetails(address operator) external view returns (OperatorDetails memory); + function operatorDetails( + address operator + ) external view returns (OperatorDetails memory); /** * @notice Returns the delegationApprover account for an operator */ - function delegationApprover(address operator) external view returns (address); + function delegationApprover( + address operator + ) external view returns (address); /** * @notice Returns the stakerOptOutWindowBlocks for an operator */ - function stakerOptOutWindowBlocks(address operator) external view returns (uint256); + function stakerOptOutWindowBlocks( + address operator + ) external view returns (uint256); /** * @notice Given array of strategies, returns array of shares for the operator @@ -347,7 +366,9 @@ interface IDelegationManager is ISignatureUtils { * from all the inputted strategies. Return value is >= minWithdrawalDelayBlocks as this is the global min withdrawal delay. * @param strategies The strategies to check withdrawal delays for */ - function getWithdrawalDelay(IStrategy[] calldata strategies) external view returns (uint256); + function getWithdrawalDelay( + IStrategy[] calldata strategies + ) external view returns (uint256); /** * @notice returns the total number of shares in `strategy` that are delegated to `operator`. @@ -358,25 +379,32 @@ interface IDelegationManager is ISignatureUtils { */ function operatorShares(address operator, IStrategy strategy) external view returns (uint256); - /** * @notice Returns the number of actively-delegatable shares a staker has across all strategies. * @dev Returns two empty arrays in the case that the Staker has no actively-delegateable shares. */ - function getDelegatableShares(address staker) external view returns (IStrategy[] memory, uint256[] memory); + function getDelegatableShares( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory); /** * @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise. */ - function isDelegated(address staker) external view returns (bool); + function isDelegated( + address staker + ) external view returns (bool); /** * @notice Returns true is an operator has previously registered for delegation. */ - function isOperator(address operator) external view returns (bool); + function isOperator( + address operator + ) external view returns (bool); /// @notice Mapping: staker => number of signed delegation nonces (used in `delegateToBySignature`) from the staker that the contract has already checked - function stakerNonce(address staker) external view returns (uint256); + function stakerNonce( + address staker + ) external view returns (uint256); /** * @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover. @@ -397,7 +425,9 @@ interface IDelegationManager is ISignatureUtils { * @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). */ - function strategyWithdrawalDelayBlocks(IStrategy strategy) external view returns (uint256); + function strategyWithdrawalDelayBlocks( + IStrategy strategy + ) external view returns (uint256); /// @notice return address of the beaconChainETHStrategy function beaconChainETHStrategy() external view returns (IStrategy); @@ -464,8 +494,12 @@ interface IDelegationManager is ISignatureUtils { /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated. /// @dev This only increments (doesn't decrement), and is used to help ensure that otherwise identical withdrawals have unique hashes. - function cumulativeWithdrawalsQueued(address staker) external view returns (uint256); + function cumulativeWithdrawalsQueued( + address staker + ) external view returns (uint256); /// @notice Returns the keccak256 hash of `withdrawal`. - function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32); + function calculateWithdrawalRoot( + Withdrawal memory withdrawal + ) external pure returns (bytes32); } diff --git a/src/contracts/interfaces/IEigen.sol b/src/contracts/interfaces/IEigen.sol index 1809902d4..c922986cf 100644 --- a/src/contracts/interfaces/IEigen.sol +++ b/src/contracts/interfaces/IEigen.sol @@ -31,12 +31,16 @@ interface IEigen is IERC20 { /** * @notice This function allows bEIGEN holders to wrap their tokens into Eigen */ - function wrap(uint256 amount) external; + function wrap( + uint256 amount + ) external; /** * @notice This function allows Eigen holders to unwrap their tokens into bEIGEN */ - function unwrap(uint256 amount) external; + function unwrap( + uint256 amount + ) external; // @notice Burns EIGEN tokens held by the EIGEN token address itself function burnExtraTokens() external; diff --git a/src/contracts/interfaces/IEigenPod.sol b/src/contracts/interfaces/IEigenPod.sol index be96da52c..41ce7678d 100644 --- a/src/contracts/interfaces/IEigenPod.sol +++ b/src/contracts/interfaces/IEigenPod.sol @@ -89,7 +89,9 @@ interface IEigenPod { */ /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager - function initialize(address owner) external; + function initialize( + address owner + ) external; /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; @@ -115,7 +117,9 @@ interface IEigenPod { * @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner * to prevent accidentally starting a checkpoint that will not increase their shares */ - function startCheckpoint(bool revertIfNoBalance) external; + function startCheckpoint( + bool revertIfNoBalance + ) external; /** * @dev Progress the current checkpoint towards completion by submitting one or more validator @@ -200,7 +204,9 @@ interface IEigenPod { /// only address that can call these methods. /// @param newProofSubmitter The new proof submitter address. If set to 0, only the /// pod owner will be able to call `startCheckpoint` and `verifyWithdrawalCredentials` - function setProofSubmitter(address newProofSubmitter) external; + function setProofSubmitter( + address newProofSubmitter + ) external; /** * @@ -224,16 +230,24 @@ interface IEigenPod { function podOwner() external view returns (address); /// @notice Returns the validatorInfo struct for the provided pubkeyHash - function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external view returns (ValidatorInfo memory); + function validatorPubkeyHashToInfo( + bytes32 validatorPubkeyHash + ) external view returns (ValidatorInfo memory); /// @notice Returns the validatorInfo struct for the provided pubkey - function validatorPubkeyToInfo(bytes calldata validatorPubkey) external view returns (ValidatorInfo memory); + function validatorPubkeyToInfo( + bytes calldata validatorPubkey + ) external view returns (ValidatorInfo memory); /// @notice This returns the status of a given validator - function validatorStatus(bytes32 pubkeyHash) external view returns (VALIDATOR_STATUS); + function validatorStatus( + bytes32 pubkeyHash + ) external view returns (VALIDATOR_STATUS); /// @notice This returns the status of a given validator pubkey - function validatorStatus(bytes calldata validatorPubkey) external view returns (VALIDATOR_STATUS); + function validatorStatus( + bytes calldata validatorPubkey + ) external view returns (VALIDATOR_STATUS); /// @notice Number of validators with proven withdrawal credentials, who do not have proven full withdrawals function activeValidatorCount() external view returns (uint256); @@ -275,11 +289,15 @@ interface IEigenPod { /// - The final partial withdrawal for an exited validator will be likely be included in this mapping. /// i.e. if a validator was last checkpointed at 32.1 ETH before exiting, the next checkpoint will calculate their /// "exited" amount to be 32.1 ETH rather than 32 ETH. - function checkpointBalanceExitedGwei(uint64) external view returns (uint64); + function checkpointBalanceExitedGwei( + uint64 + ) external view returns (uint64); /// @notice Query the 4788 oracle to get the parent block root of the slot with the given `timestamp` /// @param timestamp of the block for which the parent block root will be returned. MUST correspond /// to an existing slot within the last 24 hours. If the slot at `timestamp` was skipped, this method /// will revert. - function getParentBlockRoot(uint64 timestamp) external view returns (bytes32); + function getParentBlockRoot( + uint64 timestamp + ) external view returns (bytes32); } diff --git a/src/contracts/interfaces/IEigenPodManager.sol b/src/contracts/interfaces/IEigenPodManager.sol index cbe253382..6d53406f9 100644 --- a/src/contracts/interfaces/IEigenPodManager.sol +++ b/src/contracts/interfaces/IEigenPodManager.sol @@ -64,10 +64,14 @@ interface IEigenPodManager is IPausable { function recordBeaconChainETHBalanceUpdate(address podOwner, int256 sharesDelta) external; /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed. - function ownerToPod(address podOwner) external view returns (IEigenPod); + function ownerToPod( + address podOwner + ) external view returns (IEigenPod); /// @notice Returns the address of the `podOwner`'s EigenPod (whether it is deployed yet or not). - function getPod(address podOwner) external view returns (IEigenPod); + function getPod( + address podOwner + ) external view returns (IEigenPod); /// @notice The ETH2 Deposit Contract function ethPOS() external view returns (IETHPOSDeposit); @@ -82,7 +86,9 @@ interface IEigenPodManager is IPausable { function slasher() external view returns (ISlasher); /// @notice Returns 'true' if the `podOwner` has created an EigenPod, and 'false' otherwise. - function hasPod(address podOwner) external view returns (bool); + function hasPod( + address podOwner + ) external view returns (bool); /// @notice Returns the number of EigenPods that have been created function numPods() external view returns (uint256); @@ -95,7 +101,9 @@ interface IEigenPodManager is IPausable { * Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this * as the withdrawal "paying off the deficit". */ - function podOwnerShares(address podOwner) external view returns (int256); + function podOwnerShares( + address podOwner + ) external view returns (int256); /// @notice returns canonical, virtual beaconChainETH strategy function beaconChainETHStrategy() external view returns (IStrategy); diff --git a/src/contracts/interfaces/IPausable.sol b/src/contracts/interfaces/IPausable.sol index 061712653..1ed5f04f7 100644 --- a/src/contracts/interfaces/IPausable.sol +++ b/src/contracts/interfaces/IPausable.sol @@ -38,7 +38,9 @@ interface IPausable { * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. * @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0. */ - function pause(uint256 newPausedStatus) external; + function pause( + uint256 newPausedStatus + ) external; /** * @notice Alias for `pause(type(uint256).max)`. @@ -51,14 +53,20 @@ interface IPausable { * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. * @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1. */ - function unpause(uint256 newPausedStatus) external; + function unpause( + uint256 newPausedStatus + ) external; /// @notice Returns the current paused status as a uint256. function paused() external view returns (uint256); /// @notice Returns 'true' if the `indexed`th bit of `_paused` is 1, and 'false' otherwise - function paused(uint8 index) external view returns (bool); + function paused( + uint8 index + ) external view returns (bool); /// @notice Allows the unpauser to set a new pauser registry - function setPauserRegistry(IPauserRegistry newPauserRegistry) external; + function setPauserRegistry( + IPauserRegistry newPauserRegistry + ) external; } diff --git a/src/contracts/interfaces/IPauserRegistry.sol b/src/contracts/interfaces/IPauserRegistry.sol index cd0b95546..c636ee91a 100644 --- a/src/contracts/interfaces/IPauserRegistry.sol +++ b/src/contracts/interfaces/IPauserRegistry.sol @@ -12,7 +12,9 @@ interface IPauserRegistry { event UnpauserChanged(address previousUnpauser, address newUnpauser); /// @notice Mapping of addresses to whether they hold the pauser role. - function isPauser(address pauser) external view returns (bool); + function isPauser( + address pauser + ) external view returns (bool); /// @notice Unique address that holds the unpauser role. Capable of changing *both* the pauser and unpauser addresses. function unpauser() external view returns (address); diff --git a/src/contracts/interfaces/IRewardsCoordinator.sol b/src/contracts/interfaces/IRewardsCoordinator.sol index 933758618..33710e1dc 100644 --- a/src/contracts/interfaces/IRewardsCoordinator.sol +++ b/src/contracts/interfaces/IRewardsCoordinator.sol @@ -207,7 +207,9 @@ interface IRewardsCoordinator { function activationDelay() external view returns (uint32); /// @notice Mapping: earner => the address of the entity who can call `processClaim` on behalf of the earner - function claimerFor(address earner) external view returns (address); + function claimerFor( + address earner + ) external view returns (address); /// @notice Mapping: claimer => token => total amount claimed function cumulativeClaimed(address claimer, IERC20 token) external view returns (uint256); @@ -220,14 +222,20 @@ interface IRewardsCoordinator { function operatorCommissionBips(address operator, address avs) external view returns (uint16); /// @notice return the hash of the earner's leaf - function calculateEarnerLeafHash(EarnerTreeMerkleLeaf calldata leaf) external pure returns (bytes32); + function calculateEarnerLeafHash( + EarnerTreeMerkleLeaf calldata leaf + ) external pure returns (bytes32); /// @notice returns the hash of the earner's token leaf - function calculateTokenLeafHash(TokenTreeMerkleLeaf calldata leaf) external pure returns (bytes32); + function calculateTokenLeafHash( + TokenTreeMerkleLeaf calldata leaf + ) external pure returns (bytes32); /// @notice returns 'true' if the claim would currently pass the check in `processClaims` /// but will revert if not valid - function checkClaim(RewardsMerkleClaim calldata claim) external view returns (bool); + function checkClaim( + RewardsMerkleClaim calldata claim + ) external view returns (bool); /// @notice The timestamp until which RewardsSubmissions have been calculated function currRewardsCalculationEndTimestamp() external view returns (uint32); @@ -236,7 +244,9 @@ interface IRewardsCoordinator { function getDistributionRootsLength() external view returns (uint256); /// @notice returns the distributionRoot at the specified index - function getDistributionRootAtIndex(uint256 index) external view returns (DistributionRoot memory); + function getDistributionRootAtIndex( + uint256 index + ) external view returns (DistributionRoot memory); /// @notice returns the current distributionRoot function getCurrentDistributionRoot() external view returns (DistributionRoot memory); @@ -246,7 +256,9 @@ interface IRewardsCoordinator { function getCurrentClaimableDistributionRoot() external view returns (DistributionRoot memory); /// @notice loop through distribution roots from reverse and return index from hash - function getRootIndexFromHash(bytes32 rootHash) external view returns (uint32); + function getRootIndexFromHash( + bytes32 rootHash + ) external view returns (uint32); /** * @@ -265,7 +277,9 @@ interface IRewardsCoordinator { * @dev This function will revert if the `rewardsSubmission` is malformed, * e.g. if the `strategies` and `weights` arrays are of non-equal lengths */ - function createAVSRewardsSubmission(RewardsSubmission[] calldata rewardsSubmissions) external; + function createAVSRewardsSubmission( + RewardsSubmission[] calldata rewardsSubmissions + ) external; /** * @notice similar to `createAVSRewardsSubmission` except the rewards are split amongst *all* stakers @@ -273,7 +287,9 @@ interface IRewardsCoordinator { * a permissioned call based on isRewardsForAllSubmitter mapping. * @param rewardsSubmission The rewards submission being created */ - function createRewardsForAllSubmission(RewardsSubmission[] calldata rewardsSubmission) external; + function createRewardsForAllSubmission( + RewardsSubmission[] calldata rewardsSubmission + ) external; /** * @notice Creates a new rewards submission for all earners across all AVSs. @@ -282,7 +298,9 @@ interface IRewardsCoordinator { * by the token hopper contract from the Eigen Foundation * @param rewardsSubmissions The rewards submissions being created */ - function createRewardsForAllEarners(RewardsSubmission[] calldata rewardsSubmissions) external; + function createRewardsForAllEarners( + RewardsSubmission[] calldata rewardsSubmissions + ) external; /** * @notice Claim rewards against a given root (read from _distributionRoots[claim.rootIndex]). @@ -310,35 +328,45 @@ interface IRewardsCoordinator { * @notice allow the rewardsUpdater to disable/cancel a pending root submission in case of an error * @param rootIndex The index of the root to be disabled */ - function disableRoot(uint32 rootIndex) external; + function disableRoot( + uint32 rootIndex + ) external; /** * @notice Sets the address of the entity that can call `processClaim` on behalf of the earner (msg.sender) * @param claimer The address of the entity that can call `processClaim` on behalf of the earner * @dev Only callable by the `earner` */ - function setClaimerFor(address claimer) external; + function setClaimerFor( + address claimer + ) external; /** * @notice Sets the delay in timestamp before a posted root can be claimed against * @dev Only callable by the contract owner * @param _activationDelay The new value for activationDelay */ - function setActivationDelay(uint32 _activationDelay) external; + function setActivationDelay( + uint32 _activationDelay + ) external; /** * @notice Sets the global commission for all operators across all avss * @param _globalCommissionBips The commission for all operators across all avss * @dev Only callable by the contract owner */ - function setGlobalOperatorCommission(uint16 _globalCommissionBips) external; + function setGlobalOperatorCommission( + uint16 _globalCommissionBips + ) external; /** * @notice Sets the permissioned `rewardsUpdater` address which can post new roots * @dev Only callable by the contract owner * @param _rewardsUpdater The address of the new rewardsUpdater */ - function setRewardsUpdater(address _rewardsUpdater) external; + function setRewardsUpdater( + address _rewardsUpdater + ) external; /** * @notice Sets the permissioned `rewardsForAllSubmitter` address which can submit createRewardsForAllSubmission diff --git a/src/contracts/interfaces/ISlasher.sol b/src/contracts/interfaces/ISlasher.sol index f2b4952be..1cd77b996 100644 --- a/src/contracts/interfaces/ISlasher.sol +++ b/src/contracts/interfaces/ISlasher.sol @@ -55,7 +55,9 @@ interface ISlasher { * @notice Gives the `contractAddress` permission to slash the funds of the caller. * @dev Typically, this function must be called prior to registering for a middleware. */ - function optIntoSlashing(address contractAddress) external; + function optIntoSlashing( + address contractAddress + ) external; /** * @notice Used for 'slashing' a certain operator. @@ -63,13 +65,17 @@ interface ISlasher { * @dev Technically the operator is 'frozen' (hence the name of this function), and then subject to slashing pending a decision by a human-in-the-loop. * @dev The operator must have previously given the caller (which should be a contract) the ability to slash them, through a call to `optIntoSlashing`. */ - function freezeOperator(address toBeFrozen) external; + function freezeOperator( + address toBeFrozen + ) external; /** * @notice Removes the 'frozen' status from each of the `frozenAddresses` * @dev Callable only by the contract owner (i.e. governance). */ - function resetFrozenStatus(address[] calldata frozenAddresses) external; + function resetFrozenStatus( + address[] calldata frozenAddresses + ) external; /** * @notice this function is a called by middlewares during an operator's registration to make sure the operator's stake at registration @@ -121,7 +127,9 @@ interface ISlasher { * @return Returns 'true' if `staker` themselves has their status set to frozen, OR if the staker is delegated * to an operator who has their status set to frozen. Otherwise returns 'false'. */ - function isFrozen(address staker) external view returns (bool); + function isFrozen( + address staker + ) external view returns (bool); /// @notice Returns true if `slashingContract` is currently allowed to slash `toBeSlashed`. function canSlash(address toBeSlashed, address slashingContract) external view returns (bool); @@ -171,7 +179,9 @@ interface ISlasher { ) external view returns (MiddlewareTimes memory); /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator].length` - function middlewareTimesLength(address operator) external view returns (uint256); + function middlewareTimesLength( + address operator + ) external view returns (uint256); /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].stalestUpdateBlock`. function getMiddlewareTimesIndexStalestUpdateBlock(address operator, uint32 index) external view returns (uint32); @@ -180,7 +190,9 @@ interface ISlasher { function getMiddlewareTimesIndexServeUntilBlock(address operator, uint32 index) external view returns (uint32); /// @notice Getter function for fetching `_operatorToWhitelistedContractsByUpdate[operator].size`. - function operatorWhitelistedContractsLinkedListSize(address operator) external view returns (uint256); + function operatorWhitelistedContractsLinkedListSize( + address operator + ) external view returns (uint256); /// @notice Getter function for fetching a single node in the operator's linked list (`_operatorToWhitelistedContractsByUpdate[operator]`). function operatorWhitelistedContractsLinkedListEntry( diff --git a/src/contracts/interfaces/ISocketUpdater.sol b/src/contracts/interfaces/ISocketUpdater.sol index df95d4ab0..2a4f2e651 100644 --- a/src/contracts/interfaces/ISocketUpdater.sol +++ b/src/contracts/interfaces/ISocketUpdater.sol @@ -16,5 +16,7 @@ interface ISocketUpdater { * @notice Updates the socket of the msg.sender given they are a registered operator * @param socket is the new socket of the operator */ - function updateSocket(string memory socket) external; + function updateSocket( + string memory socket + ) external; } diff --git a/src/contracts/interfaces/IStrategy.sol b/src/contracts/interfaces/IStrategy.sol index e7a6f684d..afe7e7198 100644 --- a/src/contracts/interfaces/IStrategy.sol +++ b/src/contracts/interfaces/IStrategy.sol @@ -52,7 +52,9 @@ interface IStrategy { * @return The amount of underlying tokens corresponding to the input `amountShares` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function sharesToUnderlying(uint256 amountShares) external returns (uint256); + function sharesToUnderlying( + uint256 amountShares + ) external returns (uint256); /** * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. @@ -61,19 +63,25 @@ interface IStrategy { * @return The amount of underlying tokens corresponding to the input `amountShares` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function underlyingToShares(uint256 amountUnderlying) external returns (uint256); + function underlyingToShares( + uint256 amountUnderlying + ) external returns (uint256); /** * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in * this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications */ - function userUnderlying(address user) external returns (uint256); + function userUnderlying( + address user + ) external returns (uint256); /** * @notice convenience function for fetching the current total shares of `user` in this strategy, by * querying the `strategyManager` contract */ - function shares(address user) external view returns (uint256); + function shares( + address user + ) external view returns (uint256); /** * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy. @@ -82,7 +90,9 @@ interface IStrategy { * @return The amount of shares corresponding to the input `amountUnderlying` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function sharesToUnderlyingView(uint256 amountShares) external view returns (uint256); + function sharesToUnderlyingView( + uint256 amountShares + ) external view returns (uint256); /** * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. @@ -91,13 +101,17 @@ interface IStrategy { * @return The amount of shares corresponding to the input `amountUnderlying` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function underlyingToSharesView(uint256 amountUnderlying) external view returns (uint256); + function underlyingToSharesView( + uint256 amountUnderlying + ) external view returns (uint256); /** * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in * this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications */ - function userUnderlyingView(address user) external view returns (uint256); + function userUnderlyingView( + address user + ) external view returns (uint256); /// @notice The underlying token for shares in this Strategy function underlyingToken() external view returns (IERC20); diff --git a/src/contracts/interfaces/IStrategyFactory.sol b/src/contracts/interfaces/IStrategyFactory.sol index 85dab8cd0..de2713ea5 100644 --- a/src/contracts/interfaces/IStrategyFactory.sol +++ b/src/contracts/interfaces/IStrategyFactory.sol @@ -24,7 +24,9 @@ interface IStrategyFactory { /// though deployNewStrategy does whitelist by default. /// These strategies MIGHT not be the only strategy for the underlying token /// as additional strategies can be whitelisted by the owner of the factory. - function deployedStrategies(IERC20 token) external view returns (IStrategy); + function deployedStrategies( + IERC20 token + ) external view returns (IStrategy); /** * @notice Deploy a new strategyBeacon contract for the ERC20 token. @@ -33,7 +35,9 @@ interface IStrategyFactory { * $dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens * like those that conform to ERC777. */ - function deployNewStrategy(IERC20 token) external returns (IStrategy newStrategy); + function deployNewStrategy( + IERC20 token + ) external returns (IStrategy newStrategy); /** * @notice Owner-only function to pass through a call to `StrategyManager.addStrategiesToDepositWhitelist` @@ -51,7 +55,9 @@ interface IStrategyFactory { /** * @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` */ - function removeStrategiesFromWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external; + function removeStrategiesFromWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external; /// @notice Emitted when the `strategyBeacon` is changed event StrategyBeaconModified(IBeacon previousBeacon, IBeacon newBeacon); diff --git a/src/contracts/interfaces/IStrategyManager.sol b/src/contracts/interfaces/IStrategyManager.sol index 784bb1c46..8aaafc34b 100644 --- a/src/contracts/interfaces/IStrategyManager.sol +++ b/src/contracts/interfaces/IStrategyManager.sol @@ -95,10 +95,14 @@ interface IStrategyManager { * @param staker The staker of interest, whose deposits this function will fetch * @return (staker's strategies, shares in these strategies) */ - function getDeposits(address staker) external view returns (IStrategy[] memory, uint256[] memory); + function getDeposits( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory); /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. - function stakerStrategyListLength(address staker) external view returns (uint256); + function stakerStrategyListLength( + address staker + ) external view returns (uint256); /** * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into @@ -114,7 +118,9 @@ interface IStrategyManager { * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) */ - function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external; + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external; /** * If true for a strategy, a user cannot depositIntoStrategyWithSignature into that strategy for another staker @@ -138,19 +144,25 @@ interface IStrategyManager { function strategyWhitelister() external view returns (address); /// @notice Returns bool for whether or not `strategy` is whitelisted for deposit - function strategyIsWhitelistedForDeposit(IStrategy strategy) external view returns (bool); + function strategyIsWhitelistedForDeposit( + IStrategy strategy + ) external view returns (bool); /** * @notice Owner-only function to change the `strategyWhitelister` address. * @param newStrategyWhitelister new address for the `strategyWhitelister`. */ - function setStrategyWhitelister(address newStrategyWhitelister) external; + function setStrategyWhitelister( + address newStrategyWhitelister + ) external; /** * @notice Returns bool for whether or not `strategy` enables credit transfers. i.e enabling * depositIntoStrategyWithSignature calls or queueing withdrawals to a different address than the staker. */ - function thirdPartyTransfersForbidden(IStrategy strategy) external view returns (bool); + function thirdPartyTransfersForbidden( + IStrategy strategy + ) external view returns (bool); /** * @notice Getter function for the current EIP-712 domain separator for this contract. diff --git a/src/contracts/interfaces/IWhitelister.sol b/src/contracts/interfaces/IWhitelister.sol index da68992c8..1afdce118 100644 --- a/src/contracts/interfaces/IWhitelister.sol +++ b/src/contracts/interfaces/IWhitelister.sol @@ -11,9 +11,13 @@ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Create2.sol"; interface IWhitelister { - function whitelist(address operator) external; + function whitelist( + address operator + ) external; - function getStaker(address operator) external returns (address); + function getStaker( + address operator + ) external returns (address); function depositIntoStrategy( address staker, diff --git a/src/contracts/libraries/BeaconChainProofs.sol b/src/contracts/libraries/BeaconChainProofs.sol index 9d0caa8d9..41f023f0a 100644 --- a/src/contracts/libraries/BeaconChainProofs.sol +++ b/src/contracts/libraries/BeaconChainProofs.sol @@ -274,32 +274,44 @@ library BeaconChainProofs { /// (See https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator) /// @dev Retrieves a validator's pubkey hash - function getPubkeyHash(bytes32[] memory validatorFields) internal pure returns (bytes32) { + function getPubkeyHash( + bytes32[] memory validatorFields + ) internal pure returns (bytes32) { return validatorFields[VALIDATOR_PUBKEY_INDEX]; } /// @dev Retrieves a validator's withdrawal credentials - function getWithdrawalCredentials(bytes32[] memory validatorFields) internal pure returns (bytes32) { + function getWithdrawalCredentials( + bytes32[] memory validatorFields + ) internal pure returns (bytes32) { return validatorFields[VALIDATOR_WITHDRAWAL_CREDENTIALS_INDEX]; } /// @dev Retrieves a validator's effective balance (in gwei) - function getEffectiveBalanceGwei(bytes32[] memory validatorFields) internal pure returns (uint64) { + function getEffectiveBalanceGwei( + bytes32[] memory validatorFields + ) internal pure returns (uint64) { return Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_BALANCE_INDEX]); } /// @dev Retrieves a validator's activation epoch - function getActivationEpoch(bytes32[] memory validatorFields) internal pure returns (uint64) { + function getActivationEpoch( + bytes32[] memory validatorFields + ) internal pure returns (uint64) { return Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_ACTIVATION_EPOCH_INDEX]); } /// @dev Retrieves true IFF a validator is marked slashed - function isValidatorSlashed(bytes32[] memory validatorFields) internal pure returns (bool) { + function isValidatorSlashed( + bytes32[] memory validatorFields + ) internal pure returns (bool) { return validatorFields[VALIDATOR_SLASHED_INDEX] != 0; } /// @dev Retrieves a validator's exit epoch - function getExitEpoch(bytes32[] memory validatorFields) internal pure returns (uint64) { + function getExitEpoch( + bytes32[] memory validatorFields + ) internal pure returns (uint64) { return Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_EXIT_EPOCH_INDEX]); } } diff --git a/src/contracts/libraries/Endian.sol b/src/contracts/libraries/Endian.sol index f9799bb9e..56233cda2 100644 --- a/src/contracts/libraries/Endian.sol +++ b/src/contracts/libraries/Endian.sol @@ -9,7 +9,9 @@ library Endian { * @dev Note that the input is formatted as a 'bytes32' type (i.e. 256 bits), but it is immediately truncated to a uint64 (i.e. 64 bits) * through a right-shift/shr operation. */ - function fromLittleEndianUint64(bytes32 lenum) internal pure returns (uint64 n) { + function fromLittleEndianUint64( + bytes32 lenum + ) internal pure returns (uint64 n) { // the number needs to be stored in little-endian encoding (ie in bytes 0-8) n = uint64(uint256(lenum >> 192)); // forgefmt: disable-next-item diff --git a/src/contracts/libraries/Merkle.sol b/src/contracts/libraries/Merkle.sol index 5b7635423..ff0bce080 100644 --- a/src/contracts/libraries/Merkle.sol +++ b/src/contracts/libraries/Merkle.sol @@ -140,7 +140,9 @@ library Merkle { * @return The computed Merkle root of the tree. * @dev A pre-condition to this function is that leaves.length is a power of two. If not, the function will merkleize the inputs incorrectly. */ - function merkleizeSha256(bytes32[] memory leaves) internal pure returns (bytes32) { + function merkleizeSha256( + bytes32[] memory leaves + ) internal pure returns (bytes32) { //there are half as many nodes in the layer above the leaves uint256 numNodesInLayer = leaves.length / 2; //create a layer to store the internal nodes diff --git a/src/contracts/libraries/StructuredLinkedList.sol b/src/contracts/libraries/StructuredLinkedList.sol index 29410656f..eaa36e393 100644 --- a/src/contracts/libraries/StructuredLinkedList.sol +++ b/src/contracts/libraries/StructuredLinkedList.sol @@ -25,7 +25,9 @@ library StructuredLinkedList { * @param self stored linked list from contract * @return bool true if list exists, false otherwise */ - function listExists(List storage self) internal view returns (bool) { + function listExists( + List storage self + ) internal view returns (bool) { // if the head nodes previous or next pointers both point to itself, then there are no items in the list if (self.list[_HEAD][_PREV] != _HEAD || self.list[_HEAD][_NEXT] != _HEAD) { return true; @@ -57,7 +59,9 @@ library StructuredLinkedList { * @param self stored linked list from contract * @return uint256 */ - function sizeOf(List storage self) internal view returns (uint256) { + function sizeOf( + List storage self + ) internal view returns (uint256) { return self.size; } @@ -66,7 +70,9 @@ library StructuredLinkedList { * @param self stored linked list from contract * @return uint256 the head of the list */ - function getHead(List storage self) internal view returns (uint256) { + function getHead( + List storage self + ) internal view returns (uint256) { return self.list[_HEAD][_NEXT]; } @@ -186,7 +192,9 @@ library StructuredLinkedList { * @param self stored linked list from contract * @return uint256 the removed node */ - function popFront(List storage self) internal returns (uint256) { + function popFront( + List storage self + ) internal returns (uint256) { return _pop(self, _NEXT); } @@ -195,7 +203,9 @@ library StructuredLinkedList { * @param self stored linked list from contract * @return uint256 the removed node */ - function popBack(List storage self) internal returns (uint256) { + function popBack( + List storage self + ) internal returns (uint256) { return _pop(self, _PREV); } diff --git a/src/contracts/permissions/Pausable.sol b/src/contracts/permissions/Pausable.sol index 52883e888..a3b20a745 100644 --- a/src/contracts/permissions/Pausable.sol +++ b/src/contracts/permissions/Pausable.sol @@ -48,7 +48,9 @@ contract Pausable is IPausable { } /// @notice Throws if the `indexed`th bit of `_paused` is 1, i.e. if the `index`th pause switch is flipped. - modifier onlyWhenNotPaused(uint8 index) { + modifier onlyWhenNotPaused( + uint8 index + ) { require(!paused(index), "Pausable: index is paused"); _; } @@ -70,7 +72,9 @@ contract Pausable is IPausable { * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. * @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0. */ - function pause(uint256 newPausedStatus) external onlyPauser { + function pause( + uint256 newPausedStatus + ) external onlyPauser { // verify that the `newPausedStatus` does not *unflip* any bits (i.e. doesn't unpause anything, all 1 bits remain) require((_paused & newPausedStatus) == _paused, "Pausable.pause: invalid attempt to unpause functionality"); _paused = newPausedStatus; @@ -91,7 +95,9 @@ contract Pausable is IPausable { * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. * @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1. */ - function unpause(uint256 newPausedStatus) external onlyUnpauser { + function unpause( + uint256 newPausedStatus + ) external onlyUnpauser { // verify that the `newPausedStatus` does not *flip* any bits (i.e. doesn't pause anything, all 0 bits remain) require( ((~_paused) & (~newPausedStatus)) == (~_paused), "Pausable.unpause: invalid attempt to pause functionality" @@ -106,18 +112,24 @@ contract Pausable is IPausable { } /// @notice Returns 'true' if the `indexed`th bit of `_paused` is 1, and 'false' otherwise - function paused(uint8 index) public view virtual returns (bool) { + function paused( + uint8 index + ) public view virtual returns (bool) { uint256 mask = 1 << index; return ((_paused & mask) == mask); } /// @notice Allows the unpauser to set a new pauser registry - function setPauserRegistry(IPauserRegistry newPauserRegistry) external onlyUnpauser { + function setPauserRegistry( + IPauserRegistry newPauserRegistry + ) external onlyUnpauser { _setPauserRegistry(newPauserRegistry); } /// internal function for setting pauser registry - function _setPauserRegistry(IPauserRegistry newPauserRegistry) internal { + function _setPauserRegistry( + IPauserRegistry newPauserRegistry + ) internal { require( address(newPauserRegistry) != address(0), "Pausable._setPauserRegistry: newPauserRegistry cannot be the zero address" diff --git a/src/contracts/permissions/PauserRegistry.sol b/src/contracts/permissions/PauserRegistry.sol index 1058784ec..4ef0a9b49 100644 --- a/src/contracts/permissions/PauserRegistry.sol +++ b/src/contracts/permissions/PauserRegistry.sol @@ -35,7 +35,9 @@ contract PauserRegistry is IPauserRegistry { } /// @notice Sets new unpauser - only callable by unpauser, as the unpauser is expected to be kept more secure, e.g. being a multisig with a higher threshold - function setUnpauser(address newUnpauser) external onlyUnpauser { + function setUnpauser( + address newUnpauser + ) external onlyUnpauser { _setUnpauser(newUnpauser); } @@ -45,7 +47,9 @@ contract PauserRegistry is IPauserRegistry { emit PauserStatusChanged(pauser, canPause); } - function _setUnpauser(address newUnpauser) internal { + function _setUnpauser( + address newUnpauser + ) internal { require(newUnpauser != address(0), "PauserRegistry._setUnpauser: zero address input"); emit UnpauserChanged(unpauser, newUnpauser); unpauser = newUnpauser; diff --git a/src/contracts/pods/EigenPod.sol b/src/contracts/pods/EigenPod.sol index d98ef59f3..ee4ecf9d0 100644 --- a/src/contracts/pods/EigenPod.sol +++ b/src/contracts/pods/EigenPod.sol @@ -85,7 +85,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC * is necessary for enabling pausing all EigenPods at the same time (due to EigenPods being Beacon Proxies). * Modifier throws if the `indexed`th bit of `_paused` in the EigenPodManager is 1, i.e. if the `index`th pause switch is flipped. */ - modifier onlyWhenNotPaused(uint8 index) { + modifier onlyWhenNotPaused( + uint8 index + ) { require( !IPausable(address(eigenPodManager)).paused(index), "EigenPod.onlyWhenNotPaused: index is paused in EigenPodManager" @@ -106,7 +108,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC } /// @notice Used to initialize the pointers to addresses crucial to the pod's functionality. Called on construction by the EigenPodManager. - function initialize(address _podOwner) external initializer { + function initialize( + address _podOwner + ) external initializer { require(_podOwner != address(0), "EigenPod.initialize: podOwner cannot be zero address"); podOwner = _podOwner; } @@ -134,11 +138,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC * @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner * to prevent accidentally starting a checkpoint that will not increase their shares */ - function startCheckpoint(bool revertIfNoBalance) - external - onlyOwnerOrProofSubmitter - onlyWhenNotPaused(PAUSED_START_CHECKPOINT) - { + function startCheckpoint( + bool revertIfNoBalance + ) external onlyOwnerOrProofSubmitter onlyWhenNotPaused(PAUSED_START_CHECKPOINT) { _startCheckpoint(revertIfNoBalance); } @@ -384,7 +386,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC /// only address that can call these methods. /// @param newProofSubmitter The new proof submitter address. If set to 0, only the /// pod owner will be able to call `startCheckpoint` and `verifyWithdrawalCredentials` - function setProofSubmitter(address newProofSubmitter) external onlyEigenPodOwner { + function setProofSubmitter( + address newProofSubmitter + ) external onlyEigenPodOwner { emit ProofSubmitterUpdated(proofSubmitter, newProofSubmitter); proofSubmitter = newProofSubmitter; } @@ -593,7 +597,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC * @param revertIfNoBalance If the available ETH balance for checkpointing is 0 and this is * true, this method will revert */ - function _startCheckpoint(bool revertIfNoBalance) internal { + function _startCheckpoint( + bool revertIfNoBalance + ) internal { require( currentCheckpointTimestamp == 0, "EigenPod._startCheckpoint: must finish previous checkpoint before starting another" @@ -651,7 +657,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC * - `lastCheckpointTimestamp` is updated * - `_currentCheckpoint` and `currentCheckpointTimestamp` are deleted */ - function _updateCheckpoint(Checkpoint memory checkpoint) internal { + function _updateCheckpoint( + Checkpoint memory checkpoint + ) internal { if (checkpoint.proofsRemaining == 0) { int256 totalShareDeltaWei = (int128(uint128(checkpoint.podBalanceGwei)) + checkpoint.balanceDeltasGwei) * int256(GWEI_TO_WEI); @@ -678,7 +686,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC } ///@notice Calculates the pubkey hash of a validator's pubkey as per SSZ spec - function _calculateValidatorPubkeyHash(bytes memory validatorPubkey) internal pure returns (bytes32) { + function _calculateValidatorPubkeyHash( + bytes memory validatorPubkey + ) internal pure returns (bytes32) { require(validatorPubkey.length == 48, "EigenPod._calculateValidatorPubkeyHash must be a 48-byte BLS public key"); return sha256(abi.encodePacked(validatorPubkey, bytes16(0))); } @@ -695,21 +705,29 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC */ /// @notice Returns the validatorInfo for a given validatorPubkeyHash - function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external view returns (ValidatorInfo memory) { + function validatorPubkeyHashToInfo( + bytes32 validatorPubkeyHash + ) external view returns (ValidatorInfo memory) { return _validatorPubkeyHashToInfo[validatorPubkeyHash]; } /// @notice Returns the validatorInfo for a given validatorPubkey - function validatorPubkeyToInfo(bytes calldata validatorPubkey) external view returns (ValidatorInfo memory) { + function validatorPubkeyToInfo( + bytes calldata validatorPubkey + ) external view returns (ValidatorInfo memory) { return _validatorPubkeyHashToInfo[_calculateValidatorPubkeyHash(validatorPubkey)]; } - function validatorStatus(bytes32 pubkeyHash) external view returns (VALIDATOR_STATUS) { + function validatorStatus( + bytes32 pubkeyHash + ) external view returns (VALIDATOR_STATUS) { return _validatorPubkeyHashToInfo[pubkeyHash].status; } /// @notice Returns the validator status for a given validatorPubkey - function validatorStatus(bytes calldata validatorPubkey) external view returns (VALIDATOR_STATUS) { + function validatorStatus( + bytes calldata validatorPubkey + ) external view returns (VALIDATOR_STATUS) { bytes32 validatorPubkeyHash = _calculateValidatorPubkeyHash(validatorPubkey); return _validatorPubkeyHashToInfo[validatorPubkeyHash].status; } @@ -723,7 +741,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC /// @param timestamp of the block for which the parent block root will be returned. MUST correspond /// to an existing slot within the last 24 hours. If the slot at `timestamp` was skipped, this method /// will revert. - function getParentBlockRoot(uint64 timestamp) public view returns (bytes32) { + function getParentBlockRoot( + uint64 timestamp + ) public view returns (bytes32) { require( block.timestamp - timestamp < BEACON_ROOTS_HISTORY_BUFFER_LENGTH * 12, "EigenPod.getParentBlockRoot: timestamp out of range" diff --git a/src/contracts/pods/EigenPodManager.sol b/src/contracts/pods/EigenPodManager.sol index 300f36de0..d5f18ee8c 100644 --- a/src/contracts/pods/EigenPodManager.sol +++ b/src/contracts/pods/EigenPodManager.sol @@ -28,7 +28,9 @@ contract EigenPodManager is EigenPodManagerStorage, ReentrancyGuardUpgradeable { - modifier onlyEigenPod(address podOwner) { + modifier onlyEigenPod( + address podOwner + ) { require(address(ownerToPod[podOwner]) == msg.sender, "EigenPodManager.onlyEigenPod: not a pod"); _; } @@ -279,7 +281,9 @@ contract EigenPodManager is // VIEW FUNCTIONS /// @notice Returns the address of the `podOwner`'s EigenPod (whether it is deployed yet or not). - function getPod(address podOwner) public view returns (IEigenPod) { + function getPod( + address podOwner + ) public view returns (IEigenPod) { IEigenPod pod = ownerToPod[podOwner]; // if pod does not exist already, calculate what its address *will be* once it is deployed if (address(pod) == address(0)) { @@ -294,7 +298,9 @@ contract EigenPodManager is } /// @notice Returns 'true' if the `podOwner` has created an EigenPod, and 'false' otherwise. - function hasPod(address podOwner) public view returns (bool) { + function hasPod( + address podOwner + ) public view returns (bool) { return address(ownerToPod[podOwner]) != address(0); } } diff --git a/src/contracts/strategies/EigenStrategy.sol b/src/contracts/strategies/EigenStrategy.sol index aa5204dcb..e99957321 100644 --- a/src/contracts/strategies/EigenStrategy.sol +++ b/src/contracts/strategies/EigenStrategy.sol @@ -35,7 +35,9 @@ contract EigenStrategy is StrategyBase { IEigen public EIGEN; /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. - constructor(IStrategyManager _strategyManager) StrategyBase(_strategyManager) {} + constructor( + IStrategyManager _strategyManager + ) StrategyBase(_strategyManager) {} function initialize(IEigen _EIGEN, IERC20 _bEIGEN, IPauserRegistry _pauserRegistry) public virtual initializer { EIGEN = _EIGEN; diff --git a/src/contracts/strategies/StrategyBase.sol b/src/contracts/strategies/StrategyBase.sol index a4fab630a..2dc0ff713 100644 --- a/src/contracts/strategies/StrategyBase.sol +++ b/src/contracts/strategies/StrategyBase.sol @@ -69,7 +69,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { } /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. - constructor(IStrategyManager _strategyManager) { + constructor( + IStrategyManager _strategyManager + ) { strategyManager = _strategyManager; _disableInitializers(); } @@ -225,7 +227,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @return The amount of underlying tokens corresponding to the input `amountShares` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function sharesToUnderlyingView(uint256 amountShares) public view virtual override returns (uint256) { + function sharesToUnderlyingView( + uint256 amountShares + ) public view virtual override returns (uint256) { // account for virtual shares and balance uint256 virtualTotalShares = totalShares + SHARES_OFFSET; uint256 virtualTokenBalance = _tokenBalance() + BALANCE_OFFSET; @@ -240,7 +244,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @return The amount of underlying tokens corresponding to the input `amountShares` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function sharesToUnderlying(uint256 amountShares) public view virtual override returns (uint256) { + function sharesToUnderlying( + uint256 amountShares + ) public view virtual override returns (uint256) { return sharesToUnderlyingView(amountShares); } @@ -251,7 +257,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @return The amount of shares corresponding to the input `amountUnderlying` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function underlyingToSharesView(uint256 amountUnderlying) public view virtual returns (uint256) { + function underlyingToSharesView( + uint256 amountUnderlying + ) public view virtual returns (uint256) { // account for virtual shares and balance uint256 virtualTotalShares = totalShares + SHARES_OFFSET; uint256 virtualTokenBalance = _tokenBalance() + BALANCE_OFFSET; @@ -266,7 +274,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @return The amount of shares corresponding to the input `amountUnderlying` * @dev Implementation for these functions in particular may vary significantly for different strategies */ - function underlyingToShares(uint256 amountUnderlying) external view virtual returns (uint256) { + function underlyingToShares( + uint256 amountUnderlying + ) external view virtual returns (uint256) { return underlyingToSharesView(amountUnderlying); } @@ -274,7 +284,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in * this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications */ - function userUnderlyingView(address user) external view virtual returns (uint256) { + function userUnderlyingView( + address user + ) external view virtual returns (uint256) { return sharesToUnderlyingView(shares(user)); } @@ -282,7 +294,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in * this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications */ - function userUnderlying(address user) external virtual returns (uint256) { + function userUnderlying( + address user + ) external virtual returns (uint256) { return sharesToUnderlying(shares(user)); } @@ -290,7 +304,9 @@ contract StrategyBase is Initializable, Pausable, IStrategy { * @notice convenience function for fetching the current total shares of `user` in this strategy, by * querying the `strategyManager` contract */ - function shares(address user) public view virtual returns (uint256) { + function shares( + address user + ) public view virtual returns (uint256) { return strategyManager.stakerStrategyShares(user, IStrategy(address(this))); } diff --git a/src/contracts/strategies/StrategyBaseTVLLimits.sol b/src/contracts/strategies/StrategyBaseTVLLimits.sol index 63b76ff45..29ce345ce 100644 --- a/src/contracts/strategies/StrategyBaseTVLLimits.sol +++ b/src/contracts/strategies/StrategyBaseTVLLimits.sol @@ -24,7 +24,9 @@ contract StrategyBaseTVLLimits is StrategyBase { event MaxTotalDepositsUpdated(uint256 previousValue, uint256 newValue); // solhint-disable-next-line no-empty-blocks - constructor(IStrategyManager _strategyManager) StrategyBase(_strategyManager) {} + constructor( + IStrategyManager _strategyManager + ) StrategyBase(_strategyManager) {} function initialize( uint256 _maxPerDeposit, diff --git a/src/contracts/strategies/StrategyFactory.sol b/src/contracts/strategies/StrategyFactory.sol index 7e9a468fb..155342d17 100644 --- a/src/contracts/strategies/StrategyFactory.sol +++ b/src/contracts/strategies/StrategyFactory.sol @@ -21,7 +21,9 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable IStrategyManager public immutable strategyManager; /// @notice Since this contract is designed to be initializable, the constructor simply sets the immutable variables. - constructor(IStrategyManager _strategyManager) { + constructor( + IStrategyManager _strategyManager + ) { strategyManager = _strategyManager; _disableInitializers(); } @@ -43,11 +45,9 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable * $dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens * like those that conform to ERC777. */ - function deployNewStrategy(IERC20 token) - external - onlyWhenNotPaused(PAUSED_NEW_STRATEGIES) - returns (IStrategy newStrategy) - { + function deployNewStrategy( + IERC20 token + ) external onlyWhenNotPaused(PAUSED_NEW_STRATEGIES) returns (IStrategy newStrategy) { require(!isBlacklisted[token], "StrategyFactory.deployNewStrategy: Token is blacklisted"); require( deployedStrategies[token] == IStrategy(address(0)), @@ -74,7 +74,9 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable * @notice Owner-only function to prevent strategies from being created for given tokens. * @param tokens An array of token addresses to blacklist. */ - function blacklistTokens(IERC20[] calldata tokens) external onlyOwner { + function blacklistTokens( + IERC20[] calldata tokens + ) external onlyOwner { IStrategy[] memory strategiesToRemove = new IStrategy[](tokens.length); uint256 removeIdx = 0; @@ -123,7 +125,9 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable /** * @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` */ - function removeStrategiesFromWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external onlyOwner { + function removeStrategiesFromWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external onlyOwner { strategyManager.removeStrategiesFromDepositWhitelist(strategiesToRemoveFromWhitelist); } @@ -132,7 +136,9 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable emit StrategySetForToken(token, strategy); } - function _setStrategyBeacon(IBeacon _strategyBeacon) internal { + function _setStrategyBeacon( + IBeacon _strategyBeacon + ) internal { emit StrategyBeaconModified(strategyBeacon, _strategyBeacon); strategyBeacon = _strategyBeacon; } diff --git a/src/contracts/token/BackingEigen.sol b/src/contracts/token/BackingEigen.sol index c8a97160d..87f5a93da 100644 --- a/src/contracts/token/BackingEigen.sol +++ b/src/contracts/token/BackingEigen.sol @@ -31,7 +31,9 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { // @notice event emitted when the `isMinter` mapping is modified event IsMinterModified(address indexed minterAddress, bool newStatus); - constructor(IERC20 _EIGEN) { + constructor( + IERC20 _EIGEN + ) { EIGEN = _EIGEN; _disableInitializers(); } @@ -56,14 +58,18 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { * * See {ERC20-_burn}. */ - function burn(uint256 amount) public virtual { + function burn( + uint256 amount + ) public virtual { _burn(_msgSender(), amount); } /** * @notice An initializer function that sets initial values for the contract's state variables. */ - function initialize(address initialOwner) public initializer { + function initialize( + address initialOwner + ) public initializer { __Ownable_init(); __ERC20_init("Backing Eigen", "bEIGEN"); _transferOwnership(initialOwner); @@ -79,7 +85,7 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { // Mint the entire supply of EIGEN - this is a one-time event that // ensures bEIGEN fully backs EIGEN. - _mint(address(EIGEN), 1673646668284660000000000000); + _mint(address(EIGEN), 1_673_646_668_284_660_000_000_000_000); emit Backed(); } diff --git a/src/contracts/token/Eigen.sol b/src/contracts/token/Eigen.sol index fcd15cf15..16ca43530 100644 --- a/src/contracts/token/Eigen.sol +++ b/src/contracts/token/Eigen.sol @@ -32,7 +32,9 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable { /// @notice event emitted when the transfer restrictions disabled event TransferRestrictionsDisabled(); - constructor(IERC20 _bEIGEN) { + constructor( + IERC20 _bEIGEN + ) { bEIGEN = _bEIGEN; _disableInitializers(); } @@ -121,7 +123,9 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable { /** * @notice This function allows bEIGEN holders to wrap their tokens into Eigen */ - function wrap(uint256 amount) external { + function wrap( + uint256 amount + ) external { require(bEIGEN.transferFrom(msg.sender, address(this), amount), "Eigen.wrap: bEIGEN transfer failed"); _mint(msg.sender, amount); } @@ -129,7 +133,9 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable { /** * @notice This function allows Eigen holders to unwrap their tokens into bEIGEN */ - function unwrap(uint256 amount) external { + function unwrap( + uint256 amount + ) external { _burn(msg.sender, amount); require(bEIGEN.transfer(msg.sender, amount), "Eigen.unwrap: bEIGEN transfer failed"); } diff --git a/src/test/Delegation.t.sol b/src/test/Delegation.t.sol index 3138039cd..6a67af8c1 100644 --- a/src/test/Delegation.t.sol +++ b/src/test/Delegation.t.sol @@ -32,7 +32,9 @@ contract DelegationTests is EigenLayerTestHelper { /// @notice testing if an operator can delegate to themselves. /// @param sender is the address of the operator. - function testSelfOperatorDelegate(address sender) public { + function testSelfOperatorDelegate( + address sender + ) public { cheats.assume(sender != address(0)); cheats.assume(sender != address(eigenLayerProxyAdmin)); IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ @@ -102,7 +104,8 @@ contract DelegationTests is EigenLayerTestHelper { _testDelegateToOperator(staker, operator); assertTrue(delegation.isDelegated(staker) == true, "testDelegation: staker is not delegate"); - (/*IStrategy[] memory updatedStrategies*/, uint256[] memory updatedShares) = strategyManager.getDeposits(staker); + ( /*IStrategy[] memory updatedStrategies*/ , uint256[] memory updatedShares) = + strategyManager.getDeposits(staker); { IStrategy _strat = wethStrat; @@ -141,7 +144,7 @@ contract DelegationTests is EigenLayerTestHelper { uint256[] memory strategyIndexes = new uint256[](strategyArray.length); // withdraw shares - _testQueueWithdrawal(staker, strategyIndexes, strategyArray, shareAmounts, staker /*withdrawer*/); + _testQueueWithdrawal(staker, strategyIndexes, strategyArray, shareAmounts, staker /*withdrawer*/ ); cheats.startPrank(staker); delegation.undelegate(staker); @@ -162,9 +165,8 @@ contract DelegationTests is EigenLayerTestHelper { uint256 nonceBefore = delegation.stakerNonce(staker); - bytes32 structHash = keccak256( - abi.encode(delegation.STAKER_DELEGATION_TYPEHASH(), staker, operator, nonceBefore, expiry) - ); + bytes32 structHash = + keccak256(abi.encode(delegation.STAKER_DELEGATION_TYPEHASH(), staker, operator, nonceBefore, expiry)); bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", delegation.domainSeparator(), structHash)); bytes memory signature; @@ -176,10 +178,8 @@ contract DelegationTests is EigenLayerTestHelper { if (expiry < block.timestamp) { cheats.expectRevert("DelegationManager.delegateToBySignature: staker signature expired"); } - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: expiry - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: expiry}); delegation.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, bytes32(0)); if (expiry >= block.timestamp) { assertTrue(delegation.isDelegated(staker) == true, "testDelegation: staker is not delegate"); @@ -217,10 +217,8 @@ contract DelegationTests is EigenLayerTestHelper { signature = abi.encodePacked(r, s, v); } - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: type(uint256).max - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: type(uint256).max}); delegation.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, bytes32(0)); assertTrue(delegation.isDelegated(staker) == true, "testDelegation: staker is not delegate"); assertTrue(nonceBefore + 1 == delegation.stakerNonce(staker), "nonce not incremented correctly"); @@ -261,10 +259,8 @@ contract DelegationTests is EigenLayerTestHelper { cheats.expectRevert( bytes("EIP1271SignatureUtils.checkSignature_EIP1271: ERC1271 signature verification failed") ); - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: type(uint256).max - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: type(uint256).max}); delegation.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, bytes32(0)); } @@ -292,10 +288,8 @@ contract DelegationTests is EigenLayerTestHelper { bytes memory signature = abi.encodePacked(r, s, v); cheats.expectRevert(); - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: type(uint256).max - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: type(uint256).max}); delegation.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, bytes32(0)); } @@ -315,10 +309,8 @@ contract DelegationTests is EigenLayerTestHelper { bytes memory signature = abi.encodePacked(r, s, v); cheats.expectRevert(); - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: type(uint256).max - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: type(uint256).max}); delegation.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, bytes32(0)); } @@ -338,7 +330,9 @@ contract DelegationTests is EigenLayerTestHelper { /// @notice This function tests to ensure that a you can't register as a delegate multiple times /// @param operator is the operator being delegated to. - function testRegisterAsOperatorMultipleTimes(address operator) public fuzzedAddress(operator) { + function testRegisterAsOperatorMultipleTimes( + address operator + ) public fuzzedAddress(operator) { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: address(0), @@ -351,7 +345,9 @@ contract DelegationTests is EigenLayerTestHelper { /// @notice This function tests to ensure that a staker cannot delegate to an unregistered operator /// @param delegate is the unregistered operator - function testDelegationToUnregisteredDelegate(address delegate) public fuzzedAddress(delegate) { + function testDelegationToUnregisteredDelegate( + address delegate + ) public fuzzedAddress(delegate) { //deposit into 1 strategy for getOperatorAddress(1), who is delegating to the unregistered operator _testDepositStrategies(getOperatorAddress(1), 1e18, 1); _testDepositEigen(getOperatorAddress(1), 1e18); @@ -365,7 +361,9 @@ contract DelegationTests is EigenLayerTestHelper { /// @notice This function tests to ensure that a delegation contract /// cannot be intitialized multiple times, test with different caller addresses - function testCannotInitMultipleTimesDelegation(address _attacker) public { + function testCannotInitMultipleTimesDelegation( + address _attacker + ) public { cheats.assume(_attacker != address(eigenLayerProxyAdmin)); //delegation has already been initialized in the Deployer test contract vm.prank(_attacker); @@ -452,7 +450,9 @@ contract DelegationTests is EigenLayerTestHelper { assertTrue(delegation.isOperator(_operator)); } - function _testRegisterAdditionalOperator(uint256 index) internal { + function _testRegisterAdditionalOperator( + uint256 index + ) internal { address sender = getOperatorAddress(index); //register as both ETH and EIGEN operator diff --git a/src/test/DelegationFaucet.t.sol b/src/test/DelegationFaucet.t.sol index c611b8669..d306a4d8a 100644 --- a/src/test/DelegationFaucet.t.sol +++ b/src/test/DelegationFaucet.t.sol @@ -189,7 +189,9 @@ contract DelegationFaucetTests is EigenLayerTestHelper { /** * @param _operatorIndex is the index of the operator to use from the test-data/operators.json file */ - function test_mintDepositAndDelegate_RevertsIf_UnregisteredOperator(uint8 _operatorIndex) public { + function test_mintDepositAndDelegate_RevertsIf_UnregisteredOperator( + uint8 _operatorIndex + ) public { cheats.assume(_operatorIndex < 15); address operator = getOperatorAddress(_operatorIndex); // Unregistered operator should revert @@ -266,35 +268,33 @@ contract DelegationFaucetTests is EigenLayerTestHelper { uint256 operatorSharesBefore = delegation.operatorShares(operator, stakeTokenStrat); uint256 stakerSharesBefore = strategyManager.stakerStrategyShares(stakerContract, stakeTokenStrat); - uint256 nonceBefore = delegation.cumulativeWithdrawalsQueued(/*staker*/ stakerContract); + uint256 nonceBefore = delegation.cumulativeWithdrawalsQueued( /*staker*/ stakerContract); // Queue withdrawal ( IDelegationManager.Withdrawal memory queuedWithdrawal, - , /*tokensArray is unused in this test*/ - /*withdrawalRoot is unused in this test*/ + , /*tokensArray is unused in this test*/ /*withdrawalRoot is unused in this test*/ ) = _setUpQueuedWithdrawalStructSingleStrat( - /*staker*/ stakerContract, - /*withdrawer*/ stakerContract, - stakeToken, - stakeTokenStrat, - _withdrawAmount - ); + /*staker*/ + stakerContract, + /*withdrawer*/ + stakerContract, + stakeToken, + stakeTokenStrat, + _withdrawAmount + ); IDelegationManager.QueuedWithdrawalParams[] memory params = new IDelegationManager.QueuedWithdrawalParams[](1); - + params[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: queuedWithdrawal.strategies, shares: queuedWithdrawal.shares, withdrawer: stakerContract }); - delegationFaucet.queueWithdrawal( - stakerContract, - params - ); + delegationFaucet.queueWithdrawal(stakerContract, params); uint256 operatorSharesAfter = delegation.operatorShares(operator, stakeTokenStrat); uint256 stakerSharesAfter = strategyManager.stakerStrategyShares(stakerContract, stakeTokenStrat); - uint256 nonceAfter = delegation.cumulativeWithdrawalsQueued(/*staker*/ stakerContract); + uint256 nonceAfter = delegation.cumulativeWithdrawalsQueued( /*staker*/ stakerContract); assertEq( operatorSharesBefore, @@ -308,9 +308,7 @@ contract DelegationFaucetTests is EigenLayerTestHelper { "test_queueWithdrawal_WithdrawStakeToken: staker shares not updated correctly" ); assertEq( - nonceBefore, - nonceAfter - 1, - "test_queueWithdrawal_WithdrawStakeToken: staker withdrawal nonce not updated" + nonceBefore, nonceAfter - 1, "test_queueWithdrawal_WithdrawStakeToken: staker withdrawal nonce not updated" ); } @@ -354,11 +352,7 @@ contract DelegationFaucetTests is EigenLayerTestHelper { uint256 middlewareTimesIndex = 0; bool receiveAsTokens = false; delegationFaucet.completeQueuedWithdrawal( - stakerContract, - queuedWithdrawal, - tokensArray, - middlewareTimesIndex, - receiveAsTokens + stakerContract, queuedWithdrawal, tokensArray, middlewareTimesIndex, receiveAsTokens ); // assertion after values uint256 sharesAfter = strategyManager.stakerStrategyShares(stakerContract, stakeTokenStrat); @@ -415,11 +409,7 @@ contract DelegationFaucetTests is EigenLayerTestHelper { uint256 middlewareTimesIndex = 0; bool receiveAsTokens = true; delegationFaucet.completeQueuedWithdrawal( - stakerContract, - queuedWithdrawal, - tokensArray, - middlewareTimesIndex, - receiveAsTokens + stakerContract, queuedWithdrawal, tokensArray, middlewareTimesIndex, receiveAsTokens ); // assertion after values uint256 sharesAfter = strategyManager.stakerStrategyShares(stakerContract, stakeTokenStrat); @@ -467,7 +457,9 @@ contract DelegationFaucetTests is EigenLayerTestHelper { ); } - function _registerOperator(address _operator) internal { + function _registerOperator( + address _operator + ) internal { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: _operator, delegationApprover: address(0), diff --git a/src/test/DepositWithdraw.t.sol b/src/test/DepositWithdraw.t.sol index 8e87e245b..4cff32d76 100644 --- a/src/test/DepositWithdraw.t.sol +++ b/src/test/DepositWithdraw.t.sol @@ -12,23 +12,28 @@ contract DepositWithdrawTests is EigenLayerTestHelper { * @notice Verifies that it is possible to deposit WETH * @param amountToDeposit Fuzzed input for amount of WETH to deposit */ - function testWethDeposit(uint256 amountToDeposit) public returns (uint256 amountDeposited) { + function testWethDeposit( + uint256 amountToDeposit + ) public returns (uint256 amountDeposited) { // if first deposit amount to base strategy is too small, it will revert. ignore that case here. cheats.assume(amountToDeposit >= 1); cheats.assume(amountToDeposit <= 1e38 - 1); return _testDepositWeth(getOperatorAddress(0), amountToDeposit); } - /// @notice deploys 'numStratsToAdd' strategies using '_testAddStrategy' and then deposits '1e18' to each of them from 'getOperatorAddress(0)' /// @param numStratsToAdd is the number of strategies being added and deposited into - function testDepositStrategies(uint8 numStratsToAdd) public { + function testDepositStrategies( + uint8 numStratsToAdd + ) public { _testDepositStrategies(getOperatorAddress(0), 1e18, numStratsToAdd); } /// @notice Verifies that it is possible to deposit eigen. /// @param eigenToDeposit is amount of eigen to deposit into the eigen strategy - function testDepositEigen(uint96 eigenToDeposit) public { + function testDepositEigen( + uint96 eigenToDeposit + ) public { // sanity check for inputs; keeps fuzzed tests from failing cheats.assume(eigenToDeposit < eigenTotalSupply); // if first deposit amount to base strategy is too small, it will revert. ignore that case here. @@ -41,12 +46,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { * Verifies that reversion occurs correctly. */ function testDepositUnsupportedToken() public { - IERC20 token = new ERC20PresetFixedSupply( - "badToken", - "BADTOKEN", - 100, - address(this) - ); + IERC20 token = new ERC20PresetFixedSupply("badToken", "BADTOKEN", 100, address(this)); token.approve(address(strategyManager), type(uint256).max); // whitelist the strategy for deposit @@ -65,7 +65,9 @@ contract DepositWithdrawTests is EigenLayerTestHelper { * @notice Tries to deposit into an unsupported strategy by calling `strategyManager.depositIntoStrategy`. * Verifies that reversion occurs correctly. */ - function testDepositNonexistentStrategy(address nonexistentStrategy) public fuzzedAddress(nonexistentStrategy) { + function testDepositNonexistentStrategy( + address nonexistentStrategy + ) public fuzzedAddress(nonexistentStrategy) { // assume that the fuzzed address is not already a contract! uint256 size; assembly { @@ -78,12 +80,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { // harcoded input uint256 testDepositAmount = 10; - IERC20 token = new ERC20PresetFixedSupply( - "badToken", - "BADTOKEN", - 100, - address(this) - ); + IERC20 token = new ERC20PresetFixedSupply("badToken", "BADTOKEN", 100, address(this)); token.approve(address(strategyManager), type(uint256).max); // whitelist the strategy for deposit @@ -112,8 +109,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { strategyManager.depositIntoStrategy(wethStrat, weth, 0); } - - /** + /** * @notice Modified from existing _createQueuedWithdrawal, skips delegation and deposit steps so that we can isolate the withdrawal step * @notice Creates a queued withdrawal from `staker`, queues a withdrawal using * `delegation.queueWithdrawal(strategyIndexes, strategyArray, tokensArray, shareAmounts, withdrawer)` @@ -124,16 +120,14 @@ contract DepositWithdrawTests is EigenLayerTestHelper { */ function _createOnlyQueuedWithdrawal( address staker, - bool /*registerAsOperator*/, + bool, /*registerAsOperator*/ uint256 amountToDeposit, IStrategy[] memory strategyArray, - IERC20[] memory /*tokensArray*/, + IERC20[] memory, /*tokensArray*/ uint256[] memory shareAmounts, - uint256[] memory /*strategyIndexes*/, + uint256[] memory, /*strategyIndexes*/ address withdrawer - ) - internal returns(bytes32 withdrawalRoot, IDelegationManager.Withdrawal memory queuedWithdrawal) - { + ) internal returns (bytes32 withdrawalRoot, IDelegationManager.Withdrawal memory queuedWithdrawal) { require(amountToDeposit >= shareAmounts[0], "_createQueuedWithdrawal: sanity check failed"); queuedWithdrawal = IDelegationManager.Withdrawal({ @@ -146,9 +140,8 @@ contract DepositWithdrawTests is EigenLayerTestHelper { startBlock: uint32(block.number) }); - IDelegationManager.QueuedWithdrawalParams[] memory params = new IDelegationManager.QueuedWithdrawalParams[](1); - + params[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: strategyArray, shares: shareAmounts, @@ -162,18 +155,16 @@ contract DepositWithdrawTests is EigenLayerTestHelper { withdrawalRoots = delegation.queueWithdrawals(params); cheats.stopPrank(); return (withdrawalRoots[0], queuedWithdrawal); - } - - - function testFrontrunFirstDepositor(/*uint256 depositAmount*/) public { + } + function testFrontrunFirstDepositor( /*uint256 depositAmount*/ ) public { //setup addresses address attacker = address(100); address user = address(200); //give 2 ether to attacker and user - weth.transfer(attacker,2 ether); - weth.transfer(user,2 ether); + weth.transfer(attacker, 2 ether); + weth.transfer(user, 2 ether); //attacker FRONTRUN: deposit 1 wei (receive 1 share) StrategyManager _strategyManager = _whitelistStrategy(strategyManager, wethStrat); @@ -185,15 +176,15 @@ contract DepositWithdrawTests is EigenLayerTestHelper { //attacker FRONTRUN: transfer 1 ether into strategy directly to manipulate the value of shares cheats.prank(attacker); - weth.transfer(address(wethStrat),1 ether); + weth.transfer(address(wethStrat), 1 ether); - //user deposits 2 eth into strategy - only gets 1 share due to rounding + //user deposits 2 eth into strategy - only gets 1 share due to rounding cheats.startPrank(user); weth.approve(address(_strategyManager), type(uint256).max); _strategyManager.depositIntoStrategy(wethStrat, weth, 2 ether); cheats.stopPrank(); - //attacker deposited 1 ether and 1 wei - received 1 share + //attacker deposited 1 ether and 1 wei - received 1 share //user deposited 2 ether - received X shares //user has lost 0.5 ether? (, uint256[] memory shares) = _strategyManager.getDeposits(attacker); @@ -202,7 +193,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { (, shares) = _strategyManager.getDeposits(user); uint256 userValueWeth = wethStrat.sharesToUnderlyingView(shares[0]); - require(userValueWeth >= (1900000000000000000), "user has lost more than 0.1 eth from frontrunning"); + require(userValueWeth >= (1_900_000_000_000_000_000), "user has lost more than 0.1 eth from frontrunning"); uint256 attackerLossesWeth = (2 ether + 1 wei) - attackerValueWeth; uint256 userLossesWeth = 2 ether - userValueWeth; @@ -210,7 +201,11 @@ contract DepositWithdrawTests is EigenLayerTestHelper { } // fuzzed amounts user uint96's to be more realistic with amounts - function testFrontrunFirstDepositorFuzzed(uint96 firstDepositAmount, uint96 donationAmount, uint96 secondDepositAmount) public { + function testFrontrunFirstDepositorFuzzed( + uint96 firstDepositAmount, + uint96 donationAmount, + uint96 secondDepositAmount + ) public { // want to only use nonzero amounts or else we'll get reverts cheats.assume(firstDepositAmount != 0 && secondDepositAmount != 0); @@ -249,8 +244,10 @@ contract DepositWithdrawTests is EigenLayerTestHelper { require(attackerLossesWeth + 1 >= userLossesWeth, "griefing attack deals more damage than cost"); } - - function testDepositTokenWithOneWeiFeeOnTransfer(address sender, uint64 amountToDeposit) public fuzzedAddress(sender) { + function testDepositTokenWithOneWeiFeeOnTransfer( + address sender, + uint64 amountToDeposit + ) public fuzzedAddress(sender) { cheats.assume(amountToDeposit != 0); IERC20 underlyingToken; @@ -266,14 +263,14 @@ contract DepositWithdrawTests is EigenLayerTestHelper { underlyingToken.transfer(sender, 1000); IStrategy oneWeiFeeOnTransferTokenStrategy = StrategyBase( - address( - new TransparentUpgradeableProxy( - address(baseStrategyImplementation), - address(eigenLayerProxyAdmin), + address( + new TransparentUpgradeableProxy( + address(baseStrategyImplementation), + address(eigenLayerProxyAdmin), abi.encodeWithSelector(StrategyBase.initialize.selector, underlyingToken, eigenLayerPauserReg) - ) ) - ); + ) + ); // REMAINDER OF CODE ADAPTED FROM `_testDepositToStrategy` // _testDepositToStrategy(sender, amountToDeposit, underlyingToken, oneWeiFeeOnTransferTokenStrategy); @@ -287,7 +284,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { strategyManager.addStrategiesToDepositWhitelist(_strategy, _thirdPartyTransfersForbiddenValues); cheats.stopPrank(); } - + uint256 operatorSharesBefore = strategyManager.stakerStrategyShares(sender, oneWeiFeeOnTransferTokenStrategy); // check the expected output uint256 expectedSharesOut = oneWeiFeeOnTransferTokenStrategy.underlyingToShares(amountToDeposit); @@ -306,17 +303,21 @@ contract DepositWithdrawTests is EigenLayerTestHelper { "_testDepositToStrategy: stakerStrategyList array updated incorrectly" ); } - + // check that the shares out match the expected amount out // the actual transfer in will be lower by 1 wei than expected due to stETH's internal rounding // to account for this we check approximate rather than strict equivalence here { - uint256 actualSharesOut = strategyManager.stakerStrategyShares(sender, oneWeiFeeOnTransferTokenStrategy) - operatorSharesBefore; + uint256 actualSharesOut = + strategyManager.stakerStrategyShares(sender, oneWeiFeeOnTransferTokenStrategy) - operatorSharesBefore; require((actualSharesOut * 1000) / expectedSharesOut > 998, "too few shares"); require((actualSharesOut * 1000) / expectedSharesOut < 1002, "too many shares"); // additional sanity check for deposit not increasing in value - require(oneWeiFeeOnTransferTokenStrategy.sharesToUnderlying(actualSharesOut) <= amountToDeposit, "value cannot have increased"); + require( + oneWeiFeeOnTransferTokenStrategy.sharesToUnderlying(actualSharesOut) <= amountToDeposit, + "value cannot have increased" + ); } cheats.stopPrank(); } @@ -330,8 +331,8 @@ contract DepositWithdrawTests is EigenLayerTestHelper { // shadow-fork mainnet try cheats.createFork("mainnet") returns (uint256 forkId) { cheats.selectFork(forkId); - // If RPC_MAINNET ENV not set, default to this mainnet RPC endpoint - } catch { + // If RPC_MAINNET ENV not set, default to this mainnet RPC endpoint + } catch { cheats.createSelectFork("https://eth.llamarpc.com"); } @@ -357,9 +358,8 @@ contract DepositWithdrawTests is EigenLayerTestHelper { strategyManager = StrategyManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - slasher = Slasher( - address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) - ); + slasher = + Slasher(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); eigenPodManager = EigenPodManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); @@ -373,7 +373,8 @@ contract DepositWithdrawTests is EigenLayerTestHelper { DelegationManager delegationImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); StrategyManager strategyManagerImplementation = new StrategyManager(delegation, eigenPodManager, slasher); Slasher slasherImplementation = new Slasher(strategyManager, delegation); - EigenPodManager eigenPodManagerImplementation = new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegation); + EigenPodManager eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegation); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. eigenLayerProxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(delegation))), @@ -382,7 +383,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { DelegationManager.initialize.selector, eigenLayerReputedMultisig, eigenLayerPauserReg, - 0 /*initialPausedStatus*/, + 0, /*initialPausedStatus*/ minWithdrawalDelayBlocks, initializeStrategiesToSetDelayBlocks, initializeWithdrawalDelayBlocks @@ -396,17 +397,14 @@ contract DepositWithdrawTests is EigenLayerTestHelper { eigenLayerReputedMultisig, eigenLayerReputedMultisig, eigenLayerPauserReg, - 0/*initialPausedStatus*/ + 0 /*initialPausedStatus*/ ) ); eigenLayerProxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation), abi.encodeWithSelector( - Slasher.initialize.selector, - eigenLayerReputedMultisig, - eigenLayerPauserReg, - 0/*initialPausedStatus*/ + Slasher.initialize.selector, eigenLayerReputedMultisig, eigenLayerPauserReg, 0 /*initialPausedStatus*/ ) ); eigenLayerProxyAdmin.upgradeAndCall( @@ -416,7 +414,7 @@ contract DepositWithdrawTests is EigenLayerTestHelper { EigenPodManager.initialize.selector, eigenLayerReputedMultisig, eigenLayerPauserReg, - 0/*initialPausedStatus*/ + 0 /*initialPausedStatus*/ ) ); @@ -432,14 +430,14 @@ contract DepositWithdrawTests is EigenLayerTestHelper { // deploy StrategyBase contract implementation, then create upgradeable proxy that points to implementation and initialize it baseStrategyImplementation = new StrategyBase(strategyManager); IStrategy stethStrategy = StrategyBase( - address( - new TransparentUpgradeableProxy( - address(baseStrategyImplementation), - address(eigenLayerProxyAdmin), + address( + new TransparentUpgradeableProxy( + address(baseStrategyImplementation), + address(eigenLayerProxyAdmin), abi.encodeWithSelector(StrategyBase.initialize.selector, underlyingToken, eigenLayerPauserReg) - ) ) - ); + ) + ); // REMAINDER OF CODE ADAPTED FROM `_testDepositToStrategy` // _testDepositToStrategy(sender, amountToDeposit, underlyingToken, stethStrategy); @@ -467,29 +465,37 @@ contract DepositWithdrawTests is EigenLayerTestHelper { if (operatorSharesBefore == 0) { // check that strategy is appropriately added to dynamic array of all of sender's strategies assertTrue( - strategyManager.stakerStrategyList(address(this), strategyManager.stakerStrategyListLength(address(this)) - 1) - == stethStrategy, + strategyManager.stakerStrategyList( + address(this), strategyManager.stakerStrategyListLength(address(this)) - 1 + ) == stethStrategy, "_testDepositToStrategy: stakerStrategyList array updated incorrectly" ); } - + // check that the shares out match the expected amount out // the actual transfer in will be lower by 1-2 wei than expected due to stETH's internal rounding // to account for this we check approximate rather than strict equivalence here { - uint256 actualSharesOut = strategyManager.stakerStrategyShares(address(this), stethStrategy) - operatorSharesBefore; + uint256 actualSharesOut = + strategyManager.stakerStrategyShares(address(this), stethStrategy) - operatorSharesBefore; require(actualSharesOut >= expectedSharesOut, "too few shares"); require((actualSharesOut * 1000) / expectedSharesOut < 1003, "too many shares"); // additional sanity check for deposit not increasing in value require(stethStrategy.sharesToUnderlying(actualSharesOut) <= amountToDeposit, "value cannot have increased"); // slippage check - require((stethStrategy.sharesToUnderlying(actualSharesOut) * 1e6) / amountToDeposit >= (1e6 - 1), "bad slippage on first deposit"); + require( + (stethStrategy.sharesToUnderlying(actualSharesOut) * 1e6) / amountToDeposit >= (1e6 - 1), + "bad slippage on first deposit" + ); } cheats.stopPrank(); } - function _whitelistStrategy(StrategyManager _strategyManager, StrategyBase _strategyBase) internal returns(StrategyManager) { + function _whitelistStrategy( + StrategyManager _strategyManager, + StrategyBase _strategyBase + ) internal returns (StrategyManager) { // whitelist the strategy for deposit cheats.startPrank(strategyManager.strategyWhitelister()); IStrategy[] memory _strategy = new IStrategy[](1); diff --git a/src/test/EigenLayerDeployer.t.sol b/src/test/EigenLayerDeployer.t.sol index 0f4888fc5..571ee9c5d 100644 --- a/src/test/EigenLayerDeployer.t.sol +++ b/src/test/EigenLayerDeployer.t.sol @@ -61,21 +61,21 @@ contract EigenLayerDeployer is Operators { //strategy indexes for undelegation (see commitUndelegation function) uint256[] public strategyIndexes; address[2] public stakers; - address sample_registrant = cheats.addr(436364636); + address sample_registrant = cheats.addr(436_364_636); address[] public slashingContracts; uint256 wethInitialSupply = 10e50; uint256 public constant eigenTotalSupply = 1000e18; uint256 nonce = 69; - uint256 public gasLimit = 750000; + uint256 public gasLimit = 750_000; IStrategy[] public initializeStrategiesToSetDelayBlocks; uint256[] public initializeWithdrawalDelayBlocks; uint256 minWithdrawalDelayBlocks = 0; uint32 PARTIAL_WITHDRAWAL_FRAUD_PROOF_PERIOD_BLOCKS = 7 days / 12 seconds; uint256 REQUIRED_BALANCE_WEI = 32 ether; uint64 MAX_PARTIAL_WTIHDRAWAL_AMOUNT_GWEI = 1 ether / 1e9; - uint64 GOERLI_GENESIS_TIME = 1616508000; + uint64 GOERLI_GENESIS_TIME = 1_616_508_000; address pauser; address unpauser; @@ -98,12 +98,13 @@ contract EigenLayerDeployer is Operators { address operationsMultisig; address executorMultisig; - // addresses excluded from fuzzing due to abnormal behavior. TODO: @Sidu28 define this better and give it a clearer name mapping(address => bool) fuzzedAddressMapping; //ensures that a passed in address is not set to true in the fuzzedAddressMapping - modifier fuzzedAddress(address addr) virtual { + modifier fuzzedAddress( + address addr + ) virtual { cheats.assume(fuzzedAddressMapping[addr] == false); _; } @@ -116,7 +117,7 @@ contract EigenLayerDeployer is Operators { //performs basic deployment before each test function setUp() public virtual { try vm.envUint("CHAIN_ID") returns (uint256 chainId) { - if (chainId == 31337) { + if (chainId == 31_337) { _deployEigenLayerContractsLocal(); } // If CHAIN_ID ENV is not set, assume local deployment on 31337 @@ -154,18 +155,13 @@ contract EigenLayerDeployer is Operators { strategyManager = StrategyManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - slasher = Slasher( - address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) - ); + slasher = + Slasher(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); eigenPodManager = EigenPodManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); ethPOSDeposit = new ETHPOSDepositMock(); - pod = new EigenPod( - ethPOSDeposit, - eigenPodManager, - GOERLI_GENESIS_TIME - ); + pod = new EigenPod(ethPOSDeposit, eigenPodManager, GOERLI_GENESIS_TIME); eigenPodBeacon = new UpgradeableBeacon(address(pod)); @@ -173,13 +169,8 @@ contract EigenLayerDeployer is Operators { DelegationManager delegationImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); StrategyManager strategyManagerImplementation = new StrategyManager(delegation, eigenPodManager, slasher); Slasher slasherImplementation = new Slasher(strategyManager, delegation); - EigenPodManager eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegation - ); + EigenPodManager eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegation); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. eigenLayerProxyAdmin.upgradeAndCall( @@ -189,7 +180,7 @@ contract EigenLayerDeployer is Operators { DelegationManager.initialize.selector, eigenLayerReputedMultisig, eigenLayerPauserReg, - 0 /*initialPausedStatus*/, + 0, /*initialPausedStatus*/ minWithdrawalDelayBlocks, initializeStrategiesToSetDelayBlocks, initializeWithdrawalDelayBlocks @@ -210,10 +201,7 @@ contract EigenLayerDeployer is Operators { TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation), abi.encodeWithSelector( - Slasher.initialize.selector, - eigenLayerReputedMultisig, - eigenLayerPauserReg, - 0 /*initialPausedStatus*/ + Slasher.initialize.selector, eigenLayerReputedMultisig, eigenLayerPauserReg, 0 /*initialPausedStatus*/ ) ); eigenLayerProxyAdmin.upgradeAndCall( @@ -258,7 +246,9 @@ contract EigenLayerDeployer is Operators { stakers = [acct_0, acct_1]; } - function _setAddresses(string memory config) internal { + function _setAddresses( + string memory config + ) internal { eigenLayerProxyAdminAddress = stdJson.readAddress(config, ".addresses.eigenLayerProxyAdmin"); eigenLayerPauserRegAddress = stdJson.readAddress(config, ".addresses.eigenLayerPauserReg"); delegationAddress = stdJson.readAddress(config, ".addresses.delegation"); diff --git a/src/test/EigenLayerTestHelper.t.sol b/src/test/EigenLayerTestHelper.t.sol index 62508d5d8..3fe41de8b 100644 --- a/src/test/EigenLayerTestHelper.t.sol +++ b/src/test/EigenLayerTestHelper.t.sol @@ -21,7 +21,6 @@ contract EigenLayerTestHelper is EigenLayerDeployer { * @param amountEigenToDeposit amount of eigen token to deposit * @param amountEthToDeposit amount of eth to deposit */ - function _testInitiateDelegation( uint8 operatorIndex, uint256 amountEigenToDeposit, @@ -155,8 +154,8 @@ contract EigenLayerTestHelper is EigenLayerDeployer { if (operatorSharesBefore == 0) { // check that strategy is appropriately added to dynamic array of all of sender's strategies assertTrue( - strategyManager.stakerStrategyList(sender, strategyManager.stakerStrategyListLength(sender) - 1) == - stratToDepositTo, + strategyManager.stakerStrategyList(sender, strategyManager.stakerStrategyListLength(sender) - 1) + == stratToDepositTo, "_testDepositToStrategy: stakerStrategyList array updated incorrectly" ); } @@ -279,8 +278,7 @@ contract EigenLayerTestHelper is EigenLayerDeployer { }); _testRegisterAsOperator(staker, operatorDetails); assertTrue( - delegation.isDelegated(staker), - "_createQueuedWithdrawal: staker isn't delegated when they should be" + delegation.isDelegated(staker), "_createQueuedWithdrawal: staker isn't delegated when they should be" ); } @@ -332,12 +330,7 @@ contract EigenLayerTestHelper is EigenLayerDeployer { /// @param staker is the staker delegating stake to the operator. /// @param ethAmount is the amount of ETH to deposit into the operator's strategy. /// @param eigenAmount is the amount of EIGEN to deposit into the operator's strategy. - function _testDelegation( - address operator, - address staker, - uint256 ethAmount, - uint256 eigenAmount - ) internal { + function _testDelegation(address operator, address staker, uint256 ethAmount, uint256 eigenAmount) internal { if (!delegation.isOperator(operator)) { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, @@ -356,7 +349,8 @@ contract EigenLayerTestHelper is EigenLayerDeployer { _testDelegateToOperator(staker, operator); assertTrue(delegation.isDelegated(staker) == true, "testDelegation: staker is not delegate"); - (/*IStrategy[] memory updatedStrategies*/, uint256[] memory updatedShares) = strategyManager.getDeposits(staker); + ( /*IStrategy[] memory updatedStrategies*/ , uint256[] memory updatedShares) = + strategyManager.getDeposits(staker); IStrategy _strat = wethStrat; // IStrategy _strat = strategyManager.stakerStrategyList(staker, 0); @@ -378,7 +372,6 @@ contract EigenLayerTestHelper is EigenLayerDeployer { * @param withdrawalStartBlock the block number of the original queued withdrawal * @param middlewareTimesIndex index in the middlewareTimes array used to queue this withdrawal */ - function _testCompleteQueuedWithdrawalShares( address depositor, IStrategy[] memory strategyArray, @@ -482,7 +475,7 @@ contract EigenLayerTestHelper is EigenLayerDeployer { function _testQueueWithdrawal( address depositor, - uint256[] memory /*strategyIndexes*/, + uint256[] memory, /*strategyIndexes*/ IStrategy[] memory strategyArray, uint256[] memory shareAmounts, address withdrawer diff --git a/src/test/Pausable.t.sol b/src/test/Pausable.t.sol index 9b6b878ec..5e6f8c4cc 100644 --- a/src/test/Pausable.t.sol +++ b/src/test/Pausable.t.sol @@ -5,7 +5,6 @@ pragma solidity ^0.8.12; import "./EigenLayerTestHelper.t.sol"; contract PausableTests is EigenLayerTestHelper { - /// @notice Emitted when the `pauserRegistry` is set to `newPauserRegistry`. event PauserRegistrySet(IPauserRegistry pauserRegistry, IPauserRegistry newPauserRegistry); @@ -34,10 +33,9 @@ contract PausableTests is EigenLayerTestHelper { // cheats.stopPrank(); } - function testUnauthorizedPauserStrategyManager(address unauthorizedPauser) - public - fuzzedAddress(unauthorizedPauser) - { + function testUnauthorizedPauserStrategyManager( + address unauthorizedPauser + ) public fuzzedAddress(unauthorizedPauser) { cheats.assume(!eigenLayerPauserReg.isPauser(unauthorizedPauser)); cheats.startPrank(unauthorizedPauser); cheats.expectRevert(bytes("msg.sender is not permissioned as pauser")); @@ -45,23 +43,26 @@ contract PausableTests is EigenLayerTestHelper { cheats.stopPrank(); } - function testSetPauser(address newPauser) public fuzzedAddress(newPauser) { + function testSetPauser( + address newPauser + ) public fuzzedAddress(newPauser) { cheats.startPrank(unpauser); eigenLayerPauserReg.setIsPauser(newPauser, true); cheats.stopPrank(); } - function testSetUnpauser(address newUnpauser) public fuzzedAddress(newUnpauser) { + function testSetUnpauser( + address newUnpauser + ) public fuzzedAddress(newUnpauser) { cheats.startPrank(unpauser); eigenLayerPauserReg.setUnpauser(newUnpauser); cheats.stopPrank(); } - function testSetPauserUnauthorized(address fakePauser, address newPauser) - public - fuzzedAddress(newPauser) - fuzzedAddress(fakePauser) - { + function testSetPauserUnauthorized( + address fakePauser, + address newPauser + ) public fuzzedAddress(newPauser) fuzzedAddress(fakePauser) { cheats.assume(fakePauser != eigenLayerPauserReg.unpauser()); cheats.startPrank(fakePauser); cheats.expectRevert(bytes("msg.sender is not permissioned as unpauser")); @@ -69,20 +70,25 @@ contract PausableTests is EigenLayerTestHelper { cheats.stopPrank(); } - function testSetPauserRegistryUnpauser(IPauserRegistry newPauserRegistry) public { + function testSetPauserRegistryUnpauser( + IPauserRegistry newPauserRegistry + ) public { cheats.assume(address(newPauserRegistry) != address(0)); IPauserRegistry oldPauserRegistry = strategyManager.pauserRegistry(); cheats.prank(unpauser); cheats.expectEmit(true, true, true, true, address(strategyManager)); emit PauserRegistrySet(oldPauserRegistry, newPauserRegistry); strategyManager.setPauserRegistry(newPauserRegistry); - + assertEq(address(newPauserRegistry), address(strategyManager.pauserRegistry())); } - function testSetPauserRegistyUnauthorized(IPauserRegistry newPauserRegistry, address notUnpauser) public fuzzedAddress(notUnpauser) { + function testSetPauserRegistyUnauthorized( + IPauserRegistry newPauserRegistry, + address notUnpauser + ) public fuzzedAddress(notUnpauser) { cheats.assume(notUnpauser != eigenLayerPauserReg.unpauser()); - + cheats.prank(notUnpauser); cheats.expectRevert(bytes("msg.sender is not permissioned as unpauser")); strategyManager.setPauserRegistry(newPauserRegistry); diff --git a/src/test/Strategy.t.sol b/src/test/Strategy.t.sol index 3139e92a2..792b634b0 100644 --- a/src/test/Strategy.t.sol +++ b/src/test/Strategy.t.sol @@ -14,7 +14,9 @@ contract StrategyTests is EigenLayerTestHelper { ///@notice This function tests to ensure that only the strategyManager /// can deposit into a strategy ///@param invalidDepositor is the non-registered depositor - function testInvalidCalltoDeposit(address invalidDepositor) public fuzzedAddress(invalidDepositor) { + function testInvalidCalltoDeposit( + address invalidDepositor + ) public fuzzedAddress(invalidDepositor) { IERC20 underlyingToken = wethStrat.underlyingToken(); cheats.startPrank(invalidDepositor); @@ -27,10 +29,10 @@ contract StrategyTests is EigenLayerTestHelper { /// can deposit into a strategy ///@param invalidWithdrawer is the non-registered withdrawer ///@param depositor is the depositor for which the shares are being withdrawn - function testInvalidCalltoWithdraw(address depositor, address invalidWithdrawer) - public - fuzzedAddress(invalidWithdrawer) - { + function testInvalidCalltoWithdraw( + address depositor, + address invalidWithdrawer + ) public fuzzedAddress(invalidWithdrawer) { IERC20 underlyingToken = wethStrat.underlyingToken(); cheats.startPrank(invalidWithdrawer); @@ -48,9 +50,7 @@ contract StrategyTests is EigenLayerTestHelper { cheats.startPrank(address(strategyManager)); - cheats.expectRevert( - bytes("StrategyBase.withdraw: amountShares must be less than or equal to totalShares") - ); + cheats.expectRevert(bytes("StrategyBase.withdraw: amountShares must be less than or equal to totalShares")); wethStrat.withdraw(depositor, underlyingToken, shares); cheats.stopPrank(); diff --git a/src/test/Withdrawals.t.sol b/src/test/Withdrawals.t.sol index f8f780e7a..7bc8d5a64 100644 --- a/src/test/Withdrawals.t.sol +++ b/src/test/Withdrawals.t.sol @@ -61,9 +61,8 @@ contract WithdrawalTests is EigenLayerTestHelper { // scoped block to deal with stack-too-deep issues { //delegator-specific information - (IStrategy[] memory delegatorStrategies, uint256[] memory delegatorShares) = strategyManager.getDeposits( - depositor - ); + (IStrategy[] memory delegatorStrategies, uint256[] memory delegatorShares) = + strategyManager.getDeposits(depositor); dataForTestWithdrawal.delegatorStrategies = delegatorStrategies; dataForTestWithdrawal.delegatorShares = delegatorShares; dataForTestWithdrawal.withdrawer = withdrawer; @@ -162,9 +161,8 @@ contract WithdrawalTests is EigenLayerTestHelper { // scoped block to deal with stack-too-deep issues { //delegator-specific information - (IStrategy[] memory delegatorStrategies, uint256[] memory delegatorShares) = strategyManager.getDeposits( - depositor - ); + (IStrategy[] memory delegatorStrategies, uint256[] memory delegatorShares) = + strategyManager.getDeposits(depositor); dataForTestWithdrawal.delegatorStrategies = delegatorStrategies; dataForTestWithdrawal.delegatorShares = delegatorShares; dataForTestWithdrawal.withdrawer = withdrawer; @@ -282,4 +280,3 @@ contract WithdrawalTests is EigenLayerTestHelper { _; } } - diff --git a/src/test/events/IAVSDirectoryEvents.sol b/src/test/events/IAVSDirectoryEvents.sol index a4f0a2962..1597ed08b 100644 --- a/src/test/events/IAVSDirectoryEvents.sol +++ b/src/test/events/IAVSDirectoryEvents.sol @@ -11,5 +11,7 @@ interface IAVSDirectoryEvents { event AVSMetadataURIUpdated(address indexed avs, string metadataURI); /// @notice Emitted when an operator's registration status for an AVS is updated - event OperatorAVSRegistrationStatusUpdated(address indexed operator, address indexed avs, IAVSDirectory.OperatorAVSRegistrationStatus status); + event OperatorAVSRegistrationStatusUpdated( + address indexed operator, address indexed avs, IAVSDirectory.OperatorAVSRegistrationStatus status + ); } diff --git a/src/test/events/IDelegationManagerEvents.sol b/src/test/events/IDelegationManagerEvents.sol index 9677cc226..7cf527292 100644 --- a/src/test/events/IDelegationManagerEvents.sol +++ b/src/test/events/IDelegationManagerEvents.sol @@ -24,12 +24,15 @@ interface IDelegationManagerEvents { /// @notice Enum representing the status of an operator's registration with an AVS enum OperatorAVSRegistrationStatus { - UNREGISTERED, // Operator not registered to AVS - REGISTERED // Operator registered to AVS + UNREGISTERED, // Operator not registered to AVS + REGISTERED // Operator registered to AVS + } /// @notice Emitted when an operator's registration status for an AVS is updated - event OperatorAVSRegistrationStatusUpdated(address indexed operator, address indexed avs, OperatorAVSRegistrationStatus status); + event OperatorAVSRegistrationStatusUpdated( + address indexed operator, address indexed avs, OperatorAVSRegistrationStatus status + ); /// @notice Emitted whenever an operator's shares are increased for a given strategy event OperatorSharesIncreased(address indexed operator, address staker, IStrategy strategy, uint256 shares); diff --git a/src/test/events/IEigenPodEvents.sol b/src/test/events/IEigenPodEvents.sol index f6302272b..b77fff39e 100644 --- a/src/test/events/IEigenPodEvents.sol +++ b/src/test/events/IEigenPodEvents.sol @@ -25,7 +25,9 @@ interface IEigenPodEvents { event NonBeaconChainETHReceived(uint256 amountReceived); /// @notice Emitted when a checkpoint is created - event CheckpointCreated(uint64 indexed checkpointTimestamp, bytes32 indexed beaconBlockRoot, uint256 validatorCount); + event CheckpointCreated( + uint64 indexed checkpointTimestamp, bytes32 indexed beaconBlockRoot, uint256 validatorCount + ); /// @notice Emitted when a checkpoint is finalized event CheckpointFinalized(uint64 indexed checkpointTimestamp, int256 totalShareDeltaWei); diff --git a/src/test/events/IRewardsCoordinatorEvents.sol b/src/test/events/IRewardsCoordinatorEvents.sol index 72832ae68..ad75a7245 100644 --- a/src/test/events/IRewardsCoordinatorEvents.sol +++ b/src/test/events/IRewardsCoordinatorEvents.sol @@ -30,9 +30,7 @@ interface IRewardsCoordinatorEvents { /// @notice rewardsUpdater is responsible for submiting DistributionRoots, only owner can set rewardsUpdater event RewardsUpdaterSet(address indexed oldRewardsUpdater, address indexed newRewardsUpdater); event RewardsForAllSubmitterSet( - address indexed rewardsForAllSubmitter, - bool indexed oldValue, - bool indexed newValue + address indexed rewardsForAllSubmitter, bool indexed oldValue, bool indexed newValue ); event ActivationDelaySet(uint32 oldActivationDelay, uint32 newActivationDelay); event GlobalCommissionBipsSet(uint16 oldGlobalCommissionBips, uint16 newGlobalCommissionBips); @@ -54,8 +52,6 @@ interface IRewardsCoordinatorEvents { uint256 claimedAmount ); - - /// TOKEN EVENTS FOR TESTING /// /** * @dev Emitted when `value` tokens are moved from one account (`from`) to diff --git a/src/test/events/IStrategyManagerEvents.sol b/src/test/events/IStrategyManagerEvents.sol index e0727d069..86a1c2e9d 100644 --- a/src/test/events/IStrategyManagerEvents.sol +++ b/src/test/events/IStrategyManagerEvents.sol @@ -31,19 +31,12 @@ interface IStrategyManagerEvents { * @param withdrawalRoot Is a hash of the input data for the withdrawal. */ event WithdrawalQueued( - address depositor, - uint96 nonce, - address withdrawer, - address delegatedAddress, - bytes32 withdrawalRoot + address depositor, uint96 nonce, address withdrawer, address delegatedAddress, bytes32 withdrawalRoot ); /// @notice Emitted when a queued withdrawal is completed event WithdrawalCompleted( - address indexed depositor, - uint96 nonce, - address indexed withdrawer, - bytes32 withdrawalRoot + address indexed depositor, uint96 nonce, address indexed withdrawer, bytes32 withdrawalRoot ); /// @notice Emitted when `thirdPartyTransfersForbidden` is updated for a strategy and value by the owner diff --git a/src/test/harnesses/EigenHarness.sol b/src/test/harnesses/EigenHarness.sol index e5f1ccbbf..2e466e328 100644 --- a/src/test/harnesses/EigenHarness.sol +++ b/src/test/harnesses/EigenHarness.sol @@ -4,8 +4,9 @@ pragma solidity ^0.8.12; import "../../contracts/token/Eigen.sol"; contract EigenHarness is Eigen { - - constructor(IERC20 _bEIGEN) Eigen(_bEIGEN) { } + constructor( + IERC20 _bEIGEN + ) Eigen(_bEIGEN) {} /// expose internal mint function function mint(address to, uint256 amount) public { @@ -27,7 +28,9 @@ contract EigenHarness is Eigen { transferRestrictionsDisabledAfter = type(uint256).max; } - function transferOwnershipPermissionless(address newOwner) external { + function transferOwnershipPermissionless( + address newOwner + ) external { _transferOwnership(newOwner); } -} \ No newline at end of file +} diff --git a/src/test/harnesses/EigenPodHarness.sol b/src/test/harnesses/EigenPodHarness.sol index f76e00e1f..b9535573b 100644 --- a/src/test/harnesses/EigenPodHarness.sol +++ b/src/test/harnesses/EigenPodHarness.sol @@ -5,22 +5,19 @@ import "../../contracts/pods/EigenPod.sol"; import "forge-std/Test.sol"; contract EigenPodHarness is EigenPod { - constructor( IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager, uint64 _GENESIS_TIME - ) EigenPod( - _ethPOS, - _eigenPodManager, - _GENESIS_TIME - ) {} + ) EigenPod(_ethPOS, _eigenPodManager, _GENESIS_TIME) {} function getActiveValidatorCount() public view returns (uint256) { return activeValidatorCount; } - function setActiveValidatorCount(uint _count) public { + function setActiveValidatorCount( + uint256 _count + ) public { activeValidatorCount = _count; } @@ -30,12 +27,7 @@ contract EigenPodHarness is EigenPod { bytes calldata validatorFieldsProof, bytes32[] calldata validatorFields ) public returns (uint256) { - return _verifyWithdrawalCredentials( - beaconStateRoot, - validatorIndex, - validatorFieldsProof, - validatorFields - ); + return _verifyWithdrawalCredentials(beaconStateRoot, validatorIndex, validatorFieldsProof, validatorFields); } function setValidatorStatus(bytes32 pkhash, VALIDATOR_STATUS status) public { diff --git a/src/test/harnesses/EigenPodManagerWrapper.sol b/src/test/harnesses/EigenPodManagerWrapper.sol index 15eec05fd..e3c157b12 100644 --- a/src/test/harnesses/EigenPodManagerWrapper.sol +++ b/src/test/harnesses/EigenPodManagerWrapper.sol @@ -5,7 +5,6 @@ import "../../contracts/pods/EigenPodManager.sol"; ///@notice This contract exposed the internal `_calculateChangeInDelegatableShares` function for testing contract EigenPodManagerWrapper is EigenPodManager { - constructor( IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, @@ -14,7 +13,10 @@ contract EigenPodManagerWrapper is EigenPodManager { IDelegationManager _delegationManager ) EigenPodManager(_ethPOS, _eigenPodBeacon, _strategyManager, _slasher, _delegationManager) {} - function calculateChangeInDelegatableShares(int256 sharesBefore, int256 sharesAfter) external pure returns (int256) { + function calculateChangeInDelegatableShares( + int256 sharesBefore, + int256 sharesAfter + ) external pure returns (int256) { return _calculateChangeInDelegatableShares(sharesBefore, sharesAfter); } diff --git a/src/test/integration/IntegrationBase.t.sol b/src/test/integration/IntegrationBase.t.sol index dc232a98c..f57e96da7 100644 --- a/src/test/integration/IntegrationBase.t.sol +++ b/src/test/integration/IntegrationBase.t.sol @@ -14,11 +14,10 @@ import "src/test/integration/users/User.t.sol"; import "src/test/integration/users/User_M1.t.sol"; abstract contract IntegrationBase is IntegrationDeployer { - using Strings for *; - uint numStakers = 0; - uint numOperators = 0; + uint256 numStakers = 0; + uint256 numOperators = 0; // Lists of stakers/operators created before the m2 upgrade // @@ -36,12 +35,12 @@ abstract contract IntegrationBase is IntegrationDeployer { * @dev Create a new user according to configured random variants. * This user is ready to deposit into some strategies and has some underlying token balances */ - function _newRandomStaker() internal returns (User, IStrategy[] memory, uint[] memory) { + function _newRandomStaker() internal returns (User, IStrategy[] memory, uint256[] memory) { string memory stakerName; User staker; IStrategy[] memory strategies; - uint[] memory tokenBalances; + uint256[] memory tokenBalances; if (forkType == MAINNET && !isUpgraded) { stakerName = string.concat("M1_Staker", numStakers.toString()); @@ -55,7 +54,9 @@ abstract contract IntegrationBase is IntegrationDeployer { (staker, strategies, tokenBalances) = _randUser(stakerName); } - assert_HasUnderlyingTokenBalances(staker, strategies, tokenBalances, "_newRandomStaker: failed to award token balances"); + assert_HasUnderlyingTokenBalances( + staker, strategies, tokenBalances, "_newRandomStaker: failed to award token balances" + ); numStakers++; return (staker, strategies, tokenBalances); @@ -65,12 +66,12 @@ abstract contract IntegrationBase is IntegrationDeployer { * @dev Create a new operator according to configured random variants. * This user will immediately deposit their randomized assets into eigenlayer. * @notice If forktype is mainnet and not upgraded, then the operator will only randomize LSTs assets and deposit them - * as ETH podowner shares are not available yet. + * as ETH podowner shares are not available yet. */ - function _newRandomOperator() internal returns (User, IStrategy[] memory, uint[] memory) { + function _newRandomOperator() internal returns (User, IStrategy[] memory, uint256[] memory) { User operator; IStrategy[] memory strategies; - uint[] memory tokenBalances; + uint256[] memory tokenBalances; if (forkType == MAINNET && !isUpgraded) { string memory operatorName = string.concat("M1_Operator", numOperators.toString()); @@ -80,9 +81,11 @@ abstract contract IntegrationBase is IntegrationDeployer { (operator, strategies, tokenBalances) = _randUser_NoETH(operatorName); User_M1(payable(address(operator))).depositIntoEigenlayer_M1(strategies, tokenBalances); - uint[] memory addedShares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory addedShares = _calculateExpectedShares(strategies, tokenBalances); - assert_Snap_Added_StakerShares(operator, strategies, addedShares, "_newRandomOperator: failed to add delegatable shares"); + assert_Snap_Added_StakerShares( + operator, strategies, addedShares, "_newRandomOperator: failed to add delegatable shares" + ); operatorsToMigrate.push(operator); } else { @@ -90,14 +93,20 @@ abstract contract IntegrationBase is IntegrationDeployer { (operator, strategies, tokenBalances) = _randUser_NoETH(operatorName); - uint[] memory addedShares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory addedShares = _calculateExpectedShares(strategies, tokenBalances); operator.registerAsOperator(); operator.depositIntoEigenlayer(strategies, tokenBalances); - assert_Snap_Added_StakerShares(operator, strategies, addedShares, "_newRandomOperator: failed to add delegatable shares"); - assert_Snap_Added_OperatorShares(operator, strategies, addedShares, "_newRandomOperator: failed to award shares to operator"); - assertTrue(delegationManager.isOperator(address(operator)), "_newRandomOperator: operator should be registered"); + assert_Snap_Added_StakerShares( + operator, strategies, addedShares, "_newRandomOperator: failed to add delegatable shares" + ); + assert_Snap_Added_OperatorShares( + operator, strategies, addedShares, "_newRandomOperator: failed to award shares to operator" + ); + assertTrue( + delegationManager.isOperator(address(operator)), "_newRandomOperator: operator should be registered" + ); } numOperators++; @@ -109,15 +118,17 @@ abstract contract IntegrationBase is IntegrationDeployer { /// non-gwei-divisible amount. /// /// Total sent == `gweiSent + remainderSent` - function _sendRandomETH(address destination) internal returns (uint64 gweiSent, uint remainderSent) { - gweiSent = uint64(_randUint({ min: 1 , max: 10 })); - remainderSent = _randUint({ min: 1, max: 100 }); - uint totalSent = (gweiSent * GWEI_TO_WEI) + remainderSent; + function _sendRandomETH( + address destination + ) internal returns (uint64 gweiSent, uint256 remainderSent) { + gweiSent = uint64(_randUint({min: 1, max: 10})); + remainderSent = _randUint({min: 1, max: 100}); + uint256 totalSent = (gweiSent * GWEI_TO_WEI) + remainderSent; cheats.deal(address(this), address(this).balance + totalSent); bool r; bytes memory d; - (r, d) = destination.call{ value: totalSent }(""); + (r, d) = destination.call{value: totalSent}(""); return (gweiSent, remainderSent); } @@ -133,7 +144,7 @@ abstract contract IntegrationBase is IntegrationDeployer { emit log("===Migrating Stakers/Operators==="); // Register operators with DelegationManager - for (uint i = 0; i < operatorsToMigrate.length; i++) { + for (uint256 i = 0; i < operatorsToMigrate.length; i++) { operatorsToMigrate[i].registerAsOperator(); } @@ -160,12 +171,14 @@ abstract contract IntegrationBase is IntegrationDeployer { } /// @dev Choose a random subset of validators (selects AT LEAST ONE) - function _choose(uint40[] memory validators) internal returns (uint40[] memory) { - uint rand = _randUint({ min: 1, max: validators.length ** 2 }); + function _choose( + uint40[] memory validators + ) internal returns (uint40[] memory) { + uint256 rand = _randUint({min: 1, max: validators.length ** 2}); uint40[] memory result = new uint40[](validators.length); - uint newLen; - for (uint i = 0; i < validators.length; i++) { + uint256 newLen; + for (uint256 i = 0; i < validators.length; i++) { // if bit set, add validator if (rand >> i & 1 == 1) { result[newLen] = validators[i]; @@ -174,34 +187,36 @@ abstract contract IntegrationBase is IntegrationDeployer { } // Manually update length of result - assembly { mstore(result, newLen) } + assembly { + mstore(result, newLen) + } return result; } - /******************************************************************************* - COMMON ASSERTIONS - *******************************************************************************/ - + /** + * + * COMMON ASSERTIONS + * + */ function assert_HasNoDelegatableShares(User user, string memory err) internal { - (IStrategy[] memory strategies, uint[] memory shares) = - delegationManager.getDelegatableShares(address(user)); - + (IStrategy[] memory strategies, uint256[] memory shares) = delegationManager.getDelegatableShares(address(user)); + assertEq(strategies.length, 0, err); assertEq(strategies.length, shares.length, "assert_HasNoDelegatableShares: return length mismatch"); } function assert_HasUnderlyingTokenBalances( - User user, - IStrategy[] memory strategies, - uint[] memory expectedBalances, + User user, + IStrategy[] memory strategies, + uint256[] memory expectedBalances, string memory err ) internal { - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - - uint expectedBalance = expectedBalances[i]; - uint tokenBalance; + + uint256 expectedBalance = expectedBalances[i]; + uint256 tokenBalance; if (strat == BEACONCHAIN_ETH_STRAT) { tokenBalance = address(user).balance; } else { @@ -214,29 +229,29 @@ abstract contract IntegrationBase is IntegrationDeployer { } function assert_HasNoUnderlyingTokenBalance(User user, IStrategy[] memory strategies, string memory err) internal { - assert_HasUnderlyingTokenBalances(user, strategies, new uint[](strategies.length), err); + assert_HasUnderlyingTokenBalances(user, strategies, new uint256[](strategies.length), err); } function assert_HasExpectedShares( - User user, - IStrategy[] memory strategies, - uint[] memory expectedShares, + User user, + IStrategy[] memory strategies, + uint256[] memory expectedShares, string memory err ) internal { - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - uint actualShares; + uint256 actualShares; if (strat == BEACONCHAIN_ETH_STRAT) { // This method should only be used for tests that handle positive // balances. Negative balances are an edge case that require // the own tests and helper methods. - int shares = eigenPodManager.podOwnerShares(address(user)); + int256 shares = eigenPodManager.podOwnerShares(address(user)); if (shares < 0) { revert("assert_HasExpectedShares: negative shares"); } - actualShares = uint(shares); + actualShares = uint256(shares); } else { actualShares = strategyManager.stakerStrategyShares(address(user), strat); } @@ -246,15 +261,15 @@ abstract contract IntegrationBase is IntegrationDeployer { } function assert_HasOperatorShares( - User user, - IStrategy[] memory strategies, - uint[] memory expectedShares, + User user, + IStrategy[] memory strategies, + uint256[] memory expectedShares, string memory err ) internal { - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - uint actualShares = delegationManager.operatorShares(address(user), strat); + uint256 actualShares = delegationManager.operatorShares(address(user), strat); assertApproxEqAbs(expectedShares[i], actualShares, 1, err); } @@ -262,14 +277,14 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Asserts that ALL of the `withdrawalRoots` is in `delegationManager.pendingWithdrawals` function assert_AllWithdrawalsPending(bytes32[] memory withdrawalRoots, string memory err) internal { - for (uint i = 0; i < withdrawalRoots.length; i++) { + for (uint256 i = 0; i < withdrawalRoots.length; i++) { assert_WithdrawalPending(withdrawalRoots[i], err); } } /// @dev Asserts that NONE of the `withdrawalRoots` is in `delegationManager.pendingWithdrawals` function assert_NoWithdrawalsPending(bytes32[] memory withdrawalRoots, string memory err) internal { - for (uint i = 0; i < withdrawalRoots.length; i++) { + for (uint256 i = 0; i < withdrawalRoots.length; i++) { assert_WithdrawalNotPending(withdrawalRoots[i], err); } } @@ -288,7 +303,7 @@ abstract contract IntegrationBase is IntegrationDeployer { bytes32[] memory withdrawalRoots, string memory err ) internal { - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { assert_ValidWithdrawalHash(withdrawals[i], withdrawalRoots[i], err); } } @@ -301,55 +316,48 @@ abstract contract IntegrationBase is IntegrationDeployer { assertEq(withdrawalRoot, delegationManager.calculateWithdrawalRoot(withdrawal), err); } - function assert_PodBalance_Eq( - User staker, - uint expectedBalance, - string memory err - ) internal { + function assert_PodBalance_Eq(User staker, uint256 expectedBalance, string memory err) internal { EigenPod pod = staker.pod(); assertEq(address(pod).balance, expectedBalance, err); } - function assert_ProofsRemainingEqualsActive( - User staker, - string memory err - ) internal { + function assert_ProofsRemainingEqualsActive(User staker, string memory err) internal { EigenPod pod = staker.pod(); assertEq(pod.currentCheckpoint().proofsRemaining, pod.activeValidatorCount(), err); } - function assert_CheckpointPodBalance( - User staker, - uint64 expectedPodBalanceGwei, - string memory err - ) internal { + function assert_CheckpointPodBalance(User staker, uint64 expectedPodBalanceGwei, string memory err) internal { EigenPod pod = staker.pod(); assertEq(pod.currentCheckpoint().podBalanceGwei, expectedPodBalanceGwei, err); } - - /******************************************************************************* - SNAPSHOT ASSERTIONS - TIME TRAVELERS ONLY BEYOND THIS POINT - *******************************************************************************/ - /******************************************************************************* - SNAPSHOT ASSERTIONS: OPERATOR SHARES - *******************************************************************************/ + /** + * + * SNAPSHOT ASSERTIONS + * TIME TRAVELERS ONLY BEYOND THIS POINT + * + */ + + /** + * + * SNAPSHOT ASSERTIONS: OPERATOR SHARES + * + */ - /// @dev Check that the operator has `addedShares` additional operator shares + /// @dev Check that the operator has `addedShares` additional operator shares // for each strategy since the last snapshot function assert_Snap_Added_OperatorShares( - User operator, - IStrategy[] memory strategies, - uint[] memory addedShares, + User operator, + IStrategy[] memory strategies, + uint256[] memory addedShares, string memory err ) internal { - uint[] memory curShares = _getOperatorShares(operator, strategies); + uint256[] memory curShares = _getOperatorShares(operator, strategies); // Use timewarp to get previous operator shares - uint[] memory prevShares = _getPrevOperatorShares(operator, strategies); + uint256[] memory prevShares = _getPrevOperatorShares(operator, strategies); // For each strategy, check (prev + added == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertApproxEqAbs(prevShares[i] + addedShares[i], curShares[i], 1, err); } } @@ -357,91 +365,90 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Check that the operator has `removedShares` fewer operator shares /// for each strategy since the last snapshot function assert_Snap_Removed_OperatorShares( - User operator, - IStrategy[] memory strategies, - uint[] memory removedShares, + User operator, + IStrategy[] memory strategies, + uint256[] memory removedShares, string memory err ) internal { - uint[] memory curShares = _getOperatorShares(operator, strategies); + uint256[] memory curShares = _getOperatorShares(operator, strategies); // Use timewarp to get previous operator shares - uint[] memory prevShares = _getPrevOperatorShares(operator, strategies); + uint256[] memory prevShares = _getPrevOperatorShares(operator, strategies); // For each strategy, check (prev - removed == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertEq(prevShares[i] - removedShares[i], curShares[i], err); } } /// @dev Check that the operator's shares in ALL strategies have not changed /// since the last snapshot - function assert_Snap_Unchanged_OperatorShares( - User operator, - string memory err - ) internal { + function assert_Snap_Unchanged_OperatorShares(User operator, string memory err) internal { IStrategy[] memory strategies = allStrats; - uint[] memory curShares = _getOperatorShares(operator, strategies); + uint256[] memory curShares = _getOperatorShares(operator, strategies); // Use timewarp to get previous operator shares - uint[] memory prevShares = _getPrevOperatorShares(operator, strategies); + uint256[] memory prevShares = _getPrevOperatorShares(operator, strategies); // For each strategy, check (prev == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertEq(prevShares[i], curShares[i], err); } } function assert_Snap_Delta_OperatorShares( - User operator, - IStrategy[] memory strategies, - int[] memory shareDeltas, + User operator, + IStrategy[] memory strategies, + int256[] memory shareDeltas, string memory err ) internal { - uint[] memory curShares = _getOperatorShares(operator, strategies); + uint256[] memory curShares = _getOperatorShares(operator, strategies); // Use timewarp to get previous operator shares - uint[] memory prevShares = _getPrevOperatorShares(operator, strategies); + uint256[] memory prevShares = _getPrevOperatorShares(operator, strategies); // For each strategy, check (prev + added == cur) - for (uint i = 0; i < strategies.length; i++) { - uint expectedShares; + for (uint256 i = 0; i < strategies.length; i++) { + uint256 expectedShares; if (shareDeltas[i] < 0) { - expectedShares = prevShares[i] - uint(-shareDeltas[i]); + expectedShares = prevShares[i] - uint256(-shareDeltas[i]); } else { - expectedShares = prevShares[i] + uint(shareDeltas[i]); + expectedShares = prevShares[i] + uint256(shareDeltas[i]); } assertEq(expectedShares, curShares[i], err); } } - /******************************************************************************* - SNAPSHOT ASSERTIONS: STAKER SHARES - *******************************************************************************/ + /** + * + * SNAPSHOT ASSERTIONS: STAKER SHARES + * + */ /// @dev Check that the staker has `addedShares` additional delegatable shares /// for each strategy since the last snapshot function assert_Snap_Added_StakerShares( - User staker, - IStrategy[] memory strategies, - uint[] memory addedShares, + User staker, + IStrategy[] memory strategies, + uint256[] memory addedShares, string memory err ) internal { - uint[] memory curShares = _getStakerShares(staker, strategies); + uint256[] memory curShares = _getStakerShares(staker, strategies); // Use timewarp to get previous staker shares - uint[] memory prevShares = _getPrevStakerShares(staker, strategies); + uint256[] memory prevShares = _getPrevStakerShares(staker, strategies); // For each strategy, check (prev + added == cur) - for (uint i = 0; i < strategies.length; i++) { - assertApproxEqAbs(prevShares[i] + addedShares[i], curShares[i], 1, err); + for (uint256 i = 0; i < strategies.length; i++) { + assertApproxEqAbs(prevShares[i] + addedShares[i], curShares[i], 1, err); } } function assert_Snap_Added_StakerShares( - User staker, - IStrategy strat, - uint _addedShares, + User staker, + IStrategy strat, + uint256 _addedShares, string memory err ) internal { IStrategy[] memory strategies = new IStrategy[](1); - uint[] memory addedShares = new uint[](1); + uint256[] memory addedShares = new uint256[](1); strategies[0] = strat; addedShares[0] = _addedShares; @@ -451,29 +458,29 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Check that the staker has `removedShares` fewer delegatable shares /// for each strategy since the last snapshot function assert_Snap_Removed_StakerShares( - User staker, - IStrategy[] memory strategies, - uint[] memory removedShares, + User staker, + IStrategy[] memory strategies, + uint256[] memory removedShares, string memory err ) internal { - uint[] memory curShares = _getStakerShares(staker, strategies); + uint256[] memory curShares = _getStakerShares(staker, strategies); // Use timewarp to get previous staker shares - uint[] memory prevShares = _getPrevStakerShares(staker, strategies); + uint256[] memory prevShares = _getPrevStakerShares(staker, strategies); // For each strategy, check (prev - removed == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertEq(prevShares[i] - removedShares[i], curShares[i], err); } } function assert_Snap_Removed_StakerShares( - User staker, - IStrategy strat, - uint _removedShares, + User staker, + IStrategy strat, + uint256 _removedShares, string memory err ) internal { IStrategy[] memory strategies = new IStrategy[](1); - uint[] memory removedShares = new uint[](1); + uint256[] memory removedShares = new uint256[](1); strategies[0] = strat; removedShares[0] = _removedShares; @@ -482,122 +489,119 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Check that the staker's delegatable shares in ALL strategies have not changed /// since the last snapshot - function assert_Snap_Unchanged_StakerShares( - User staker, - string memory err - ) internal { + function assert_Snap_Unchanged_StakerShares(User staker, string memory err) internal { IStrategy[] memory strategies = allStrats; - uint[] memory curShares = _getStakerShares(staker, strategies); + uint256[] memory curShares = _getStakerShares(staker, strategies); // Use timewarp to get previous staker shares - uint[] memory prevShares = _getPrevStakerShares(staker, strategies); + uint256[] memory prevShares = _getPrevStakerShares(staker, strategies); // For each strategy, check (prev == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertEq(prevShares[i], curShares[i], err); } } function assert_Snap_Delta_StakerShares( - User staker, - IStrategy[] memory strategies, - int[] memory shareDeltas, + User staker, + IStrategy[] memory strategies, + int256[] memory shareDeltas, string memory err ) internal { - int[] memory curShares = _getStakerSharesInt(staker, strategies); + int256[] memory curShares = _getStakerSharesInt(staker, strategies); // Use timewarp to get previous staker shares - int[] memory prevShares = _getPrevStakerSharesInt(staker, strategies); + int256[] memory prevShares = _getPrevStakerSharesInt(staker, strategies); // For each strategy, check (prev + added == cur) - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { assertEq(prevShares[i] + shareDeltas[i], curShares[i], err); } } - /******************************************************************************* - SNAPSHOT ASSERTIONS: STRATEGY SHARES - *******************************************************************************/ - + /** + * + * SNAPSHOT ASSERTIONS: STRATEGY SHARES + * + */ function assert_Snap_Removed_StrategyShares( IStrategy[] memory strategies, - uint[] memory removedShares, + uint256[] memory removedShares, string memory err ) internal { - uint[] memory curShares = _getTotalStrategyShares(strategies); + uint256[] memory curShares = _getTotalStrategyShares(strategies); // Use timewarp to get previous strategy shares - uint[] memory prevShares = _getPrevTotalStrategyShares(strategies); + uint256[] memory prevShares = _getPrevTotalStrategyShares(strategies); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { // Ignore BeaconChainETH strategy since it doesn't keep track of global strategy shares if (strategies[i] == BEACONCHAIN_ETH_STRAT) { continue; } - uint prevShare = prevShares[i]; - uint curShare = curShares[i]; + uint256 prevShare = prevShares[i]; + uint256 curShare = curShares[i]; assertEq(prevShare - removedShares[i], curShare, err); } } - function assert_Snap_Unchanged_StrategyShares( - IStrategy[] memory strategies, - string memory err - ) internal { - uint[] memory curShares = _getTotalStrategyShares(strategies); + function assert_Snap_Unchanged_StrategyShares(IStrategy[] memory strategies, string memory err) internal { + uint256[] memory curShares = _getTotalStrategyShares(strategies); // Use timewarp to get previous strategy shares - uint[] memory prevShares = _getPrevTotalStrategyShares(strategies); + uint256[] memory prevShares = _getPrevTotalStrategyShares(strategies); - for (uint i = 0; i < strategies.length; i++) { - uint prevShare = prevShares[i]; - uint curShare = curShares[i]; + for (uint256 i = 0; i < strategies.length; i++) { + uint256 prevShare = prevShares[i]; + uint256 curShare = curShares[i]; assertEq(prevShare, curShare, err); } } - /******************************************************************************* - SNAPSHOT ASSERTIONS: UNDERLYING TOKEN - *******************************************************************************/ + /** + * + * SNAPSHOT ASSERTIONS: UNDERLYING TOKEN + * + */ - /// @dev Check that the staker has `addedTokens` additional underlying tokens + /// @dev Check that the staker has `addedTokens` additional underlying tokens // since the last snapshot function assert_Snap_Added_TokenBalances( User staker, IERC20[] memory tokens, - uint[] memory addedTokens, + uint256[] memory addedTokens, string memory err ) internal { - uint[] memory curTokenBalances = _getTokenBalances(staker, tokens); + uint256[] memory curTokenBalances = _getTokenBalances(staker, tokens); // Use timewarp to get previous token balances - uint[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); + uint256[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); - for (uint i = 0; i < tokens.length; i++) { - uint prevBalance = prevTokenBalances[i]; - uint curBalance = curTokenBalances[i]; + for (uint256 i = 0; i < tokens.length; i++) { + uint256 prevBalance = prevTokenBalances[i]; + uint256 curBalance = curTokenBalances[i]; assertEq(prevBalance + addedTokens[i], curBalance, err); } } - /// @dev Check that the staker has `removedTokens` fewer underlying tokens + /// @dev Check that the staker has `removedTokens` fewer underlying tokens // since the last snapshot function assert_Snap_Removed_TokenBalances( User staker, IStrategy[] memory strategies, - uint[] memory removedTokens, + uint256[] memory removedTokens, string memory err ) internal { IERC20[] memory tokens = _getUnderlyingTokens(strategies); - uint[] memory curTokenBalances = _getTokenBalances(staker, tokens); + uint256[] memory curTokenBalances = _getTokenBalances(staker, tokens); // Use timewarp to get previous token balances - uint[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); + uint256[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); - for (uint i = 0; i < tokens.length; i++) { - uint prevBalance = prevTokenBalances[i]; - uint curBalance = curTokenBalances[i]; + for (uint256 i = 0; i < tokens.length; i++) { + uint256 prevBalance = prevTokenBalances[i]; + uint256 curBalance = curTokenBalances[i]; assertEq(prevBalance - removedTokens[i], curBalance, err); } @@ -605,81 +609,73 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Check that the staker's underlying token balance for ALL tokens have /// not changed since the last snapshot - function assert_Snap_Unchanged_TokenBalances( - User staker, - string memory err - ) internal { + function assert_Snap_Unchanged_TokenBalances(User staker, string memory err) internal { IERC20[] memory tokens = allTokens; - uint[] memory curTokenBalances = _getTokenBalances(staker, tokens); + uint256[] memory curTokenBalances = _getTokenBalances(staker, tokens); // Use timewarp to get previous token balances - uint[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); + uint256[] memory prevTokenBalances = _getPrevTokenBalances(staker, tokens); - for (uint i = 0; i < tokens.length; i++) { + for (uint256 i = 0; i < tokens.length; i++) { assertEq(prevTokenBalances[i], curTokenBalances[i], err); } } - /******************************************************************************* - SNAPSHOT ASSERTIONS: QUEUED WITHDRAWALS - *******************************************************************************/ - + /** + * + * SNAPSHOT ASSERTIONS: QUEUED WITHDRAWALS + * + */ function assert_Snap_Added_QueuedWithdrawals( - User staker, + User staker, IDelegationManager.Withdrawal[] memory withdrawals, string memory err ) internal { - uint curQueuedWithdrawals = _getCumulativeWithdrawals(staker); + uint256 curQueuedWithdrawals = _getCumulativeWithdrawals(staker); // Use timewarp to get previous cumulative withdrawals - uint prevQueuedWithdrawals = _getPrevCumulativeWithdrawals(staker); + uint256 prevQueuedWithdrawals = _getPrevCumulativeWithdrawals(staker); assertEq(prevQueuedWithdrawals + withdrawals.length, curQueuedWithdrawals, err); } function assert_Snap_Added_QueuedWithdrawal( - User staker, - IDelegationManager.Withdrawal memory /*withdrawal*/, + User staker, + IDelegationManager.Withdrawal memory, /*withdrawal*/ string memory err ) internal { - uint curQueuedWithdrawal = _getCumulativeWithdrawals(staker); + uint256 curQueuedWithdrawal = _getCumulativeWithdrawals(staker); // Use timewarp to get previous cumulative withdrawals - uint prevQueuedWithdrawal = _getPrevCumulativeWithdrawals(staker); + uint256 prevQueuedWithdrawal = _getPrevCumulativeWithdrawals(staker); assertEq(prevQueuedWithdrawal + 1, curQueuedWithdrawal, err); } - /******************************************************************************* - SNAPSHOT ASSERTIONS: EIGENPODS - *******************************************************************************/ - - function assert_Snap_Added_ActiveValidatorCount( - User staker, - uint addedValidators, - string memory err - ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + /** + * + * SNAPSHOT ASSERTIONS: EIGENPODS + * + */ + function assert_Snap_Added_ActiveValidatorCount(User staker, uint256 addedValidators, string memory err) internal { + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(prevActiveValidatorCount + addedValidators, curActiveValidatorCount, err); } function assert_Snap_Removed_ActiveValidatorCount( User staker, - uint exitedValidators, + uint256 exitedValidators, string memory err ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(curActiveValidatorCount + exitedValidators, prevActiveValidatorCount, err); } - function assert_Snap_Unchanged_ActiveValidatorCount( - User staker, - string memory err - ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + function assert_Snap_Unchanged_ActiveValidatorCount(User staker, string memory err) internal { + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(curActiveValidatorCount, prevActiveValidatorCount, err); } @@ -694,7 +690,7 @@ abstract contract IntegrationBase is IntegrationDeployer { IEigenPod.VALIDATOR_STATUS[] memory curStatuses = _getValidatorStatuses(staker, pubkeyHashes); IEigenPod.VALIDATOR_STATUS[] memory prevStatuses = _getPrevValidatorStatuses(staker, pubkeyHashes); - for (uint i = 0; i < curStatuses.length; i++) { + for (uint256 i = 0; i < curStatuses.length; i++) { assertTrue(prevStatuses[i] == IEigenPod.VALIDATOR_STATUS.INACTIVE, err); assertTrue(curStatuses[i] == IEigenPod.VALIDATOR_STATUS.ACTIVE, err); } @@ -710,16 +706,13 @@ abstract contract IntegrationBase is IntegrationDeployer { IEigenPod.VALIDATOR_STATUS[] memory curStatuses = _getValidatorStatuses(staker, pubkeyHashes); IEigenPod.VALIDATOR_STATUS[] memory prevStatuses = _getPrevValidatorStatuses(staker, pubkeyHashes); - for (uint i = 0; i < curStatuses.length; i++) { + for (uint256 i = 0; i < curStatuses.length; i++) { assertTrue(prevStatuses[i] == IEigenPod.VALIDATOR_STATUS.ACTIVE, err); assertTrue(curStatuses[i] == IEigenPod.VALIDATOR_STATUS.WITHDRAWN, err); } } - function assert_Snap_Created_Checkpoint( - User staker, - string memory err - ) internal { + function assert_Snap_Created_Checkpoint(User staker, string memory err) internal { uint64 curCheckpointTimestamp = _getCheckpointTimestamp(staker); uint64 prevCheckpointTimestamp = _getPrevCheckpointTimestamp(staker); @@ -727,10 +720,7 @@ abstract contract IntegrationBase is IntegrationDeployer { assertTrue(curCheckpointTimestamp != 0, err); } - function assert_Snap_Removed_Checkpoint( - User staker, - string memory err - ) internal { + function assert_Snap_Removed_Checkpoint(User staker, string memory err) internal { uint64 curCheckpointTimestamp = _getCheckpointTimestamp(staker); uint64 prevCheckpointTimestamp = _getPrevCheckpointTimestamp(staker); @@ -738,20 +728,14 @@ abstract contract IntegrationBase is IntegrationDeployer { assertTrue(prevCheckpointTimestamp != 0, err); } - function assert_Snap_Unchanged_Checkpoint( - User staker, - string memory err - ) internal { + function assert_Snap_Unchanged_Checkpoint(User staker, string memory err) internal { uint64 curCheckpointTimestamp = _getCheckpointTimestamp(staker); uint64 prevCheckpointTimestamp = _getPrevCheckpointTimestamp(staker); assertEq(curCheckpointTimestamp, prevCheckpointTimestamp, err); } - function assert_Snap_Updated_LastCheckpoint( - User staker, - string memory err - ) internal { + function assert_Snap_Updated_LastCheckpoint(User staker, string memory err) internal { // Sorry for the confusing naming... the pod variable is called `lastCheckpointTimestamp` uint64 curLastCheckpointTimestamp = _getLastCheckpointTimestamp(staker); uint64 prevLastCheckpointTimestamp = _getPrevLastCheckpointTimestamp(staker); @@ -759,10 +743,7 @@ abstract contract IntegrationBase is IntegrationDeployer { assertTrue(curLastCheckpointTimestamp > prevLastCheckpointTimestamp, err); } - function assert_Snap_Added_PodBalanceToWithdrawable( - User staker, - string memory err - ) internal { + function assert_Snap_Added_PodBalanceToWithdrawable(User staker, string memory err) internal { uint64 curWithdrawableRestakedGwei = _getWithdrawableRestakedGwei(staker); uint64 prevWithdrawableRestakedGwei = _getPrevWithdrawableRestakedGwei(staker); @@ -771,22 +752,14 @@ abstract contract IntegrationBase is IntegrationDeployer { assertEq(prevWithdrawableRestakedGwei + prevCheckpointPodBalanceGwei, curWithdrawableRestakedGwei, err); } - function assert_Snap_Added_WithdrawableGwei( - User staker, - uint64 addedGwei, - string memory err - ) internal { + function assert_Snap_Added_WithdrawableGwei(User staker, uint64 addedGwei, string memory err) internal { uint64 curWithdrawableRestakedGwei = _getWithdrawableRestakedGwei(staker); uint64 prevWithdrawableRestakedGwei = _getPrevWithdrawableRestakedGwei(staker); assertEq(prevWithdrawableRestakedGwei + addedGwei, curWithdrawableRestakedGwei, err); } - function assert_Snap_Added_BalanceExitedGwei( - User staker, - uint64 addedGwei, - string memory err - ) internal { + function assert_Snap_Added_BalanceExitedGwei(User staker, uint64 addedGwei, string memory err) internal { uint64 curCheckpointTimestamp = _getCheckpointTimestamp(staker); uint64 prevCheckpointTimestamp = _getPrevCheckpointTimestamp(staker); @@ -803,31 +776,32 @@ abstract contract IntegrationBase is IntegrationDeployer { assertEq(prevExitedBalanceGwei + addedGwei, curExitedBalanceGwei, err); } - /******************************************************************************* - UTILITY METHODS - *******************************************************************************/ - + /** + * + * UTILITY METHODS + * + */ function _randWithdrawal( - IStrategy[] memory strategies, - uint[] memory shares - ) internal returns (IStrategy[] memory, uint[] memory) { - uint stratsToWithdraw = _randUint({ min: 1, max: strategies.length }); + IStrategy[] memory strategies, + uint256[] memory shares + ) internal returns (IStrategy[] memory, uint256[] memory) { + uint256 stratsToWithdraw = _randUint({min: 1, max: strategies.length}); IStrategy[] memory withdrawStrats = new IStrategy[](stratsToWithdraw); - uint[] memory withdrawShares = new uint[](stratsToWithdraw); + uint256[] memory withdrawShares = new uint256[](stratsToWithdraw); - for (uint i = 0; i < stratsToWithdraw; i++) { - uint sharesToWithdraw; + for (uint256 i = 0; i < stratsToWithdraw; i++) { + uint256 sharesToWithdraw; if (strategies[i] == BEACONCHAIN_ETH_STRAT) { // For native eth, withdraw a random amount of gwei (at least 1) - uint portion = _randUint({ min: 1, max: shares[i] / GWEI_TO_WEI }); + uint256 portion = _randUint({min: 1, max: shares[i] / GWEI_TO_WEI}); portion *= GWEI_TO_WEI; sharesToWithdraw = shares[i] - portion; } else { // For LSTs, withdraw a random amount of shares (at least 1) - uint portion = _randUint({ min: 1, max: shares[i] }); + uint256 portion = _randUint({min: 1, max: shares[i]}); sharesToWithdraw = shares[i] - portion; } @@ -845,20 +819,19 @@ abstract contract IntegrationBase is IntegrationDeployer { function _randBalanceUpdate( User staker, IStrategy[] memory strategies - ) internal returns (int[] memory, int[] memory, int[] memory) { + ) internal returns (int256[] memory, int256[] memory, int256[] memory) { + int256[] memory tokenDeltas = new int256[](strategies.length); + int256[] memory stakerShareDeltas = new int256[](strategies.length); + int256[] memory operatorShareDeltas = new int256[](strategies.length); - int[] memory tokenDeltas = new int[](strategies.length); - int[] memory stakerShareDeltas = new int[](strategies.length); - int[] memory operatorShareDeltas = new int[](strategies.length); - - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { // For native ETH, we're either going to slash the staker's validators, // or award them consensus rewards. In either case, the magnitude of // the balance update depends on the staker's active validator count - uint activeValidatorCount = staker.pod().activeValidatorCount(); + uint256 activeValidatorCount = staker.pod().activeValidatorCount(); int64 deltaGwei; if (_randBool()) { uint40[] memory validators = staker.getActiveValidators(); @@ -874,38 +847,38 @@ abstract contract IntegrationBase is IntegrationDeployer { deltaGwei = int64(uint64(activeValidatorCount) * beaconChain.CONSENSUS_REWARD_AMOUNT_GWEI()); beaconChain.advanceEpoch_NoWithdraw(); } - - tokenDeltas[i] = int(deltaGwei) * int(GWEI_TO_WEI); + + tokenDeltas[i] = int256(deltaGwei) * int256(GWEI_TO_WEI); stakerShareDeltas[i] = tokenDeltas[i]; operatorShareDeltas[i] = _calcNativeETHOperatorShareDelta(staker, stakerShareDeltas[i]); emit log_named_int("beacon balance delta (gwei): ", deltaGwei); - emit log_named_int("staker share delta (gwei): ", stakerShareDeltas[i] / int(GWEI_TO_WEI)); - emit log_named_int("operator share delta (gwei): ", operatorShareDeltas[i] / int(GWEI_TO_WEI)); + emit log_named_int("staker share delta (gwei): ", stakerShareDeltas[i] / int256(GWEI_TO_WEI)); + emit log_named_int("operator share delta (gwei): ", operatorShareDeltas[i] / int256(GWEI_TO_WEI)); } else { // For LSTs, mint a random token amount - uint portion = _randUint({ min: MIN_BALANCE, max: MAX_BALANCE }); + uint256 portion = _randUint({min: MIN_BALANCE, max: MAX_BALANCE}); StdCheats.deal(address(strat.underlyingToken()), address(staker), portion); - int delta = int(portion); + int256 delta = int256(portion); tokenDeltas[i] = delta; - stakerShareDeltas[i] = int(strat.underlyingToShares(uint(delta))); - operatorShareDeltas[i] = int(strat.underlyingToShares(uint(delta))); + stakerShareDeltas[i] = int256(strat.underlyingToShares(uint256(delta))); + operatorShareDeltas[i] = int256(strat.underlyingToShares(uint256(delta))); } } return (tokenDeltas, stakerShareDeltas, operatorShareDeltas); } - function _calcNativeETHOperatorShareDelta(User staker, int shareDelta) internal view returns (int) { - int curPodOwnerShares = eigenPodManager.podOwnerShares(address(staker)); - int newPodOwnerShares = curPodOwnerShares + shareDelta; + function _calcNativeETHOperatorShareDelta(User staker, int256 shareDelta) internal view returns (int256) { + int256 curPodOwnerShares = eigenPodManager.podOwnerShares(address(staker)); + int256 newPodOwnerShares = curPodOwnerShares + shareDelta; if (curPodOwnerShares <= 0) { // if the shares started negative and stayed negative, then there cannot have been an increase in delegateable shares if (newPodOwnerShares <= 0) { return 0; - // if the shares started negative and became positive, then the increase in delegateable shares is the ending share amount + // if the shares started negative and became positive, then the increase in delegateable shares is the ending share amount } else { return newPodOwnerShares; } @@ -913,8 +886,8 @@ abstract contract IntegrationBase is IntegrationDeployer { // if the shares started positive and became negative, then the decrease in delegateable shares is the starting share amount if (newPodOwnerShares <= 0) { return (-curPodOwnerShares); - // if the shares started positive and stayed positive, then the change in delegateable shares - // is the difference between starting and ending amounts + // if the shares started positive and stayed positive, then the change in delegateable shares + // is the difference between starting and ending amounts } else { return (newPodOwnerShares - curPodOwnerShares); } @@ -923,13 +896,16 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev For some strategies/underlying token balances, calculate the expected shares received /// from depositing all tokens - function _calculateExpectedShares(IStrategy[] memory strategies, uint[] memory tokenBalances) internal returns (uint[] memory) { - uint[] memory expectedShares = new uint[](strategies.length); + function _calculateExpectedShares( + IStrategy[] memory strategies, + uint256[] memory tokenBalances + ) internal returns (uint256[] memory) { + uint256[] memory expectedShares = new uint256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - uint tokenBalance = tokenBalances[i]; + uint256 tokenBalance = tokenBalances[i]; if (strat == BEACONCHAIN_ETH_STRAT) { expectedShares[i] = tokenBalance; } else { @@ -942,10 +918,13 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev For some strategies/underlying token balances, calculate the expected shares received /// from depositing all tokens - function _calculateExpectedTokens(IStrategy[] memory strategies, uint[] memory shares) internal returns (uint[] memory) { - uint[] memory expectedTokens = new uint[](strategies.length); + function _calculateExpectedTokens( + IStrategy[] memory strategies, + uint256[] memory shares + ) internal returns (uint256[] memory) { + uint256[] memory expectedTokens = new uint256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { @@ -963,7 +942,7 @@ abstract contract IntegrationBase is IntegrationDeployer { ) internal view returns (bytes32[] memory) { bytes32[] memory withdrawalRoots = new bytes32[](withdrawals.length); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { withdrawalRoots[i] = delegationManager.calculateWithdrawalRoot(withdrawals[i]); } @@ -971,10 +950,12 @@ abstract contract IntegrationBase is IntegrationDeployer { } /// @dev Converts a list of strategies to underlying tokens - function _getUnderlyingTokens(IStrategy[] memory strategies) internal view returns (IERC20[] memory) { + function _getUnderlyingTokens( + IStrategy[] memory strategies + ) internal view returns (IERC20[] memory) { IERC20[] memory tokens = new IERC20[](strategies.length); - for (uint i = 0; i < tokens.length; i++) { + for (uint256 i = 0; i < tokens.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { @@ -988,14 +969,16 @@ abstract contract IntegrationBase is IntegrationDeployer { } modifier timewarp() { - uint curState = timeMachine.warpToLast(); + uint256 curState = timeMachine.warpToLast(); _; timeMachine.warpToPresent(curState); } /// @dev Given a list of strategies, roll the block number forward to the /// a valid blocknumber to completeWithdrawals - function _rollBlocksForCompleteWithdrawals(IStrategy[] memory strategies) internal { + function _rollBlocksForCompleteWithdrawals( + IStrategy[] memory strategies + ) internal { // uint256 blocksToRoll = delegationManager.minWithdrawalDelayBlocks(); // for (uint i = 0; i < strategies.length; i++) { // uint256 withdrawalDelayBlocks = delegationManager.strategyWithdrawalDelayBlocks(strategies[i]); @@ -1008,17 +991,20 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Uses timewarp modifier to get operator shares at the last snapshot function _getPrevOperatorShares( - User operator, + User operator, IStrategy[] memory strategies - ) internal timewarp() returns (uint[] memory) { + ) internal timewarp returns (uint256[] memory) { return _getOperatorShares(operator, strategies); } /// @dev Looks up each strategy and returns a list of the operator's shares - function _getOperatorShares(User operator, IStrategy[] memory strategies) internal view returns (uint[] memory) { - uint[] memory curShares = new uint[](strategies.length); + function _getOperatorShares( + User operator, + IStrategy[] memory strategies + ) internal view returns (uint256[] memory) { + uint256[] memory curShares = new uint256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { curShares[i] = delegationManager.operatorShares(address(operator), strategies[i]); } @@ -1027,29 +1013,29 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Uses timewarp modifier to get staker shares at the last snapshot function _getPrevStakerShares( - User staker, + User staker, IStrategy[] memory strategies - ) internal timewarp() returns (uint[] memory) { + ) internal timewarp returns (uint256[] memory) { return _getStakerShares(staker, strategies); } /// @dev Looks up each strategy and returns a list of the staker's shares - function _getStakerShares(User staker, IStrategy[] memory strategies) internal view returns (uint[] memory) { - uint[] memory curShares = new uint[](strategies.length); + function _getStakerShares(User staker, IStrategy[] memory strategies) internal view returns (uint256[] memory) { + uint256[] memory curShares = new uint256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { // This method should only be used for tests that handle positive // balances. Negative balances are an edge case that require // the own tests and helper methods. - int shares = eigenPodManager.podOwnerShares(address(staker)); + int256 shares = eigenPodManager.podOwnerShares(address(staker)); if (shares < 0) { revert("_getStakerShares: negative shares"); } - curShares[i] = uint(shares); + curShares[i] = uint256(shares); } else { curShares[i] = strategyManager.stakerStrategyShares(address(staker), strat); } @@ -1060,45 +1046,49 @@ abstract contract IntegrationBase is IntegrationDeployer { /// @dev Uses timewarp modifier to get staker shares at the last snapshot function _getPrevStakerSharesInt( - User staker, + User staker, IStrategy[] memory strategies - ) internal timewarp() returns (int[] memory) { + ) internal timewarp returns (int256[] memory) { return _getStakerSharesInt(staker, strategies); } /// @dev Looks up each strategy and returns a list of the staker's shares - function _getStakerSharesInt(User staker, IStrategy[] memory strategies) internal view returns (int[] memory) { - int[] memory curShares = new int[](strategies.length); + function _getStakerSharesInt(User staker, IStrategy[] memory strategies) internal view returns (int256[] memory) { + int256[] memory curShares = new int256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { curShares[i] = eigenPodManager.podOwnerShares(address(staker)); } else { - curShares[i] = int(strategyManager.stakerStrategyShares(address(staker), strat)); + curShares[i] = int256(strategyManager.stakerStrategyShares(address(staker), strat)); } } return curShares; } - function _getPrevCumulativeWithdrawals(User staker) internal timewarp() returns (uint) { + function _getPrevCumulativeWithdrawals( + User staker + ) internal timewarp returns (uint256) { return _getCumulativeWithdrawals(staker); } - function _getCumulativeWithdrawals(User staker) internal view returns (uint) { + function _getCumulativeWithdrawals( + User staker + ) internal view returns (uint256) { return delegationManager.cumulativeWithdrawalsQueued(address(staker)); } - function _getPrevTokenBalances(User staker, IERC20[] memory tokens) internal timewarp() returns (uint[] memory) { + function _getPrevTokenBalances(User staker, IERC20[] memory tokens) internal timewarp returns (uint256[] memory) { return _getTokenBalances(staker, tokens); } - function _getTokenBalances(User staker, IERC20[] memory tokens) internal view returns (uint[] memory) { - uint[] memory balances = new uint[](tokens.length); + function _getTokenBalances(User staker, IERC20[] memory tokens) internal view returns (uint256[] memory) { + uint256[] memory balances = new uint256[](tokens.length); - for (uint i = 0; i < tokens.length; i++) { + for (uint256 i = 0; i < tokens.length; i++) { if (tokens[i] == NATIVE_ETH) { balances[i] = address(staker).balance; } else { @@ -1109,14 +1099,18 @@ abstract contract IntegrationBase is IntegrationDeployer { return balances; } - function _getPrevTotalStrategyShares(IStrategy[] memory strategies) internal timewarp() returns (uint[] memory) { + function _getPrevTotalStrategyShares( + IStrategy[] memory strategies + ) internal timewarp returns (uint256[] memory) { return _getTotalStrategyShares(strategies); } - function _getTotalStrategyShares(IStrategy[] memory strategies) internal view returns (uint[] memory) { - uint[] memory shares = new uint[](strategies.length); + function _getTotalStrategyShares( + IStrategy[] memory strategies + ) internal view returns (uint256[] memory) { + uint256[] memory shares = new uint256[](strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { if (strategies[i] != BEACONCHAIN_ETH_STRAT) { shares[i] = strategies[i].totalShares(); } @@ -1126,63 +1120,89 @@ abstract contract IntegrationBase is IntegrationDeployer { return shares; } - function _getActiveValidatorCount(User staker) internal view returns (uint) { + function _getActiveValidatorCount( + User staker + ) internal view returns (uint256) { EigenPod pod = staker.pod(); return pod.activeValidatorCount(); } - function _getPrevActiveValidatorCount(User staker) internal timewarp() returns (uint) { + function _getPrevActiveValidatorCount( + User staker + ) internal timewarp returns (uint256) { return _getActiveValidatorCount(staker); } - function _getValidatorStatuses(User staker, bytes32[] memory pubkeyHashes) internal view returns (IEigenPod.VALIDATOR_STATUS[] memory) { + function _getValidatorStatuses( + User staker, + bytes32[] memory pubkeyHashes + ) internal view returns (IEigenPod.VALIDATOR_STATUS[] memory) { EigenPod pod = staker.pod(); IEigenPod.VALIDATOR_STATUS[] memory statuses = new IEigenPod.VALIDATOR_STATUS[](pubkeyHashes.length); - for (uint i = 0; i < statuses.length; i++) { + for (uint256 i = 0; i < statuses.length; i++) { statuses[i] = pod.validatorStatus(pubkeyHashes[i]); } return statuses; } - function _getPrevValidatorStatuses(User staker, bytes32[] memory pubkeyHashes) internal timewarp() returns (IEigenPod.VALIDATOR_STATUS[] memory) { + function _getPrevValidatorStatuses( + User staker, + bytes32[] memory pubkeyHashes + ) internal timewarp returns (IEigenPod.VALIDATOR_STATUS[] memory) { return _getValidatorStatuses(staker, pubkeyHashes); } - function _getCheckpointTimestamp(User staker) internal view returns (uint64) { + function _getCheckpointTimestamp( + User staker + ) internal view returns (uint64) { EigenPod pod = staker.pod(); return pod.currentCheckpointTimestamp(); } - function _getPrevCheckpointTimestamp(User staker) internal timewarp() returns (uint64) { + function _getPrevCheckpointTimestamp( + User staker + ) internal timewarp returns (uint64) { return _getCheckpointTimestamp(staker); } - function _getLastCheckpointTimestamp(User staker) internal view returns (uint64) { + function _getLastCheckpointTimestamp( + User staker + ) internal view returns (uint64) { EigenPod pod = staker.pod(); return pod.lastCheckpointTimestamp(); } - function _getPrevLastCheckpointTimestamp(User staker) internal timewarp() returns (uint64) { + function _getPrevLastCheckpointTimestamp( + User staker + ) internal timewarp returns (uint64) { return _getLastCheckpointTimestamp(staker); } - function _getWithdrawableRestakedGwei(User staker) internal view returns (uint64) { + function _getWithdrawableRestakedGwei( + User staker + ) internal view returns (uint64) { EigenPod pod = staker.pod(); return pod.withdrawableRestakedExecutionLayerGwei(); } - function _getPrevWithdrawableRestakedGwei(User staker) internal timewarp() returns (uint64) { + function _getPrevWithdrawableRestakedGwei( + User staker + ) internal timewarp returns (uint64) { return _getWithdrawableRestakedGwei(staker); } - function _getCheckpointPodBalanceGwei(User staker) internal view returns (uint64) { + function _getCheckpointPodBalanceGwei( + User staker + ) internal view returns (uint64) { EigenPod pod = staker.pod(); return uint64(pod.currentCheckpoint().podBalanceGwei); } - function _getPrevCheckpointPodBalanceGwei(User staker) internal timewarp() returns (uint64) { + function _getPrevCheckpointPodBalanceGwei( + User staker + ) internal timewarp returns (uint64) { return _getCheckpointPodBalanceGwei(staker); } @@ -1191,7 +1211,10 @@ abstract contract IntegrationBase is IntegrationDeployer { return pod.checkpointBalanceExitedGwei(checkpointTimestamp); } - function _getPrevCheckpointBalanceExited(User staker, uint64 checkpointTimestamp) internal timewarp() returns (uint64) { + function _getPrevCheckpointBalanceExited( + User staker, + uint64 checkpointTimestamp + ) internal timewarp returns (uint64) { return _getCheckpointBalanceExited(staker, checkpointTimestamp); } -} \ No newline at end of file +} diff --git a/src/test/integration/IntegrationChecks.t.sol b/src/test/integration/IntegrationChecks.t.sol index 2fc360581..cf356d0cb 100644 --- a/src/test/integration/IntegrationChecks.t.sol +++ b/src/test/integration/IntegrationChecks.t.sol @@ -7,19 +7,19 @@ import "src/test/integration/users/User_M1.t.sol"; /// @notice Contract that provides utility functions to reuse common test blocks & checks contract IntegrationCheckUtils is IntegrationBase { - - /******************************************************************************* - EIGENPOD CHECKS - *******************************************************************************/ - - function check_VerifyWC_State( - User staker, - uint40[] memory validators, - uint64 beaconBalanceGwei - ) internal { - uint beaconBalanceWei = beaconBalanceGwei * GWEI_TO_WEI; - assert_Snap_Added_StakerShares(staker, BEACONCHAIN_ETH_STRAT, beaconBalanceWei, "staker should have added shares to beacon chain strat"); - assert_Snap_Added_ActiveValidatorCount(staker, validators.length, "staker should have increased active validator count"); + /** + * + * EIGENPOD CHECKS + * + */ + function check_VerifyWC_State(User staker, uint40[] memory validators, uint64 beaconBalanceGwei) internal { + uint256 beaconBalanceWei = beaconBalanceGwei * GWEI_TO_WEI; + assert_Snap_Added_StakerShares( + staker, BEACONCHAIN_ETH_STRAT, beaconBalanceWei, "staker should have added shares to beacon chain strat" + ); + assert_Snap_Added_ActiveValidatorCount( + staker, validators.length, "staker should have increased active validator count" + ); assert_Snap_Added_ActiveValidators(staker, validators, "validators should each be active"); } @@ -30,22 +30,18 @@ contract IntegrationCheckUtils is IntegrationBase { assert_Snap_Created_Checkpoint(staker, "staker should have created a new checkpoint"); } - function check_StartCheckpoint_WithPodBalance_State( - User staker, - uint64 expectedPodBalanceGwei - ) internal { + function check_StartCheckpoint_WithPodBalance_State(User staker, uint64 expectedPodBalanceGwei) internal { check_StartCheckpoint_State(staker); assert_CheckpointPodBalance(staker, expectedPodBalanceGwei, "checkpoint podBalanceGwei should equal expected"); } - function check_StartCheckpoint_NoValidators_State( - User staker, - uint64 sharesAddedGwei - ) internal { - assert_Snap_Added_StakerShares(staker, BEACONCHAIN_ETH_STRAT, sharesAddedGwei * GWEI_TO_WEI, "should have added staker shares"); + function check_StartCheckpoint_NoValidators_State(User staker, uint64 sharesAddedGwei) internal { + assert_Snap_Added_StakerShares( + staker, BEACONCHAIN_ETH_STRAT, sharesAddedGwei * GWEI_TO_WEI, "should have added staker shares" + ); assert_Snap_Added_WithdrawableGwei(staker, sharesAddedGwei, "should have added to withdrawable restaked gwei"); - + assert_Snap_Unchanged_ActiveValidatorCount(staker, "active validator count should remain 0"); assert_Snap_Updated_LastCheckpoint(staker, "last checkpoint timestamp should have increased"); assert_Snap_Unchanged_Checkpoint(staker, "current checkpoint timestamp should be unchanged"); @@ -56,26 +52,26 @@ contract IntegrationCheckUtils is IntegrationBase { ) internal { assert_Snap_Removed_Checkpoint(staker, "should have deleted active checkpoint"); assert_Snap_Updated_LastCheckpoint(staker, "last checkpoint timestamp should be updated"); - assert_Snap_Added_PodBalanceToWithdrawable(staker, "pod balance should have been added to withdrawable restaked exec layer gwei"); + assert_Snap_Added_PodBalanceToWithdrawable( + staker, "pod balance should have been added to withdrawable restaked exec layer gwei" + ); } - function check_CompleteCheckpoint_EarnOnBeacon_State( - User staker, - uint64 beaconBalanceAdded - ) internal { + function check_CompleteCheckpoint_EarnOnBeacon_State(User staker, uint64 beaconBalanceAdded) internal { check_CompleteCheckpoint_State(staker); - uint balanceAddedWei = beaconBalanceAdded * GWEI_TO_WEI; - assert_Snap_Added_StakerShares(staker, BEACONCHAIN_ETH_STRAT, balanceAddedWei, "should have increased shares by excess beacon balance"); + uint256 balanceAddedWei = beaconBalanceAdded * GWEI_TO_WEI; + assert_Snap_Added_StakerShares( + staker, BEACONCHAIN_ETH_STRAT, balanceAddedWei, "should have increased shares by excess beacon balance" + ); } - function check_CompleteCheckpoint_WithPodBalance_State( - User staker, - uint64 expectedPodBalanceGwei - ) internal { + function check_CompleteCheckpoint_WithPodBalance_State(User staker, uint64 expectedPodBalanceGwei) internal { check_CompleteCheckpoint_State(staker); - assert_Snap_Added_WithdrawableGwei(staker, expectedPodBalanceGwei, "should have added expected gwei to withdrawable restaked exec layer gwei"); + assert_Snap_Added_WithdrawableGwei( + staker, expectedPodBalanceGwei, "should have added expected gwei to withdrawable restaked exec layer gwei" + ); } function check_CompleteCheckpoint_WithSlashing_State( @@ -85,18 +81,27 @@ contract IntegrationCheckUtils is IntegrationBase { ) internal { check_CompleteCheckpoint_State(staker); - assert_Snap_Removed_StakerShares(staker, BEACONCHAIN_ETH_STRAT, slashedAmountGwei * GWEI_TO_WEI, "should have reduced shares by slashed amount"); - assert_Snap_Removed_ActiveValidatorCount(staker, slashedValidators.length, "should have decreased active validator count"); + assert_Snap_Removed_StakerShares( + staker, + BEACONCHAIN_ETH_STRAT, + slashedAmountGwei * GWEI_TO_WEI, + "should have reduced shares by slashed amount" + ); + assert_Snap_Removed_ActiveValidatorCount( + staker, slashedValidators.length, "should have decreased active validator count" + ); assert_Snap_Removed_ActiveValidators(staker, slashedValidators, "exited validators should each be WITHDRAWN"); } - function check_CompleteCheckpoint_WithCLSlashing_State( - User staker, - uint64 slashedAmountGwei - ) internal { + function check_CompleteCheckpoint_WithCLSlashing_State(User staker, uint64 slashedAmountGwei) internal { check_CompleteCheckpoint_State(staker); - assert_Snap_Removed_StakerShares(staker, BEACONCHAIN_ETH_STRAT, slashedAmountGwei * GWEI_TO_WEI, "should have reduced shares by slashed amount"); + assert_Snap_Removed_StakerShares( + staker, + BEACONCHAIN_ETH_STRAT, + slashedAmountGwei * GWEI_TO_WEI, + "should have reduced shares by slashed amount" + ); assert_Snap_Unchanged_ActiveValidatorCount(staker, "should not have changed active validator count"); } @@ -108,20 +113,21 @@ contract IntegrationCheckUtils is IntegrationBase { check_CompleteCheckpoint_WithPodBalance_State(staker, exitedBalanceGwei); assert_Snap_Unchanged_StakerShares(staker, "staker should not have changed shares"); - assert_Snap_Added_BalanceExitedGwei(staker, exitedBalanceGwei, "should have attributed expected gwei to exited balance"); - assert_Snap_Removed_ActiveValidatorCount(staker, exitedValidators.length, "should have decreased active validator count"); + assert_Snap_Added_BalanceExitedGwei( + staker, exitedBalanceGwei, "should have attributed expected gwei to exited balance" + ); + assert_Snap_Removed_ActiveValidatorCount( + staker, exitedValidators.length, "should have decreased active validator count" + ); assert_Snap_Removed_ActiveValidators(staker, exitedValidators, "exited validators should each be WITHDRAWN"); } - /******************************************************************************* - LST/DELEGATION CHECKS - *******************************************************************************/ - - function check_Deposit_State( - User staker, - IStrategy[] memory strategies, - uint[] memory shares - ) internal { + /** + * + * LST/DELEGATION CHECKS + * + */ + function check_Deposit_State(User staker, IStrategy[] memory strategies, uint256[] memory shares) internal { /// Deposit into strategies: // For each of the assets held by the staker (either StrategyManager or EigenPodManager), // the staker calls the relevant deposit function, depositing all held assets. @@ -129,44 +135,58 @@ contract IntegrationCheckUtils is IntegrationBase { // ... check that all underlying tokens were transferred to the correct destination // and that the staker now has the expected amount of delegated shares in each strategy assert_HasNoUnderlyingTokenBalance(staker, strategies, "staker should have transferred all underlying tokens"); - assert_Snap_Added_StakerShares(staker, strategies, shares, "staker should expect shares in each strategy after depositing"); + assert_Snap_Added_StakerShares( + staker, strategies, shares, "staker should expect shares in each strategy after depositing" + ); } - - function check_Deposit_State_PartialDeposit(User staker, IStrategy[] memory strategies, uint[] memory shares, uint[] memory tokenBalances) internal { + function check_Deposit_State_PartialDeposit( + User staker, + IStrategy[] memory strategies, + uint256[] memory shares, + uint256[] memory tokenBalances + ) internal { /// Deposit into strategies: // For each of the assets held by the staker (either StrategyManager or EigenPodManager), // the staker calls the relevant deposit function, depositing some subset of held assets // // ... check that some underlying tokens were transferred to the correct destination // and that the staker now has the expected amount of delegated shares in each strategy - assert_HasUnderlyingTokenBalances(staker, strategies, tokenBalances, "staker should have transferred some underlying tokens"); - assert_Snap_Added_StakerShares(staker, strategies, shares, "staker should expected shares in each strategy after depositing"); + assert_HasUnderlyingTokenBalances( + staker, strategies, tokenBalances, "staker should have transferred some underlying tokens" + ); + assert_Snap_Added_StakerShares( + staker, strategies, shares, "staker should expected shares in each strategy after depositing" + ); } function check_Delegation_State( - User staker, - User operator, - IStrategy[] memory strategies, - uint[] memory shares + User staker, + User operator, + IStrategy[] memory strategies, + uint256[] memory shares ) internal { /// Delegate to an operator: // // ... check that the staker is now delegated to the operator, and that the operator // was awarded the staker shares assertTrue(delegationManager.isDelegated(address(staker)), "staker should be delegated"); - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should be delegated to operator"); - assert_HasExpectedShares(staker, strategies, shares, "staker should still have expected shares after delegating"); + assertEq( + address(operator), delegationManager.delegatedTo(address(staker)), "staker should be delegated to operator" + ); + assert_HasExpectedShares( + staker, strategies, shares, "staker should still have expected shares after delegating" + ); assert_Snap_Unchanged_StakerShares(staker, "staker shares should be unchanged after delegating"); assert_Snap_Added_OperatorShares(operator, strategies, shares, "operator should have received shares"); } function check_QueuedWithdrawal_State( - User staker, - User operator, - IStrategy[] memory strategies, - uint[] memory shares, - IDelegationManager.Withdrawal[] memory withdrawals, + User staker, + User operator, + IStrategy[] memory strategies, + uint256[] memory shares, + IDelegationManager.Withdrawal[] memory withdrawals, bytes32[] memory withdrawalRoots ) internal { // The staker will queue one or more withdrawals for the selected strategies and shares @@ -174,44 +194,61 @@ contract IntegrationCheckUtils is IntegrationBase { // ... check that each withdrawal was successfully enqueued, that the returned roots // match the hashes of each withdrawal, and that the staker and operator have // reduced shares. - assertEq(withdrawalRoots.length, 1, "check_QueuedWithdrawal_State: should only have 1 withdrawal root after queueing"); - assert_AllWithdrawalsPending(withdrawalRoots, - "check_QueuedWithdrawal_State: staker withdrawals should now be pending"); - assert_ValidWithdrawalHashes(withdrawals, withdrawalRoots, - "check_QueuedWithdrawal_State: calculated withdrawals should match returned roots"); - assert_Snap_Added_QueuedWithdrawals(staker, withdrawals, - "check_QueuedWithdrawal_State: staker should have increased nonce by withdrawals.length"); - assert_Snap_Removed_OperatorShares(operator, strategies, shares, - "check_QueuedWithdrawal_State: failed to remove operator shares"); - assert_Snap_Removed_StakerShares(staker, strategies, shares, - "check_QueuedWithdrawal_State: failed to remove staker shares"); + assertEq( + withdrawalRoots.length, 1, "check_QueuedWithdrawal_State: should only have 1 withdrawal root after queueing" + ); + assert_AllWithdrawalsPending( + withdrawalRoots, "check_QueuedWithdrawal_State: staker withdrawals should now be pending" + ); + assert_ValidWithdrawalHashes( + withdrawals, + withdrawalRoots, + "check_QueuedWithdrawal_State: calculated withdrawals should match returned roots" + ); + assert_Snap_Added_QueuedWithdrawals( + staker, + withdrawals, + "check_QueuedWithdrawal_State: staker should have increased nonce by withdrawals.length" + ); + assert_Snap_Removed_OperatorShares( + operator, strategies, shares, "check_QueuedWithdrawal_State: failed to remove operator shares" + ); + assert_Snap_Removed_StakerShares( + staker, strategies, shares, "check_QueuedWithdrawal_State: failed to remove staker shares" + ); } function check_Undelegate_State( - User staker, - User operator, + User staker, + User operator, IDelegationManager.Withdrawal[] memory withdrawals, bytes32[] memory withdrawalRoots, IStrategy[] memory strategies, - uint[] memory shares + uint256[] memory shares ) internal { /// Undelegate from an operator // // ... check that the staker is undelegated, all strategies from which the staker is deposited are unqeuued, // that the returned root matches the hashes for each strategy and share amounts, and that the staker // and operator have reduced shares - assertFalse(delegationManager.isDelegated(address(staker)), - "check_Undelegate_State: staker should not be delegated"); - assert_ValidWithdrawalHashes(withdrawals, withdrawalRoots, - "check_Undelegate_State: calculated withdrawl should match returned root"); - assert_AllWithdrawalsPending(withdrawalRoots, - "check_Undelegate_State: stakers withdrawal should now be pending"); - assert_Snap_Added_QueuedWithdrawals(staker, withdrawals, - "check_Undelegate_State: staker should have increased nonce by withdrawals.length"); - assert_Snap_Removed_OperatorShares(operator, strategies, shares, - "check_Undelegate_State: failed to remove operator shares"); - assert_Snap_Removed_StakerShares(staker, strategies, shares, - "check_Undelegate_State: failed to remove staker shares"); + assertFalse( + delegationManager.isDelegated(address(staker)), "check_Undelegate_State: staker should not be delegated" + ); + assert_ValidWithdrawalHashes( + withdrawals, withdrawalRoots, "check_Undelegate_State: calculated withdrawl should match returned root" + ); + assert_AllWithdrawalsPending( + withdrawalRoots, "check_Undelegate_State: stakers withdrawal should now be pending" + ); + assert_Snap_Added_QueuedWithdrawals( + staker, withdrawals, "check_Undelegate_State: staker should have increased nonce by withdrawals.length" + ); + assert_Snap_Removed_OperatorShares( + operator, strategies, shares, "check_Undelegate_State: failed to remove operator shares" + ); + assert_Snap_Removed_StakerShares( + staker, strategies, shares, "check_Undelegate_State: failed to remove staker shares" + ); } /** @@ -229,12 +266,14 @@ contract IntegrationCheckUtils is IntegrationBase { User operator, IDelegationManager.Withdrawal memory withdrawal, IStrategy[] memory strategies, - uint[] memory shares, + uint256[] memory shares, IERC20[] memory tokens, - uint[] memory expectedTokens + uint256[] memory expectedTokens ) internal { // Common checks - assert_WithdrawalNotPending(delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending"); + assert_WithdrawalNotPending( + delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending" + ); assert_Snap_Added_TokenBalances(staker, tokens, expectedTokens, "staker should have received expected tokens"); assert_Snap_Unchanged_StakerShares(staker, "staker shares should not have changed"); assert_Snap_Removed_StrategyShares(strategies, shares, "strategies should have total shares decremented"); @@ -253,10 +292,12 @@ contract IntegrationCheckUtils is IntegrationBase { User operator, IDelegationManager.Withdrawal memory withdrawal, IStrategy[] memory strategies, - uint[] memory shares + uint256[] memory shares ) internal { // Common checks applicable to both user and non-user operator types - assert_WithdrawalNotPending(delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending"); + assert_WithdrawalNotPending( + delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending" + ); assert_Snap_Unchanged_TokenBalances(staker, "staker should not have any change in underlying token balances"); assert_Snap_Added_StakerShares(staker, strategies, shares, "staker should have received expected shares"); assert_Snap_Unchanged_StrategyShares(strategies, "strategies should have total shares unchanged"); @@ -264,9 +305,13 @@ contract IntegrationCheckUtils is IntegrationBase { // Additional checks or handling for the non-user operator scenario if (operator != User(User(payable(0)))) { if (operator != staker) { - assert_Snap_Unchanged_TokenBalances(User(operator), "operator should not have any change in underlying token balances"); + assert_Snap_Unchanged_TokenBalances( + User(operator), "operator should not have any change in underlying token balances" + ); } - assert_Snap_Added_OperatorShares(User(operator), withdrawal.strategies, withdrawal.shares, "operator should have received shares"); + assert_Snap_Added_OperatorShares( + User(operator), withdrawal.strategies, withdrawal.shares, "operator should have received shares" + ); } } @@ -276,17 +321,21 @@ contract IntegrationCheckUtils is IntegrationBase { User operator, IDelegationManager.Withdrawal memory withdrawal, IStrategy[] memory strategies, - uint[] memory shares + uint256[] memory shares ) internal { /// Complete withdrawal(s): // The staker will complete the withdrawal as shares - // + // // ... check that the withdrawal is not pending, that the token balances of the staker and operator are unchanged, // that the withdrawer received the expected shares, and that that the total shares of each o - // strategy withdrawn remains unchanged - assert_WithdrawalNotPending(delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending"); + // strategy withdrawn remains unchanged + assert_WithdrawalNotPending( + delegationManager.calculateWithdrawalRoot(withdrawal), "staker withdrawal should no longer be pending" + ); assert_Snap_Unchanged_TokenBalances(staker, "staker should not have any change in underlying token balances"); - assert_Snap_Unchanged_TokenBalances(operator, "operator should not have any change in underlying token balances"); + assert_Snap_Unchanged_TokenBalances( + operator, "operator should not have any change in underlying token balances" + ); assert_Snap_Added_StakerShares(staker, strategies, shares, "staker should have received expected shares"); assert_Snap_Unchanged_OperatorShares(operator, "operator should have shares unchanged"); assert_Snap_Unchanged_StrategyShares(strategies, "strategies should have total shares unchanged"); diff --git a/src/test/integration/IntegrationDeployer.t.sol b/src/test/integration/IntegrationDeployer.t.sol index 8181a3ee7..5dfae7e66 100644 --- a/src/test/integration/IntegrationDeployer.t.sol +++ b/src/test/integration/IntegrationDeployer.t.sol @@ -29,7 +29,6 @@ import "src/test/integration/users/User_M1.t.sol"; import "script/utils/ExistingDeploymentParser.sol"; abstract contract IntegrationDeployer is ExistingDeploymentParser { - Vm cheats = Vm(HEVM_ADDRESS); // Fork ids for specific fork tests @@ -38,12 +37,12 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { uint256 mainnetForkId; uint256 holeskyForkBLock = 1_213_950; uint256 holeskyForkId; - uint64 constant DENEB_FORK_TIMESTAMP = 1705473120; + uint64 constant DENEB_FORK_TIMESTAMP = 1_705_473_120; // Beacon chain genesis time when running locally // Multiple of 12 for sanity's sake uint64 constant GENESIS_TIME_LOCAL = 1 hours * 12; - uint64 constant GENESIS_TIME_MAINNET = 1606824023; + uint64 constant GENESIS_TIME_MAINNET = 1_606_824_023; TimeMachine public timeMachine; @@ -52,7 +51,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { // When we select random user assets, we use the `assetType` to determine // which of these lists to select user assets from. IStrategy[] lstStrats; - IStrategy[] ethStrats; // only has one strat tbh + IStrategy[] ethStrats; // only has one strat tbh IStrategy[] allStrats; // just a combination of the above 2 lists IERC20[] allTokens; // `allStrats`, but contains all of the underlying tokens instead @@ -67,7 +66,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { address eigenLayerReputedMultisig = address(this); // admin address address constant pauser = address(555); address constant unpauser = address(556); - + // Randomness state vars bytes32 random; // After calling `_configRand`, these are the allowed "variants" on users that will @@ -75,7 +74,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { bytes assetTypes; bytes userTypes; // Set only once in setUp, if FORK_MAINNET env is set - uint forkType; + uint256 forkType; // Constants uint64 constant MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR = 32e9; @@ -83,9 +82,9 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { IStrategy constant BEACONCHAIN_ETH_STRAT = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); IERC20 constant NATIVE_ETH = IERC20(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); - uint constant MIN_BALANCE = 1e6; - uint constant MAX_BALANCE = 5e6; - uint constant GWEI_TO_WEI = 1e9; + uint256 constant MIN_BALANCE = 1e6; + uint256 constant MAX_BALANCE = 5e6; + uint256 constant GWEI_TO_WEI = 1e9; // Paused Constants // DelegationManager @@ -103,26 +102,26 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { uint8 internal constant PAUSED_NON_PROOF_WITHDRAWALS = 5; // Flags - uint constant FLAG = 1; + uint256 constant FLAG = 1; /// @dev Asset flags /// These are used with _configRand to determine what assets are given /// to a user when they are created. - uint constant NO_ASSETS = (FLAG << 0); // will have no assets - uint constant HOLDS_LST = (FLAG << 1); // will hold some random amount of LSTs - uint constant HOLDS_ETH = (FLAG << 2); // will hold some random amount of ETH - uint constant HOLDS_ALL = (FLAG << 3); // will hold every LST and ETH + uint256 constant NO_ASSETS = (FLAG << 0); // will have no assets + uint256 constant HOLDS_LST = (FLAG << 1); // will hold some random amount of LSTs + uint256 constant HOLDS_ETH = (FLAG << 2); // will hold some random amount of ETH + uint256 constant HOLDS_ALL = (FLAG << 3); // will hold every LST and ETH /// @dev User contract flags /// These are used with _configRand to determine what User contracts can be deployed - uint constant DEFAULT = (FLAG << 0); - uint constant ALT_METHODS = (FLAG << 1); + uint256 constant DEFAULT = (FLAG << 0); + uint256 constant ALT_METHODS = (FLAG << 1); /// @dev Shadow Fork flags /// These are used for upgrade integration testing. - uint constant LOCAL = (FLAG << 0); - uint constant MAINNET = (FLAG << 1); - uint constant HOLESKY = (FLAG << 2); + uint256 constant LOCAL = (FLAG << 0); + uint256 constant MAINNET = (FLAG << 1); + uint256 constant HOLESKY = (FLAG << 2); // /// @dev Withdrawal flags // /// These are used with _configRand to determine how a user conducts a withdrawal @@ -138,20 +137,20 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /// - same reason as above /// /// WithdrawalMethod (QUEUE_WITHDRAWAL, UNDELEGATE, REDELEGATE) - /// - could still do this! + /// - could still do this! /// - This would trigger staker.queueWithdrawals to use either `queueWithdrawals` or `undelegate` under the hood /// - "redelegate" would be like the above, but adding a new `delegateTo` step after undelegating - mapping(uint => string) assetTypeToStr; - mapping(uint => string) userTypeToStr; - mapping(uint => string) forkTypeToStr; + mapping(uint256 => string) assetTypeToStr; + mapping(uint256 => string) userTypeToStr; + mapping(uint256 => string) forkTypeToStr; - constructor () { + constructor() { assetTypeToStr[NO_ASSETS] = "NO_ASSETS"; assetTypeToStr[HOLDS_LST] = "HOLDS_LST"; assetTypeToStr[HOLDS_ETH] = "HOLDS_ETH"; assetTypeToStr[HOLDS_ALL] = "HOLDS_ALL"; - + userTypeToStr[DEFAULT] = "DEFAULT"; userTypeToStr[ALT_METHODS] = "ALT_METHODS"; @@ -176,7 +175,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /** * @dev Anyone who wants to test using this contract in a separate repo via submodules may have to * override this function to set the correct paths for the deployment info files. - * + * * This setUp function will account for specific --fork-url flags and deploy/upgrade contracts accordingly. * Note that forkIds are also created so you can make explicit fork tests using cheats.selectFork(forkId) */ @@ -189,9 +188,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { * Running foundry like this will trigger the fork test profile, * lowering fuzz runs and using a remote RPC to test against mainnet state */ - bool forkMainnet = - _hash("forktest") == - _hash(cheats.envOr(string("FOUNDRY_PROFILE"), string("default"))); + bool forkMainnet = _hash("forktest") == _hash(cheats.envOr(string("FOUNDRY_PROFILE"), string("default"))); if (forkMainnet) { emit log("setUp: running tests against mainnet fork"); @@ -233,9 +230,8 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { strategyManager = StrategyManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - slasher = Slasher( - address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) - ); + slasher = + Slasher(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); eigenPodManager = EigenPodManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); @@ -247,11 +243,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { ); // Deploy EigenPod Contracts - eigenPodImplementation = new EigenPod( - ethPOSDeposit, - eigenPodManager, - GENESIS_TIME_LOCAL - ); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, GENESIS_TIME_LOCAL); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -259,13 +251,8 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { delegationManagerImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); slasherImplementation = new Slasher(strategyManager, delegationManager); - eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegationManager - ); + eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegationManager); avsDirectoryImplementation = new AVSDirectory(delegationManager); strategyFactoryImplementation = new StrategyFactory(strategyManager); @@ -281,7 +268,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { DelegationManager.initialize.selector, eigenLayerReputedMultisig, // initialOwner eigenLayerPauserReg, - 0 /* initialPausedStatus */, + 0, /* initialPausedStatus */ withdrawalDelayBlocks, initializeStrategiesToSetDelayBlocks, initializeWithdrawalDelayBlocks @@ -350,7 +337,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { IBeacon(strategyBeacon) ) ); - + cheats.prank(eigenLayerReputedMultisig); strategyManager.setStrategyWhitelister(address(strategyFactory)); @@ -358,7 +345,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { _newStrategyAndToken("Strategy1Token", "str1", 10e50, address(this), false); // initialSupply, owner _newStrategyAndToken("Strategy2Token", "str2", 10e50, address(this), false); // initialSupply, owner _newStrategyAndToken("Strategy3Token", "str3", 10e50, address(this), false); // initialSupply, owner - + // Factory deployments _newStrategyAndToken("Strategy4Token", "str4", 10e50, address(this), true); // initialSupply, owner _newStrategyAndToken("Strategy5Token", "str5", 10e50, address(this), true); // initialSupply, owner @@ -377,7 +364,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /** * @notice deploy current implementation contracts and upgrade the existing proxy EigenLayer contracts * on Mainnet. Setup for integration tests on mainnet fork. - * + * * Note that beacon chain oracle and eth deposit contracts are mocked and pointed to different addresses for these tests. */ function _upgradeMainnetContracts() public virtual { @@ -387,11 +374,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { ETHPOSDepositAddress = address(ethPOSDeposit); // overwrite for upgrade checks later // Deploy EigenPod Contracts - eigenPodImplementation = new EigenPod( - ethPOSDeposit, - eigenPodManager, - GENESIS_TIME_MAINNET - ); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, GENESIS_TIME_MAINNET); eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); // Deploy AVSDirectory, contract has not been deployed on mainnet yet avsDirectory = AVSDirectory( @@ -402,35 +385,26 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { delegationManagerImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); slasherImplementation = new Slasher(strategyManager, delegationManager); - eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegationManager - ); + eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegationManager); avsDirectoryImplementation = new AVSDirectory(delegationManager); // Second, upgrade the proxy contracts to point to the implementations // DelegationManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(delegationManager))), - address(delegationManagerImplementation) + TransparentUpgradeableProxy(payable(address(delegationManager))), address(delegationManagerImplementation) ); // StrategyManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(strategyManager))), - address(strategyManagerImplementation) + TransparentUpgradeableProxy(payable(address(strategyManager))), address(strategyManagerImplementation) ); // Slasher eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(slasher))), - address(slasherImplementation) + TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation) ); // EigenPodManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); // AVSDirectory, upgrade and initalized eigenLayerProxyAdmin.upgradeAndCall( @@ -448,7 +422,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { baseStrategyImplementation = new StrategyBase(strategyManager); // Upgrade All deployed strategy contracts to new base strategy - for (uint i = 0; i < numStrategiesDeployed; i++) { + for (uint256 i = 0; i < numStrategiesDeployed; i++) { // Upgrade existing strategy eigenLayerProxyAdmin.upgrade( TransparentUpgradeableProxy(payable(address(deployedStrategyArray[i]))), @@ -471,7 +445,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /** * @notice deploy current implementation contracts and upgrade the existing proxy EigenLayer contracts * on Holesky. Setup for integration tests on Holesky fork. - * + * * Note that beacon chain oracle and eth deposit contracts are mocked and pointed to different addresses for these tests. */ function _upgradeHoleskyContracts() public virtual { @@ -481,11 +455,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { ETHPOSDepositAddress = address(ethPOSDeposit); // overwrite for upgrade checks later // Deploy EigenPod Contracts - eigenPodImplementation = new EigenPod( - ethPOSDeposit, - eigenPodManager, - 0 - ); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, 0); eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); // Deploy AVSDirectory, contract has not been deployed on mainnet yet avsDirectory = AVSDirectory( @@ -496,35 +466,26 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { delegationManagerImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); slasherImplementation = new Slasher(strategyManager, delegationManager); - eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegationManager - ); + eigenPodManagerImplementation = + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, strategyManager, slasher, delegationManager); avsDirectoryImplementation = new AVSDirectory(delegationManager); // Second, upgrade the proxy contracts to point to the implementations // DelegationManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(delegationManager))), - address(delegationManagerImplementation) + TransparentUpgradeableProxy(payable(address(delegationManager))), address(delegationManagerImplementation) ); // StrategyManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(strategyManager))), - address(strategyManagerImplementation) + TransparentUpgradeableProxy(payable(address(strategyManager))), address(strategyManagerImplementation) ); // Slasher eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(slasher))), - address(slasherImplementation) + TransparentUpgradeableProxy(payable(address(slasher))), address(slasherImplementation) ); // EigenPodManager eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); // AVSDirectory, upgrade and initalized eigenLayerProxyAdmin.upgradeAndCall( @@ -542,7 +503,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { baseStrategyImplementation = new StrategyBase(strategyManager); // Upgrade All deployed strategy contracts to new base strategy - for (uint i = 0; i < numStrategiesDeployed; i++) { + for (uint256 i = 0; i < numStrategiesDeployed; i++) { // Upgrade existing strategy eigenLayerProxyAdmin.upgrade( TransparentUpgradeableProxy(payable(address(deployedStrategyArray[i]))), @@ -564,17 +525,19 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /// @dev Deploy a strategy and its underlying token, push to global lists of tokens/strategies, and whitelist /// strategy in strategyManager - function _newStrategyAndToken(string memory tokenName, string memory tokenSymbol, uint initialSupply, address owner, bool useFactory) internal { - IERC20 underlyingToken = new ERC20PresetFixedSupply(tokenName, tokenSymbol, initialSupply, owner); - + function _newStrategyAndToken( + string memory tokenName, + string memory tokenSymbol, + uint256 initialSupply, + address owner, + bool useFactory + ) internal { + IERC20 underlyingToken = new ERC20PresetFixedSupply(tokenName, tokenSymbol, initialSupply, owner); + StrategyBase strategy; if (useFactory) { - strategy = StrategyBase( - address( - strategyFactory.deployNewStrategy(underlyingToken) - ) - ); + strategy = StrategyBase(address(strategyFactory.deployNewStrategy(underlyingToken))); } else { strategy = StrategyBase( address( @@ -608,11 +571,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { allTokens.push(underlyingToken); } - function _configRand( - uint24 _randomSeed, - uint _assetTypes, - uint _userTypes - ) internal { + function _configRand(uint24 _randomSeed, uint256 _assetTypes, uint256 _userTypes) internal { // Using uint24 for the seed type so that if a test fails, it's easier // to manually use the seed to replay the same test. emit log_named_uint("_configRand: set random seed to: ", _randomSeed); @@ -623,13 +582,13 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { userTypes = _bitmapToBytes(_userTypes); emit log("_configRand: Users will be initialized with these asset types:"); - for (uint i = 0; i < assetTypes.length; i++) { - emit log(assetTypeToStr[uint(uint8(assetTypes[i]))]); + for (uint256 i = 0; i < assetTypes.length; i++) { + emit log(assetTypeToStr[uint256(uint8(assetTypes[i]))]); } emit log("_configRand: these User contracts will be initialized:"); - for (uint i = 0; i < userTypes.length; i++) { - emit log(userTypeToStr[uint(uint8(userTypes[i]))]); + for (uint256 i = 0; i < userTypes.length; i++) { + emit log(userTypeToStr[uint256(uint8(userTypes[i]))]); } assertTrue(assetTypes.length != 0, "_configRand: no asset types selected"); @@ -659,7 +618,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { strategyManager.unpause(0); // Add deployed strategies to lstStrats and allStrats - for (uint i; i < deployedStrategyArray.length; i++) { + for (uint256 i; i < deployedStrategyArray.length; i++) { IStrategy strategy = IStrategy(deployedStrategyArray[i]); if (tokensNotTested[address(strategy.underlyingToken())]) { @@ -709,7 +668,6 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { // cheats.startPrank(executorMultisig); // eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); // cheats.stopPrank(); - } else { revert("_deployOrFetchContracts: unimplemented forkType"); } @@ -717,57 +675,61 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /** * @dev Create a new User with a random config using the range defined in `_configRand` - * + * * Assets are pulled from `strategies` based on a random staker/operator `assetType` */ - function _randUser(string memory name) internal returns (User, IStrategy[] memory, uint[] memory) { + function _randUser( + string memory name + ) internal returns (User, IStrategy[] memory, uint256[] memory) { // For the new user, select what type of assets they'll have and whether // they'll use `xWithSignature` methods. // // The values selected here are in the ranges configured via `_configRand` - uint assetType = _randAssetType(); - uint userType = _randUserType(); - + uint256 assetType = _randAssetType(); + uint256 userType = _randUserType(); + // Deploy new User contract User user = _genRandUser(name, userType); // For the specific asset selection we made, get a random assortment of // strategies and deal the user some corresponding underlying token balances - (IStrategy[] memory strategies, uint[] memory tokenBalances) = _dealRandAssets(user, assetType); + (IStrategy[] memory strategies, uint256[] memory tokenBalances) = _dealRandAssets(user, assetType); _printUserInfo(name, assetType, userType, strategies, tokenBalances); return (user, strategies, tokenBalances); } /// @dev Create a new user without native ETH. See _randUser above for standard usage - function _randUser_NoETH(string memory name) internal returns (User, IStrategy[] memory, uint[] memory) { + function _randUser_NoETH( + string memory name + ) internal returns (User, IStrategy[] memory, uint256[] memory) { // For the new user, select what type of assets they'll have and whether // they'll use `xWithSignature` methods. // // The values selected here are in the ranges configured via `_configRand` - uint userType = _randUserType(); + uint256 userType = _randUserType(); // Pick the user's asset distribution, removing "native ETH" as an option // I'm sorry if this eventually leads to a bug that's really hard to track down - uint assetType = _randAssetType(); + uint256 assetType = _randAssetType(); if (assetType == HOLDS_ETH) { assetType = NO_ASSETS; } else if (assetType == HOLDS_ALL) { assetType = HOLDS_LST; } - + // Deploy new User contract User user = _genRandUser(name, userType); // For the specific asset selection we made, get a random assortment of // strategies and deal the user some corresponding underlying token balances - (IStrategy[] memory strategies, uint[] memory tokenBalances) = _dealRandAssets(user, assetType); + (IStrategy[] memory strategies, uint256[] memory tokenBalances) = _dealRandAssets(user, assetType); _printUserInfo(name, assetType, userType, strategies, tokenBalances); return (user, strategies, tokenBalances); } - function _genRandUser(string memory name, uint userType) internal returns (User) { + function _genRandUser(string memory name, uint256 userType) internal returns (User) { // Create User contract based on userType: User user; if (forkType == LOCAL) { @@ -792,7 +754,6 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } else { revert("_randUser: unimplemented userType"); } - } else if (forkType == HOLESKY) { // User deployment for Holesky is exact same as holesky. // Current Holesky deployment is up to date and no deprecated interfaces have been added. @@ -823,24 +784,24 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /// `tokenBalances` will contain the user's eth balance /// HOLDS_ALL - `strategies` will contain ALL initialized strategies AND BEACONCHAIN_ETH_STRAT, and /// `tokenBalances` will contain random token/eth balances accordingly - function _dealRandAssets(User user, uint assetType) internal returns (IStrategy[] memory, uint[] memory) { + function _dealRandAssets(User user, uint256 assetType) internal returns (IStrategy[] memory, uint256[] memory) { IStrategy[] memory strategies; - uint[] memory tokenBalances; + uint256[] memory tokenBalances; if (assetType == NO_ASSETS) { strategies = new IStrategy[](0); - tokenBalances = new uint[](0); + tokenBalances = new uint256[](0); } else if (assetType == HOLDS_LST) { assetType = HOLDS_LST; // Select a random number of assets - uint numAssets = _randUint({ min: 1, max: lstStrats.length }); + uint256 numAssets = _randUint({min: 1, max: lstStrats.length}); strategies = new IStrategy[](numAssets); - tokenBalances = new uint[](numAssets); + tokenBalances = new uint256[](numAssets); // For each asset, award the user a random balance of the underlying token - for (uint i = 0; i < numAssets; i++) { + for (uint256 i = 0; i < numAssets; i++) { IStrategy strat = lstStrats[i]; IERC20 underlyingToken = strat.underlyingToken(); - uint balance = _randUint({ min: MIN_BALANCE, max: MAX_BALANCE }); + uint256 balance = _randUint({min: MIN_BALANCE, max: MAX_BALANCE}); StdCheats.deal(address(underlyingToken), address(user), balance); tokenBalances[i] = balance; @@ -848,25 +809,25 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } } else if (assetType == HOLDS_ETH) { strategies = new IStrategy[](1); - tokenBalances = new uint[](1); + tokenBalances = new uint256[](1); // Award the user with a random amount of ETH // This guarantees a multiple of 32 ETH (at least 1, up to/incl 5) - uint amount = 32 ether * _randUint({ min: 1, max: 5 }); + uint256 amount = 32 ether * _randUint({min: 1, max: 5}); cheats.deal(address(user), amount); strategies[0] = BEACONCHAIN_ETH_STRAT; tokenBalances[0] = amount; } else if (assetType == HOLDS_ALL) { - uint numLSTs = lstStrats.length; + uint256 numLSTs = lstStrats.length; strategies = new IStrategy[](numLSTs + 1); - tokenBalances = new uint[](numLSTs + 1); - + tokenBalances = new uint256[](numLSTs + 1); + // For each LST, award the user a random balance of the underlying token - for (uint i = 0; i < numLSTs; i++) { + for (uint256 i = 0; i < numLSTs; i++) { IStrategy strat = lstStrats[i]; IERC20 underlyingToken = strat.underlyingToken(); - uint balance = _randUint({ min: MIN_BALANCE, max: MAX_BALANCE }); + uint256 balance = _randUint({min: MIN_BALANCE, max: MAX_BALANCE}); StdCheats.deal(address(underlyingToken), address(user), balance); tokenBalances[i] = balance; @@ -875,7 +836,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { // Award the user with a random amount of ETH // This guarantees a multiple of 32 ETH (at least 1, up to/incl 5) - uint amount = 32 ether * _randUint({ min: 1, max: 5 }); + uint256 amount = 32 ether * _randUint({min: 1, max: 5}); cheats.deal(address(user), amount); // Add BEACONCHAIN_ETH_STRAT and eth balance @@ -889,18 +850,20 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } /// @dev By default will have a assetType of HOLDS_LST - function _dealRandAssets_M1(User user) internal returns (IStrategy[] memory, uint[] memory) { + function _dealRandAssets_M1( + User user + ) internal returns (IStrategy[] memory, uint256[] memory) { // Select a random number of assets - uint numAssets = _randUint({ min: 1, max: lstStrats.length }); + uint256 numAssets = _randUint({min: 1, max: lstStrats.length}); IStrategy[] memory strategies = new IStrategy[](numAssets); - uint[] memory tokenBalances = new uint[](numAssets); + uint256[] memory tokenBalances = new uint256[](numAssets); // For each asset, award the user a random balance of the underlying token - for (uint i = 0; i < numAssets; i++) { + for (uint256 i = 0; i < numAssets; i++) { IStrategy strat = lstStrats[i]; IERC20 underlyingToken = strat.underlyingToken(); - uint balance = _randUint({ min: MIN_BALANCE, max: MAX_BALANCE }); + uint256 balance = _randUint({min: MIN_BALANCE, max: MAX_BALANCE}); StdCheats.deal(address(underlyingToken), address(user), balance); tokenBalances[i] = balance; @@ -912,12 +875,12 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { /// @dev Uses `random` to return a random uint, with a range given by `min` and `max` (inclusive) /// @return `min` <= result <= `max` - function _randUint(uint min, uint max) internal returns (uint) { - uint range = max - min + 1; + function _randUint(uint256 min, uint256 max) internal returns (uint256) { + uint256 range = max - min + 1; // calculate the number of bits needed for the range - uint bitsNeeded = 0; - uint tempRange = range; + uint256 bitsNeeded = 0; + uint256 tempRange = range; while (tempRange > 0) { bitsNeeded++; tempRange >>= 1; @@ -925,8 +888,8 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { // create a mask for the required number of bits // and extract the value from the hash - uint mask = (1 << bitsNeeded) - 1; - uint value = uint(random) & mask; + uint256 mask = (1 << bitsNeeded) - 1; + uint256 value = uint256(random) & mask; // in case value is out of range, wrap around or retry while (value >= range) { @@ -939,19 +902,19 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } function _randBool() internal returns (bool) { - return _randUint({ min: 0, max: 1 }) == 0; + return _randUint({min: 0, max: 1}) == 0; } - function _randAssetType() internal returns (uint) { - uint idx = _randUint({ min: 0, max: assetTypes.length - 1 }); - uint assetType = uint(uint8(assetTypes[idx])); + function _randAssetType() internal returns (uint256) { + uint256 idx = _randUint({min: 0, max: assetTypes.length - 1}); + uint256 assetType = uint256(uint8(assetTypes[idx])); return assetType; } - function _randUserType() internal returns (uint) { - uint idx = _randUint({ min: 0, max: userTypes.length - 1 }); - uint userType = uint(uint8(userTypes[idx])); + function _randUserType() internal returns (uint256) { + uint256 idx = _randUint({min: 0, max: userTypes.length - 1}); + uint256 userType = uint256(uint8(userTypes[idx])); return userType; } @@ -960,10 +923,12 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { * @dev Converts a bitmap into an array of bytes * @dev Each byte in the input is processed as indicating a single bit to flip in the bitmap */ - function _bitmapToBytes(uint bitmap) internal pure returns (bytes memory bytesArray) { - for (uint i = 0; i < 256; ++i) { + function _bitmapToBytes( + uint256 bitmap + ) internal pure returns (bytes memory bytesArray) { + for (uint256 i = 0; i < 256; ++i) { // Mask for i-th bit - uint mask = uint(1 << i); + uint256 mask = uint256(1 << i); // emit log_named_uint("mask: ", mask); @@ -977,12 +942,11 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { function _printUserInfo( string memory name, - uint assetType, - uint userType, - IStrategy[] memory strategies, - uint[] memory tokenBalances + uint256 assetType, + uint256 userType, + IStrategy[] memory strategies, + uint256[] memory tokenBalances ) internal { - emit log("===Created User==="); emit log_named_string("Name", name); emit log_named_string("assetType", assetTypeToStr[assetType]); @@ -991,12 +955,12 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { emit log_named_uint("num assets: ", strategies.length); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { emit log_named_string("token name: ", "Native ETH"); - emit log_named_uint("token balance: ", tokenBalances[i]); + emit log_named_uint("token balance: ", tokenBalances[i]); } else { IERC20 underlyingToken = strat.underlyingToken(); @@ -1009,7 +973,9 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } /// @dev Helper because solidity syntax is exhausting - function _hash(string memory s) internal pure returns (bytes32) { + function _hash( + string memory s + ) internal pure returns (bytes32) { return keccak256(abi.encodePacked(s)); } } diff --git a/src/test/integration/TimeMachine.t.sol b/src/test/integration/TimeMachine.t.sol index aabb47d4b..49ec9ac00 100644 --- a/src/test/integration/TimeMachine.t.sol +++ b/src/test/integration/TimeMachine.t.sol @@ -4,20 +4,19 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; contract TimeMachine is Test { - Vm cheats = Vm(HEVM_ADDRESS); bool pastExists = false; - uint lastSnapshot; + uint256 lastSnapshot; - function createSnapshot() public returns (uint) { - uint snapshot = cheats.snapshot(); + function createSnapshot() public returns (uint256) { + uint256 snapshot = cheats.snapshot(); lastSnapshot = snapshot; pastExists = true; return snapshot; } - function warpToLast() public returns (uint curState) { + function warpToLast() public returns (uint256 curState) { // Safety check to make sure createSnapshot is called before attempting to warp // so we don't accidentally prevent our own births assertTrue(pastExists, "Global.warpToPast: invalid usage, past does not exist"); @@ -27,7 +26,9 @@ contract TimeMachine is Test { return curState; } - function warpToPresent(uint curState) public { + function warpToPresent( + uint256 curState + ) public { cheats.revertTo(curState); } } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol b/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol index 89af42013..4090197f1 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol @@ -30,11 +30,9 @@ library BeaconChainProofs_DeprecatedM1 { uint256 internal constant NUM_EXECUTION_PAYLOAD_HEADER_FIELDS = 15; uint256 internal constant EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT = 4; - uint256 internal constant NUM_EXECUTION_PAYLOAD_FIELDS = 15; uint256 internal constant EXECUTION_PAYLOAD_FIELD_TREE_HEIGHT = 4; - // HISTORICAL_ROOTS_LIMIT = 2**24, so tree height is 24 uint256 internal constant HISTORICAL_ROOTS_TREE_HEIGHT = 24; @@ -45,7 +43,6 @@ library BeaconChainProofs_DeprecatedM1 { uint256 internal constant STATE_ROOTS_TREE_HEIGHT = 13; uint256 internal constant BLOCK_ROOTS_TREE_HEIGHT = 13; - uint256 internal constant NUM_WITHDRAWAL_FIELDS = 4; // tree height for hash tree of an individual withdrawal container uint256 internal constant WITHDRAWAL_FIELD_TREE_HEIGHT = 2; @@ -80,7 +77,7 @@ library BeaconChainProofs_DeprecatedM1 { uint256 internal constant VALIDATOR_BALANCE_INDEX = 2; uint256 internal constant VALIDATOR_SLASHED_INDEX = 3; uint256 internal constant VALIDATOR_WITHDRAWABLE_EPOCH_INDEX = 7; - + // in execution payload header uint256 internal constant BLOCK_NUMBER_INDEX = 6; uint256 internal constant WITHDRAWALS_ROOT_INDEX = 14; @@ -100,8 +97,6 @@ library BeaconChainProofs_DeprecatedM1 { bytes8 internal constant UINT64_MASK = 0xffffffffffffffff; - - struct WithdrawalProofs { bytes blockHeaderProof; bytes withdrawalProof; @@ -129,7 +124,7 @@ library BeaconChainProofs_DeprecatedM1 { } /** - * + * * @notice This function is parses the balanceRoot to get the uint64 balance of a validator. During merkleization of the * beacon state balance tree, four uint64 values (making 32 bytes) are grouped together and treated as a single leaf in the merkle tree. Thus the * validatorIndex mod 4 is used to determine which of the four uint64 values to extract from the balanceRoot. @@ -137,7 +132,7 @@ library BeaconChainProofs_DeprecatedM1 { * @param balanceRoot is the combination of 4 validator balances being proven for. * @return The validator's balance, in Gwei */ - function getBalanceFromBalanceRoot(uint40 validatorIndex, bytes32 balanceRoot) internal pure returns (uint64) { + function getBalanceFromBalanceRoot(uint40 validatorIndex, bytes32 balanceRoot) internal pure returns (uint64) { uint256 bitShiftAmount = (validatorIndex % 4) * 64; bytes32 validatorBalanceLittleEndian = bytes32((uint256(balanceRoot) << bitShiftAmount)); uint64 validatorBalance = Endian.fromLittleEndianUint64(validatorBalanceLittleEndian); @@ -154,23 +149,31 @@ library BeaconChainProofs_DeprecatedM1 { function verifyValidatorFields( uint40 validatorIndex, bytes32 beaconStateRoot, - bytes calldata proof, + bytes calldata proof, bytes32[] calldata validatorFields ) internal view { - - require(validatorFields.length == 2**VALIDATOR_FIELD_TREE_HEIGHT, "BeaconChainProofs.verifyValidatorFields: Validator fields has incorrect length"); + require( + validatorFields.length == 2 ** VALIDATOR_FIELD_TREE_HEIGHT, + "BeaconChainProofs.verifyValidatorFields: Validator fields has incorrect length" + ); /** * Note: the length of the validator merkle proof is BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1. * There is an additional layer added by hashing the root with the length of the validator list */ - require(proof.length == 32 * ((VALIDATOR_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT), "BeaconChainProofs.verifyValidatorFields: Proof has incorrect length"); + require( + proof.length == 32 * ((VALIDATOR_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT), + "BeaconChainProofs.verifyValidatorFields: Proof has incorrect length" + ); uint256 index = (VALIDATOR_TREE_ROOT_INDEX << (VALIDATOR_TREE_HEIGHT + 1)) | uint256(validatorIndex); // merkleize the validatorFields to get the leaf to prove bytes32 validatorRoot = Merkle.merkleizeSha256(validatorFields); // verify the proof of the validatorRoot against the beaconStateRoot - require(Merkle.verifyInclusionSha256(proof, beaconStateRoot, validatorRoot, index), "BeaconChainProofs.verifyValidatorFields: Invalid merkle proof"); + require( + Merkle.verifyInclusionSha256(proof, beaconStateRoot, validatorRoot, index), + "BeaconChainProofs.verifyValidatorFields: Invalid merkle proof" + ); } /** @@ -186,16 +189,22 @@ library BeaconChainProofs_DeprecatedM1 { bytes calldata proof, bytes32 balanceRoot ) internal view { - require(proof.length == 32 * ((BALANCE_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT), "BeaconChainProofs.verifyValidatorBalance: Proof has incorrect length"); + require( + proof.length == 32 * ((BALANCE_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT), + "BeaconChainProofs.verifyValidatorBalance: Proof has incorrect length" + ); /** - * the beacon state's balance list is a list of uint64 values, and these are grouped together in 4s when merkleized. - * Therefore, the index of the balance of a validator is validatorIndex/4 - */ - uint256 balanceIndex = uint256(validatorIndex/4); + * the beacon state's balance list is a list of uint64 values, and these are grouped together in 4s when merkleized. + * Therefore, the index of the balance of a validator is validatorIndex/4 + */ + uint256 balanceIndex = uint256(validatorIndex / 4); balanceIndex = (BALANCE_INDEX << (BALANCE_TREE_HEIGHT + 1)) | balanceIndex; - require(Merkle.verifyInclusionSha256(proof, beaconStateRoot, balanceRoot, balanceIndex), "BeaconChainProofs.verifyValidatorBalance: Invalid merkle proof"); + require( + Merkle.verifyInclusionSha256(proof, beaconStateRoot, balanceRoot, balanceIndex), + "BeaconChainProofs.verifyValidatorBalance: Invalid merkle proof" + ); } /** @@ -209,56 +218,95 @@ library BeaconChainProofs_DeprecatedM1 { WithdrawalProofs calldata proofs, bytes32[] calldata withdrawalFields ) internal view { - require(withdrawalFields.length == 2**WITHDRAWAL_FIELD_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: withdrawalFields has incorrect length"); + require( + withdrawalFields.length == 2 ** WITHDRAWAL_FIELD_TREE_HEIGHT, + "BeaconChainProofs.verifyWithdrawalProofs: withdrawalFields has incorrect length" + ); + + require( + proofs.blockHeaderRootIndex < 2 ** BLOCK_ROOTS_TREE_HEIGHT, + "BeaconChainProofs.verifyWithdrawalProofs: blockRootIndex is too large" + ); + require( + proofs.withdrawalIndex < 2 ** WITHDRAWALS_TREE_HEIGHT, + "BeaconChainProofs.verifyWithdrawalProofs: withdrawalIndex is too large" + ); - require(proofs.blockHeaderRootIndex < 2**BLOCK_ROOTS_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: blockRootIndex is too large"); - require(proofs.withdrawalIndex < 2**WITHDRAWALS_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: withdrawalIndex is too large"); - // verify the block header proof length - require(proofs.blockHeaderProof.length == 32 * (BEACON_STATE_FIELD_TREE_HEIGHT + BLOCK_ROOTS_TREE_HEIGHT), - "BeaconChainProofs.verifyWithdrawalProofs: blockHeaderProof has incorrect length"); - require(proofs.withdrawalProof.length == 32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT + WITHDRAWALS_TREE_HEIGHT + 1), - "BeaconChainProofs.verifyWithdrawalProofs: withdrawalProof has incorrect length"); - require(proofs.executionPayloadProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT + BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT), - "BeaconChainProofs.verifyWithdrawalProofs: executionPayloadProof has incorrect length"); - require(proofs.slotProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT), - "BeaconChainProofs.verifyWithdrawalProofs: slotProof has incorrect length"); - require(proofs.blockNumberProof.length == 32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT), - "BeaconChainProofs.verifyWithdrawalProofs: blockNumberProof has incorrect length"); - + require( + proofs.blockHeaderProof.length == 32 * (BEACON_STATE_FIELD_TREE_HEIGHT + BLOCK_ROOTS_TREE_HEIGHT), + "BeaconChainProofs.verifyWithdrawalProofs: blockHeaderProof has incorrect length" + ); + require( + proofs.withdrawalProof.length + == 32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT + WITHDRAWALS_TREE_HEIGHT + 1), + "BeaconChainProofs.verifyWithdrawalProofs: withdrawalProof has incorrect length" + ); + require( + proofs.executionPayloadProof.length + == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT + BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT), + "BeaconChainProofs.verifyWithdrawalProofs: executionPayloadProof has incorrect length" + ); + require( + proofs.slotProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT), + "BeaconChainProofs.verifyWithdrawalProofs: slotProof has incorrect length" + ); + require( + proofs.blockNumberProof.length == 32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT), + "BeaconChainProofs.verifyWithdrawalProofs: blockNumberProof has incorrect length" + ); /** * Computes the block_header_index relative to the beaconStateRoot. It concatenates the indexes of all the * intermediate root indexes from the bottom of the sub trees (the block header container) to the top of the tree */ - uint256 blockHeaderIndex = BLOCK_ROOTS_INDEX << (BLOCK_ROOTS_TREE_HEIGHT) | uint256(proofs.blockHeaderRootIndex); + uint256 blockHeaderIndex = BLOCK_ROOTS_INDEX << (BLOCK_ROOTS_TREE_HEIGHT) | uint256(proofs.blockHeaderRootIndex); // Verify the blockHeaderRoot against the beaconStateRoot - require(Merkle.verifyInclusionSha256(proofs.blockHeaderProof, beaconStateRoot, proofs.blockHeaderRoot, blockHeaderIndex), - "BeaconChainProofs.verifyWithdrawalProofs: Invalid block header merkle proof"); + require( + Merkle.verifyInclusionSha256( + proofs.blockHeaderProof, beaconStateRoot, proofs.blockHeaderRoot, blockHeaderIndex + ), + "BeaconChainProofs.verifyWithdrawalProofs: Invalid block header merkle proof" + ); //Next we verify the slot against the blockHeaderRoot - require(Merkle.verifyInclusionSha256(proofs.slotProof, proofs.blockHeaderRoot, proofs.slotRoot, SLOT_INDEX), "BeaconChainProofs.verifyWithdrawalProofs: Invalid slot merkle proof"); + require( + Merkle.verifyInclusionSha256(proofs.slotProof, proofs.blockHeaderRoot, proofs.slotRoot, SLOT_INDEX), + "BeaconChainProofs.verifyWithdrawalProofs: Invalid slot merkle proof" + ); // Next we verify the executionPayloadRoot against the blockHeaderRoot - uint256 executionPayloadIndex = BODY_ROOT_INDEX << (BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT)| EXECUTION_PAYLOAD_INDEX ; - require(Merkle.verifyInclusionSha256(proofs.executionPayloadProof, proofs.blockHeaderRoot, proofs.executionPayloadRoot, executionPayloadIndex), - "BeaconChainProofs.verifyWithdrawalProofs: Invalid executionPayload merkle proof"); + uint256 executionPayloadIndex = + BODY_ROOT_INDEX << (BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT) | EXECUTION_PAYLOAD_INDEX; + require( + Merkle.verifyInclusionSha256( + proofs.executionPayloadProof, proofs.blockHeaderRoot, proofs.executionPayloadRoot, executionPayloadIndex + ), + "BeaconChainProofs.verifyWithdrawalProofs: Invalid executionPayload merkle proof" + ); // Next we verify the blockNumberRoot against the executionPayload root - require(Merkle.verifyInclusionSha256(proofs.blockNumberProof, proofs.executionPayloadRoot, proofs.blockNumberRoot, BLOCK_NUMBER_INDEX), - "BeaconChainProofs.verifyWithdrawalProofs: Invalid blockNumber merkle proof"); + require( + Merkle.verifyInclusionSha256( + proofs.blockNumberProof, proofs.executionPayloadRoot, proofs.blockNumberRoot, BLOCK_NUMBER_INDEX + ), + "BeaconChainProofs.verifyWithdrawalProofs: Invalid blockNumber merkle proof" + ); /** * Next we verify the withdrawal fields against the blockHeaderRoot: - * First we compute the withdrawal_index relative to the blockHeaderRoot by concatenating the indexes of all the + * First we compute the withdrawal_index relative to the blockHeaderRoot by concatenating the indexes of all the * intermediate root indexes from the bottom of the sub trees (the withdrawal container) to the top, the blockHeaderRoot. * Then we calculate merkleize the withdrawalFields container to calculate the the withdrawalRoot. * Finally we verify the withdrawalRoot against the executionPayloadRoot. */ uint256 withdrawalIndex = WITHDRAWALS_INDEX << (WITHDRAWALS_TREE_HEIGHT + 1) | uint256(proofs.withdrawalIndex); bytes32 withdrawalRoot = Merkle.merkleizeSha256(withdrawalFields); - require(Merkle.verifyInclusionSha256(proofs.withdrawalProof, proofs.executionPayloadRoot, withdrawalRoot, withdrawalIndex), - "BeaconChainProofs.verifyWithdrawalProofs: Invalid withdrawal merkle proof"); + require( + Merkle.verifyInclusionSha256( + proofs.withdrawalProof, proofs.executionPayloadRoot, withdrawalRoot, withdrawalIndex + ), + "BeaconChainProofs.verifyWithdrawalProofs: Invalid withdrawal merkle proof" + ); } - } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol b/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol index 2bb2c818e..2196e5ed9 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol @@ -9,22 +9,26 @@ pragma solidity ^0.8.12; */ interface IBeaconChainOracle_DeprecatedM1 { /// @notice Largest blockNumber that has been confirmed by the oracle. - function latestConfirmedOracleBlockNumber() external view returns(uint64); + function latestConfirmedOracleBlockNumber() external view returns (uint64); /// @notice Mapping: Beacon Chain blockNumber => the Beacon Chain state root at the specified blockNumber. /// @dev This will return `bytes32(0)` if the state root at the specified blockNumber is not yet confirmed. - function beaconStateRootAtBlockNumber(uint64 blockNumber) external view returns(bytes32); + function beaconStateRootAtBlockNumber( + uint64 blockNumber + ) external view returns (bytes32); /// @notice Mapping: address => whether or not the address is in the set of oracle signers. - function isOracleSigner(address _oracleSigner) external view returns(bool); + function isOracleSigner( + address _oracleSigner + ) external view returns (bool); /// @notice Mapping: Beacon Chain blockNumber => oracle signer address => whether or not the oracle signer has voted on the state root at the blockNumber. - function hasVoted(uint64 blockNumber, address oracleSigner) external view returns(bool); + function hasVoted(uint64 blockNumber, address oracleSigner) external view returns (bool); - /// @notice Mapping: Beacon Chain blockNumber => state root => total number of oracle signer votes for the state root at the blockNumber. - function stateRootVotes(uint64 blockNumber, bytes32 stateRoot) external view returns(uint256); + /// @notice Mapping: Beacon Chain blockNumber => state root => total number of oracle signer votes for the state root at the blockNumber. + function stateRootVotes(uint64 blockNumber, bytes32 stateRoot) external view returns (uint256); /// @notice Total number of members of the set of oracle signers. - function totalOracleSigners() external view returns(uint256); + function totalOracleSigners() external view returns (uint256); /** * @notice Number of oracle signers that must vote for a state root in order for the state root to be confirmed. @@ -32,27 +36,33 @@ interface IBeaconChainOracle_DeprecatedM1 { * @dev We note that there is an edge case -- when the threshold is adjusted downward, if a state root already has enough votes to meet the *new* threshold, * the state root must still receive one additional vote from an oracle signer to be confirmed. This behavior is intended, to minimize unexpected root confirmations. */ - function threshold() external view returns(uint256); + function threshold() external view returns (uint256); /** * @notice Owner-only function used to modify the value of the `threshold` variable. * @param _threshold Desired new value for the `threshold` variable. Function will revert if this is set to zero. */ - function setThreshold(uint256 _threshold) external; + function setThreshold( + uint256 _threshold + ) external; /** * @notice Owner-only function used to add a signer to the set of oracle signers. * @param _oracleSigners Array of address to be added to the set. * @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already in the set of oracle signers. */ - function addOracleSigners(address[] memory _oracleSigners) external; + function addOracleSigners( + address[] memory _oracleSigners + ) external; /** * @notice Owner-only function used to remove a signer from the set of oracle signers. * @param _oracleSigners Array of address to be removed from the set. * @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already not in the set of oracle signers. */ - function removeOracleSigners(address[] memory _oracleSigners) external; + function removeOracleSigners( + address[] memory _oracleSigners + ) external; /** * @notice Called by a member of the set of oracle signers to assert that the Beacon Chain state root is `stateRoot` at `blockNumber`. diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol b/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol index 8abb54a86..91756998d 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol @@ -15,7 +15,7 @@ interface IDelayedWithdrawalRouter_DeprecatedM1 { DelayedWithdrawal[] delayedWithdrawals; } - /** + /** * @notice Creates an delayed withdrawal for `msg.value` to the `recipient`. * @dev Only callable by the `podOwner`'s EigenPod contract. */ @@ -32,25 +32,40 @@ interface IDelayedWithdrawalRouter_DeprecatedM1 { * @notice Called in order to withdraw delayed withdrawals made to the caller that have passed the `withdrawalDelayBlocks` period. * @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming. */ - function claimDelayedWithdrawals(uint256 maxNumberOfWithdrawalsToClaim) external; + function claimDelayedWithdrawals( + uint256 maxNumberOfWithdrawalsToClaim + ) external; /// @notice Owner-only function for modifying the value of the `withdrawalDelayBlocks` variable. - function setWithdrawalDelayBlocks(uint256 newValue) external; + function setWithdrawalDelayBlocks( + uint256 newValue + ) external; /// @notice Getter function for the mapping `_userWithdrawals` - function userWithdrawals(address user) external view returns (UserDelayedWithdrawals memory); + function userWithdrawals( + address user + ) external view returns (UserDelayedWithdrawals memory); /// @notice Getter function to get all delayedWithdrawals of the `user` - function getUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory); + function getUserDelayedWithdrawals( + address user + ) external view returns (DelayedWithdrawal[] memory); /// @notice Getter function to get all delayedWithdrawals that are currently claimable by the `user` - function getClaimableUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory); - + function getClaimableUserDelayedWithdrawals( + address user + ) external view returns (DelayedWithdrawal[] memory); + /// @notice Getter function for fetching the delayedWithdrawal at the `index`th entry from the `_userWithdrawals[user].delayedWithdrawals` array - function userDelayedWithdrawalByIndex(address user, uint256 index) external view returns (DelayedWithdrawal memory); + function userDelayedWithdrawalByIndex( + address user, + uint256 index + ) external view returns (DelayedWithdrawal memory); /// @notice Getter function for fetching the length of the delayedWithdrawals array of a specific user - function userWithdrawalsLength(address user) external view returns (uint256); + function userWithdrawalsLength( + address user + ) external view returns (uint256); /// @notice Convenience function for checking whether or not the delayedWithdrawal at the `index`th entry from the `_userWithdrawals[user].delayedWithdrawals` array is currently claimable function canClaimDelayedWithdrawal(address user, uint256 index) external view returns (bool); diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol index 0171653be..132589bc9 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol @@ -6,7 +6,7 @@ import "./IEigenPodManager.sol"; /** * @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 - * @title The implementation contract used for restaking beacon chain ETH on EigenLayer + * @title The implementation contract used for restaking beacon chain ETH on EigenLayer * @author Layr Labs, Inc. * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service * @notice The main functionalities are: @@ -25,6 +25,7 @@ interface IEigenPod_DeprecatedM1 { ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod OVERCOMMITTED, // proven to be overcommitted to EigenLayer WITHDRAWN // withdrawn from the Beacon Chain + } // this struct keeps track of PartialWithdrawalClaims @@ -45,19 +46,23 @@ interface IEigenPod_DeprecatedM1 { } /// @notice The amount of eth, in gwei, that is restaked per validator - function REQUIRED_BALANCE_GWEI() external view returns(uint64); + function REQUIRED_BALANCE_GWEI() external view returns (uint64); /// @notice The amount of eth, in wei, that is restaked per validator - function REQUIRED_BALANCE_WEI() external view returns(uint256); + function REQUIRED_BALANCE_WEI() external view returns (uint256); /// @notice this is a mapping of validator indices to a Validator struct containing pertinent info about the validator - function validatorStatus(uint40 validatorIndex) external view returns(VALIDATOR_STATUS); + function validatorStatus( + uint40 validatorIndex + ) external view returns (VALIDATOR_STATUS); - /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer), - function restakedExecutionLayerGwei() external view returns(uint64); + /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer), + function restakedExecutionLayerGwei() external view returns (uint64); /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager - function initialize(address owner) external; + function initialize( + address owner + ) external; /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; @@ -82,7 +87,6 @@ interface IEigenPod_DeprecatedM1 { /// @notice block number of the most recent withdrawal function mostRecentWithdrawalBlockNumber() external view returns (uint64); - ///@notice mapping that tracks proven partial withdrawals function provenPartialWithdrawal(uint40 validatorIndex, uint64 slot) external view returns (bool); @@ -91,9 +95,9 @@ interface IEigenPod_DeprecatedM1 { * this contract. It also verifies the current (not effective) balance of the validator. It verifies the provided proof of the ETH validator against the beacon chain state * root, marks the validator as 'active' in EigenLayer, and credits the restaked ETH in Eigenlayer. * @param oracleBlockNumber is the Beacon Chain blockNumber whose state root the `proof` will be proven against. - * @param validatorIndex is the index of the validator being proven, refer to consensus specs + * @param validatorIndex is the index of the validator being proven, refer to consensus specs * @param proofs is the bytes that prove the ETH validator's balance and withdrawal credentials against a beacon chain state root - * @param validatorFields are the fields of the "Validator Container", refer to consensus specs + * @param validatorFields are the fields of the "Validator Container", refer to consensus specs * for details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator */ function verifyWithdrawalCredentialsAndBalance( @@ -102,16 +106,16 @@ interface IEigenPod_DeprecatedM1 { BeaconChainProofs_DeprecatedM1.ValidatorFieldsAndBalanceProofs memory proofs, bytes32[] calldata validatorFields ) external; - + /** * @notice This function records an overcommitment of stake to EigenLayer on behalf of a certain ETH validator. * If successful, the overcommitted balance is penalized (available for withdrawal whenever the pod's balance allows). * The ETH validator's shares in the enshrined beaconChainETH strategy are also removed from the StrategyManager and undelegated. * @param oracleBlockNumber The oracleBlockNumber whose state root the `proof` will be proven against. * Must be within `VERIFY_OVERCOMMITTED_WINDOW_BLOCKS` of the current block. - * @param validatorIndex is the index of the validator being proven, refer to consensus specs + * @param validatorIndex is the index of the validator being proven, refer to consensus specs * @param proofs is the proof of the validator's balance and validatorFields in the balance tree and the balanceRoot to prove for - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to * the StrategyManager in case it must be removed from the list of the podOwners strategies * @param validatorFields are the fields of the "Validator Container", refer to consensus specs * @dev For more details on the Beacon Chain spec, see: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator @@ -130,11 +134,11 @@ interface IEigenPod_DeprecatedM1 { * @param validatorFieldsProof is the proof of the validator's fields in the validator tree * @param withdrawalFields are the fields of the withdrawal being proven * @param validatorFields are the fields of the validator being proven - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to * the EigenPodManager to the StrategyManager in case it must be removed from the podOwner's list of strategies */ function verifyAndProcessWithdrawal( - BeaconChainProofs_DeprecatedM1.WithdrawalProofs calldata withdrawalProofs, + BeaconChainProofs_DeprecatedM1.WithdrawalProofs calldata withdrawalProofs, bytes calldata validatorFieldsProof, bytes32[] calldata validatorFields, bytes32[] calldata withdrawalFields, diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol index d5795bf5d..6e8ea30ce 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol @@ -12,7 +12,6 @@ import "src/contracts/interfaces/IPausable.sol"; * @author Layr Labs, Inc. * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service */ - interface IEigenPodManager_DeprecatedM1 is IPausable { /** * @notice Creates an EigenPod for the sender. @@ -21,7 +20,7 @@ interface IEigenPodManager_DeprecatedM1 is IPausable { function createPod() external; /** - * @notice Stakes for a new beacon chain validator on the sender's EigenPod. + * @notice Stakes for a new beacon chain validator on the sender's EigenPod. * Also creates an EigenPod for the sender if they don't have one already. * @param pubkey The 48 bytes public key of the beacon chain validator. * @param signature The validator's signature of the deposit data. @@ -41,13 +40,17 @@ interface IEigenPodManager_DeprecatedM1 is IPausable { * @notice Removes beacon chain ETH from EigenLayer on behalf of the owner of an EigenPod, when the * balance of a validator is lower than how much stake they have committed to EigenLayer * @param podOwner The owner of the pod whose balance must be removed. - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to * the StrategyManager in case it must be removed from the list of the podOwner's strategies * @param amount The amount of ETH to remove. * @dev Callable only by the podOwner's EigenPod contract. */ - function recordOvercommittedBeaconChainETH(address podOwner, uint256 beaconChainETHStrategyIndex, uint256 amount) external; - + function recordOvercommittedBeaconChainETH( + address podOwner, + uint256 beaconChainETHStrategyIndex, + uint256 amount + ) external; + /** * @notice Withdraws ETH from an EigenPod. The ETH must have first been withdrawn from the beacon chain. * @param podOwner The owner of the pod whose balance must be withdrawn. @@ -62,25 +65,35 @@ interface IEigenPodManager_DeprecatedM1 is IPausable { * @param newBeaconChainOracle is the new oracle contract being pointed to * @dev Callable only by the owner of this contract (i.e. governance) */ - function updateBeaconChainOracle(IBeaconChainOracle_DeprecatedM1 newBeaconChainOracle) external; + function updateBeaconChainOracle( + IBeaconChainOracle_DeprecatedM1 newBeaconChainOracle + ) external; /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed. - function ownerToPod(address podOwner) external view returns(IEigenPod_DeprecatedM1); + function ownerToPod( + address podOwner + ) external view returns (IEigenPod_DeprecatedM1); /// @notice Returns the address of the `podOwner`'s EigenPod (whether it is deployed yet or not). - function getPod(address podOwner) external view returns(IEigenPod_DeprecatedM1); + function getPod( + address podOwner + ) external view returns (IEigenPod_DeprecatedM1); /// @notice Oracle contract that provides updates to the beacon chain's state - function beaconChainOracle() external view returns(IBeaconChainOracle_DeprecatedM1); + function beaconChainOracle() external view returns (IBeaconChainOracle_DeprecatedM1); /// @notice Returns the Beacon Chain state root at `blockNumber`. Reverts if the Beacon Chain state root at `blockNumber` has not yet been finalized. - function getBeaconChainStateRoot(uint64 blockNumber) external view returns(bytes32); + function getBeaconChainStateRoot( + uint64 blockNumber + ) external view returns (bytes32); /// @notice EigenLayer's StrategyManager contract - function strategyManager() external view returns(IStrategyManager_DeprecatedM1); + function strategyManager() external view returns (IStrategyManager_DeprecatedM1); /// @notice EigenLayer's Slasher contract - function slasher() external view returns(ISlasher); + function slasher() external view returns (ISlasher); - function hasPod(address podOwner) external view returns (bool); + function hasPod( + address podOwner + ) external view returns (bool); } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol index be5745683..6bd20af2a 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol @@ -42,14 +42,11 @@ interface IStrategyManager_DeprecatedM1 { * @return shares The amount of new shares in the `strategy` created as part of the action. * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. * @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen). - * + * * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors * where the token balance and corresponding strategy shares are not in sync upon reentrancy. */ - function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) - external - returns (uint256 shares); - + function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) external returns (uint256 shares); /** * @notice Deposits `amount` of beaconchain ETH into this contract on behalf of `staker` @@ -66,13 +63,16 @@ interface IStrategyManager_DeprecatedM1 { * @param amount is the amount to decrement the slashedAddress's beaconChainETHStrategy shares * @dev Only callable by EigenPodManager. */ - function recordOvercommittedBeaconChainETH(address overcommittedPodOwner, uint256 beaconChainETHStrategyIndex, uint256 amount) - external; + function recordOvercommittedBeaconChainETH( + address overcommittedPodOwner, + uint256 beaconChainETHStrategyIndex, + uint256 amount + ) external; /** * @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`, * who must sign off on the action. - * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed + * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed * purely to help one address deposit 'for' another. * @param strategy is the specified strategy where deposit is to be made, * @param token is the denomination in which the deposit is to be made, @@ -86,7 +86,7 @@ interface IStrategyManager_DeprecatedM1 { * @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those * targeting stakers who may be attempting to undelegate. * @dev Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the `staker` is frozen). - * + * * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors * where the token balance and corresponding strategy shares are not in sync upon reentrancy */ @@ -97,9 +97,7 @@ interface IStrategyManager_DeprecatedM1 { address staker, uint256 expiry, bytes memory signature - ) - external - returns (uint256 shares); + ) external returns (uint256 shares); /// @notice Returns the current shares of `user` in `strategy` function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint256 shares); @@ -108,10 +106,14 @@ interface IStrategyManager_DeprecatedM1 { * @notice Get all details on the depositor's deposits and corresponding shares * @return (depositor's strategies, shares in these strategies) */ - function getDeposits(address depositor) external view returns (IStrategy[] memory, uint256[] memory); + function getDeposits( + address depositor + ) external view returns (IStrategy[] memory, uint256[] memory); /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. - function stakerStrategyListLength(address staker) external view returns (uint256); + function stakerStrategyListLength( + address staker + ) external view returns (uint256); /** * @notice Called by a staker to queue a withdrawal of the given amount of `shares` from each of the respective given `strategies`. @@ -134,7 +136,7 @@ interface IStrategyManager_DeprecatedM1 { * is to order the strategies *for which `msg.sender` is withdrawing 100% of their shares* from highest index in * `stakerStrategyList` to lowest index * @dev Note that if the withdrawal includes shares in the enshrined 'beaconChainETH' strategy, then it must *only* include shares in this strategy, and - * `withdrawer` must match the caller's address. The first condition is because slashing of queued withdrawals cannot be guaranteed + * `withdrawer` must match the caller's address. The first condition is because slashing of queued withdrawals cannot be guaranteed * for Beacon Chain ETH (since we cannot trigger a withdrawal from the beacon chain through a smart contract) and the second condition is because shares in * the enshrined 'beaconChainETH' strategy technically represent non-fungible positions (deposits to the Beacon Chain, each pointed at a specific EigenPod). */ @@ -144,9 +146,8 @@ interface IStrategyManager_DeprecatedM1 { uint256[] calldata shares, address withdrawer, bool undelegateIfPossible - ) - external returns(bytes32); - + ) external returns (bytes32); + /** * @notice Used to complete the specified `queuedWithdrawal`. The function caller must match `queuedWithdrawal.withdrawer` * @param queuedWithdrawal The QueuedWithdrawal to complete. @@ -163,9 +164,8 @@ interface IStrategyManager_DeprecatedM1 { IERC20[] calldata tokens, uint256 middlewareTimesIndex, bool receiveAsTokens - ) - external; - + ) external; + /** * @notice Used to complete the specified `queuedWithdrawals`. The function caller must match `queuedWithdrawals[...].withdrawer` * @param queuedWithdrawals The QueuedWithdrawals to complete. @@ -182,8 +182,7 @@ interface IStrategyManager_DeprecatedM1 { IERC20[][] calldata tokens, uint256[] calldata middlewareTimesIndexes, bool[] calldata receiveAsTokens - ) - external; + ) external; /** * @notice Slashes the shares of a 'frozen' operator (or a staker delegated to one) @@ -208,8 +207,7 @@ interface IStrategyManager_DeprecatedM1 { IERC20[] calldata tokens, uint256[] calldata strategyIndexes, uint256[] calldata shareAmounts - ) - external; + ) external; /** * @notice Slashes an existing queued withdrawal that was created by a 'frozen' operator (or a staker delegated to one) @@ -221,28 +219,33 @@ interface IStrategyManager_DeprecatedM1 { * so that, e.g., if the slashed QueuedWithdrawal contains a malicious strategy in the `strategies` array which always reverts on calls to its 'withdraw' function, * then the malicious strategy can be skipped (with the shares in effect "burned"), while the non-malicious strategies are still called as normal. */ - function slashQueuedWithdrawal(address recipient, QueuedWithdrawal calldata queuedWithdrawal, IERC20[] calldata tokens, uint256[] calldata indicesToSkip) - external; + function slashQueuedWithdrawal( + address recipient, + QueuedWithdrawal calldata queuedWithdrawal, + IERC20[] calldata tokens, + uint256[] calldata indicesToSkip + ) external; /// @notice Returns the keccak256 hash of `queuedWithdrawal`. function calculateWithdrawalRoot( QueuedWithdrawal memory queuedWithdrawal - ) - external - pure - returns (bytes32); + ) external pure returns (bytes32); /** * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) - */ - function addStrategiesToDepositWhitelist(IStrategy[] calldata strategiesToWhitelist) external; + */ + function addStrategiesToDepositWhitelist( + IStrategy[] calldata strategiesToWhitelist + ) external; /** * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) - */ - function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external; + */ + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external; /// @notice Returns the single, central Delegation contract of EigenLayer function delegation() external view returns (IDelegationManager); @@ -256,10 +259,12 @@ interface IStrategyManager_DeprecatedM1 { /// @notice Returns the number of blocks that must pass between the time a withdrawal is queued and the time it can be completed function withdrawalDelayBlocks() external view returns (uint256); - - /// VIEW FUNCTIONS FOR PUBLIC VARIABLES, NOT IN ORIGINAL INTERFACE - function withdrawalRootPending(bytes32 withdrawalRoot) external view returns (bool); + function withdrawalRootPending( + bytes32 withdrawalRoot + ) external view returns (bool); - function numWithdrawalsQueued(address staker) external view returns (uint256); + function numWithdrawalsQueued( + address staker + ) external view returns (uint256); } diff --git a/src/test/integration/mocks/BeaconChainMock.t.sol b/src/test/integration/mocks/BeaconChainMock.t.sol index 81958fef8..32772869b 100644 --- a/src/test/integration/mocks/BeaconChainMock.t.sol +++ b/src/test/integration/mocks/BeaconChainMock.t.sol @@ -39,7 +39,6 @@ struct StaleBalanceProofs { } contract BeaconChainMock is PrintUtils { - Vm cheats = Vm(HEVM_ADDRESS); struct Validator { @@ -53,8 +52,8 @@ contract BeaconChainMock is PrintUtils { } /// @dev All withdrawals are processed with index == 0 - uint constant GWEI_TO_WEI = 1e9; - uint constant ZERO_NODES_LENGTH = 100; + uint256 constant GWEI_TO_WEI = 1e9; + uint256 constant ZERO_NODES_LENGTH = 100; // Rewards given to each validator during epoch processing uint64 public constant CONSENSUS_REWARD_AMOUNT_GWEI = 1; @@ -63,28 +62,26 @@ contract BeaconChainMock is PrintUtils { /// PROOF CONSTANTS (PROOF LENGTHS, FIELD SIZES): // see https://eth2book.info/capella/part3/containers/state/#beaconstate - uint constant BEACON_STATE_FIELDS = 32; + uint256 constant BEACON_STATE_FIELDS = 32; // see https://eth2book.info/capella/part3/containers/blocks/#beaconblock - uint constant BEACON_BLOCK_FIELDS = 5; - - uint immutable BLOCKROOT_PROOF_LEN = 32 * BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT; - uint immutable VAL_FIELDS_PROOF_LEN = 32 * ( - (BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1) + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT - ); - uint immutable BALANCE_CONTAINER_PROOF_LEN = 32 * ( - BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT - ); - uint immutable BALANCE_PROOF_LEN = 32 * (BeaconChainProofs.BALANCE_TREE_HEIGHT + 1); - + uint256 constant BEACON_BLOCK_FIELDS = 5; + + uint256 immutable BLOCKROOT_PROOF_LEN = 32 * BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT; + uint256 immutable VAL_FIELDS_PROOF_LEN = + 32 * ((BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1) + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT); + uint256 immutable BALANCE_CONTAINER_PROOF_LEN = + 32 * (BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT); + uint256 immutable BALANCE_PROOF_LEN = 32 * (BeaconChainProofs.BALANCE_TREE_HEIGHT + 1); + uint64 genesisTime; uint64 public nextTimestamp; EigenPodManager eigenPodManager; EIP_4788_Oracle_Mock constant EIP_4788_ORACLE = EIP_4788_Oracle_Mock(0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02); - + /** * BeaconState containers, used for proofgen: - * https://eth2book.info/capella/part3/containers/state/#beaconstate + * https://eth2book.info/capella/part3/containers/state/#beaconstate */ // Validator container, references every validator created so far @@ -105,7 +102,7 @@ contract BeaconChainMock is PrintUtils { mapping(uint64 => bytes32) beaconBlockRoots; // Keeps track of the index of the last validator we've seen during epoch processing - uint lastIndexProcessed; + uint256 lastIndexProcessed; uint64 curTimestamp; // Maps block.timestamp -> beacon state root and proof @@ -119,9 +116,9 @@ contract BeaconChainMock is PrintUtils { // Maps block.timestamp -> balanceRootIndex -> balance proof for that timestamp mapping(uint64 => mapping(uint40 => BalanceRootProof)) balanceRootProofs; - + bytes32[] zeroNodes; - + constructor(EigenPodManager _eigenPodManager, uint64 _genesisTime) { genesisTime = _genesisTime; eigenPodManager = _eigenPodManager; @@ -134,7 +131,7 @@ contract BeaconChainMock is PrintUtils { zeroNodes = new bytes32[](ZERO_NODES_LENGTH); zeroNodes[0] = curNode; - for (uint i = 1; i < zeroNodes.length; i++) { + for (uint256 i = 1; i < zeroNodes.length; i++) { zeroNodes[i] = sha256(abi.encodePacked(curNode, curNode)); curNode = zeroNodes[i]; } @@ -144,9 +141,11 @@ contract BeaconChainMock is PrintUtils { return "BeaconChain"; } - /******************************************************************************* - EXTERNAL METHODS - *******************************************************************************/ + /** + * + * EXTERNAL METHODS + * + */ /// @dev Creates a new validator by: /// - Creating the validator container @@ -157,16 +156,16 @@ contract BeaconChainMock is PrintUtils { ) public payable returns (uint40) { _logM("newValidator"); - uint balanceWei = msg.value; + uint256 balanceWei = msg.value; // These checks mimic the checks made in the beacon chain deposit contract // - // We sanity-check them here because this contract sorta acts like the + // We sanity-check them here because this contract sorta acts like the // deposit contract and this ensures we only create validators that could // exist IRL require(balanceWei >= 1 ether, "BeaconChainMock.newValidator: deposit value too low"); require(balanceWei % 1 gwei == 0, "BeaconChainMock.newValidator: value not multiple of gwei"); - uint depositAmount = balanceWei / GWEI_TO_WEI; + uint256 depositAmount = balanceWei / GWEI_TO_WEI; require(depositAmount <= type(uint64).max, "BeaconChainMock.newValidator: deposit value too high"); // Create new validator and return its unique index @@ -190,7 +189,9 @@ contract BeaconChainMock is PrintUtils { /// `exitValidator` combines steps 1 and 2 into this method. /// /// TODO we may need to advance a slot here to maintain the properties we want in startCheckpoint - function exitValidator(uint40 validatorIndex) public returns (uint64 exitedBalanceGwei) { + function exitValidator( + uint40 validatorIndex + ) public returns (uint64 exitedBalanceGwei) { _logM("exitValidator"); // Update validator.exitEpoch @@ -198,22 +199,24 @@ contract BeaconChainMock is PrintUtils { require(!v.isDummy, "BeaconChainMock: attempting to exit dummy validator. We need those for proofgen >:("); require(v.exitEpoch == BeaconChainProofs.FAR_FUTURE_EPOCH, "BeaconChainMock: validator already exited"); v.exitEpoch = currentEpoch() + 1; - + // Set current balance to 0 exitedBalanceGwei = _currentBalanceGwei(validatorIndex); _setCurrentBalance(validatorIndex, 0); // Send current balance to pod address destination = _toAddress(validators[validatorIndex].withdrawalCreds); - cheats.deal(destination, address(destination).balance + uint(uint(exitedBalanceGwei) * GWEI_TO_WEI)); + cheats.deal(destination, address(destination).balance + uint256(uint256(exitedBalanceGwei) * GWEI_TO_WEI)); return exitedBalanceGwei; } - function slashValidators(uint40[] memory _validators) public returns (uint64 slashedBalanceGwei) { + function slashValidators( + uint40[] memory _validators + ) public returns (uint64 slashedBalanceGwei) { _logM("slashValidators"); - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { uint40 validatorIndex = _validators[i]; Validator storage v = validators[validatorIndex]; require(!v.isDummy, "BeaconChainMock: attempting to exit dummy validator. We need those for proofgen >:("); @@ -223,7 +226,7 @@ contract BeaconChainMock is PrintUtils { v.isSlashed = true; v.exitEpoch = currentEpoch() + 1; } - + // Calculate slash amount uint64 curBalanceGwei = _currentBalanceGwei(validatorIndex); if (SLASH_AMOUNT_GWEI > curBalanceGwei) { @@ -250,7 +253,7 @@ contract BeaconChainMock is PrintUtils { /// - State root calculated and credential/balance proofs generated for all validators /// - Send state root to 4788 oracle /// - /// Note: + /// Note: /// - DOES generate consensus rewards for ALL non-exited validators /// - DOES withdraw in excess of 32 ETH / if validator is exited function advanceEpoch() public { @@ -271,7 +274,7 @@ contract BeaconChainMock is PrintUtils { /// - DOES withdraw in excess of 32 ETH / if validator is exited function advanceEpoch_NoRewards() public { _logM("advanceEpoch_NoRewards"); - + _withdrawExcess(); _advanceEpoch(); @@ -281,13 +284,13 @@ contract BeaconChainMock is PrintUtils { /// are over 32 ETH. This exists to support tests that check share increases solely /// due to beacon chain balance changes. /// - /// Note: + /// Note: /// - DOES generate consensus rewards for ALL non-exited validators /// - does NOT withdraw in excess of 32 ETH /// - does NOT withdraw if validator is exited function advanceEpoch_NoWithdraw() public { _logM("advanceEpoch_NoWithdraw"); - + _generateRewards(); _advanceEpoch(); @@ -296,8 +299,8 @@ contract BeaconChainMock is PrintUtils { /// @dev Iterate over all validators. If the validator is still active, /// add CONSENSUS_REWARD_AMOUNT_GWEI to its current balance function _generateRewards() internal { - uint totalRewarded; - for (uint i = 0; i < validators.length; i++) { + uint256 totalRewarded; + for (uint256 i = 0; i < validators.length; i++) { Validator storage v = validators[i]; if (v.isDummy) continue; // don't process dummy validators @@ -317,14 +320,14 @@ contract BeaconChainMock is PrintUtils { /// @dev Iterate over all validators. If the validator has > 32 ETH current balance /// OR is exited, withdraw the excess to the validator's withdrawal address. function _withdrawExcess() internal { - uint totalExcessWei; - for (uint i = 0; i < validators.length; i++) { + uint256 totalExcessWei; + for (uint256 i = 0; i < validators.length; i++) { Validator storage v = validators[i]; if (v.isDummy) continue; // don't process dummy validators - uint balanceWei = uint(_currentBalanceGwei(uint40(i))) * GWEI_TO_WEI; + uint256 balanceWei = uint256(_currentBalanceGwei(uint40(i))) * GWEI_TO_WEI; address destination = _toAddress(v.withdrawalCreds); - uint excessBalanceWei; + uint256 excessBalanceWei; uint64 newBalanceGwei = uint64(balanceWei / GWEI_TO_WEI); // If the validator has exited, withdraw any existing balance @@ -348,13 +351,14 @@ contract BeaconChainMock is PrintUtils { _setCurrentBalance(uint40(i), newBalanceGwei); } - if (totalExcessWei != 0) + if (totalExcessWei != 0) { _log("- withdrew excess balance", totalExcessWei); + } } function _advanceEpoch() public { // Update effective balances for each validator - for (uint i = 0; i < validators.length; i++) { + for (uint256 i = 0; i < validators.length; i++) { Validator storage v = validators[i]; if (v.isDummy) continue; // don't process dummy validators @@ -392,7 +396,7 @@ contract BeaconChainMock is PrintUtils { _log("-- no validators; added empty block root"); return; } - + // Build merkle tree for validators bytes32 validatorsRoot = _buildMerkleTree({ leaves: _getValidatorLeaves(), @@ -400,7 +404,7 @@ contract BeaconChainMock is PrintUtils { tree: trees[curTimestamp].validatorTree }); // _log("-- validator container root", validatorsRoot); - + // Build merkle tree for current balances bytes32 balanceContainerRoot = _buildMerkleTree({ leaves: _getBalanceLeaves(), @@ -408,7 +412,7 @@ contract BeaconChainMock is PrintUtils { tree: trees[curTimestamp].balancesTree }); // _log("-- balances container root", balanceContainerRoot); - + // Build merkle tree for BeaconState bytes32 beaconStateRoot = _buildMerkleTree({ leaves: _getBeaconStateLeaves(validatorsRoot, balanceContainerRoot), @@ -435,10 +439,11 @@ contract BeaconChainMock is PrintUtils { _genBalanceProofs(); } - /******************************************************************************* - INTERNAL FUNCTIONS - *******************************************************************************/ - + /** + * + * INTERNAL FUNCTIONS + * + */ function _createValidator(bytes memory withdrawalCreds, uint64 balanceGwei) internal returns (uint40) { uint40 validatorIndex = uint40(validators.length); @@ -452,16 +457,20 @@ contract BeaconChainMock is PrintUtils { uint64 dummyBalanceGwei = type(uint64).max - uint64(validators.length); bytes memory _dummyPubkey = new bytes(48); - assembly { mstore(add(48, _dummyPubkey), validatorIndex) } - validators.push(Validator({ - isDummy: true, - isSlashed: false, - pubkeyHash: sha256(abi.encodePacked(_dummyPubkey, bytes16(0))), - withdrawalCreds: "", - effectiveBalanceGwei: dummyBalanceGwei, - activationEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH, - exitEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH - })); + assembly { + mstore(add(48, _dummyPubkey), validatorIndex) + } + validators.push( + Validator({ + isDummy: true, + isSlashed: false, + pubkeyHash: sha256(abi.encodePacked(_dummyPubkey, bytes16(0))), + withdrawalCreds: "", + effectiveBalanceGwei: dummyBalanceGwei, + activationEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH, + exitEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH + }) + ); _setCurrentBalance(validatorIndex, dummyBalanceGwei); validatorIndex++; @@ -469,16 +478,20 @@ contract BeaconChainMock is PrintUtils { // Use pubkey format from `EigenPod._calculateValidatorPubkeyHash` bytes memory _pubkey = new bytes(48); - assembly { mstore(add(48, _pubkey), validatorIndex) } - validators.push(Validator({ - isDummy: false, - isSlashed: false, - pubkeyHash: sha256(abi.encodePacked(_pubkey, bytes16(0))), - withdrawalCreds: withdrawalCreds, - effectiveBalanceGwei: balanceGwei, - activationEpoch: currentEpoch(), - exitEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH - })); + assembly { + mstore(add(48, _pubkey), validatorIndex) + } + validators.push( + Validator({ + isDummy: false, + isSlashed: false, + pubkeyHash: sha256(abi.encodePacked(_pubkey, bytes16(0))), + withdrawalCreds: withdrawalCreds, + effectiveBalanceGwei: balanceGwei, + activationEpoch: currentEpoch(), + exitEpoch: BeaconChainProofs.FAR_FUTURE_EPOCH + }) + ); _setCurrentBalance(validatorIndex, balanceGwei); return validatorIndex; @@ -514,18 +527,18 @@ contract BeaconChainMock is PrintUtils { /// _createValidator adds "dummy" validators every 4 validators created, with a unique /// balance value. This ensures each balance root is unique. function _buildMerkleTree( - bytes32[] memory leaves, - uint treeHeight, + bytes32[] memory leaves, + uint256 treeHeight, Tree storage tree ) internal returns (bytes32) { - for (uint depth = 0; depth < treeHeight; depth++) { - uint newLength = (leaves.length + 1) / 2; + for (uint256 depth = 0; depth < treeHeight; depth++) { + uint256 newLength = (leaves.length + 1) / 2; bytes32[] memory newLeaves = new bytes32[](newLength); // Hash each pair of nodes in this level of the tree - for (uint i = 0; i < newLength; i++) { - uint leftIdx = 2 * i; - uint rightIdx = leftIdx + 1; + for (uint256 i = 0; i < newLength; i++) { + uint256 leftIdx = 2 * i; + uint256 rightIdx = leftIdx + 1; // Get left leaf bytes32 leftLeaf = leaves[leftIdx]; @@ -559,95 +572,82 @@ contract BeaconChainMock is PrintUtils { return leaves[0]; } - function _genStateRootProof(bytes32 beaconStateRoot) internal { + function _genStateRootProof( + bytes32 beaconStateRoot + ) internal { bytes memory proof = new bytes(BLOCKROOT_PROOF_LEN); bytes32 curNode = beaconStateRoot; - uint depth = 0; - for (uint i = 0; i < BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT; i++) { + uint256 depth = 0; + for (uint256 i = 0; i < BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT; i++) { bytes32 sibling = trees[curTimestamp].blockTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, i))), - sibling - ) + mstore(add(proof, add(32, mul(32, i))), sibling) } curNode = trees[curTimestamp].blockTree.parents[curNode]; depth++; } - stateRootProofs[curTimestamp] = BeaconChainProofs.StateRootProof({ - beaconStateRoot: beaconStateRoot, - proof: proof - }); + stateRootProofs[curTimestamp] = + BeaconChainProofs.StateRootProof({beaconStateRoot: beaconStateRoot, proof: proof}); } - function _genBalanceContainerProof(bytes32 balanceContainerRoot) internal { + function _genBalanceContainerProof( + bytes32 balanceContainerRoot + ) internal { bytes memory proof = new bytes(BALANCE_CONTAINER_PROOF_LEN); bytes32 curNode = balanceContainerRoot; - uint totalHeight = BALANCE_CONTAINER_PROOF_LEN / 32; - uint depth = 0; - for (uint i = 0; i < BeaconChainProofs.BEACON_STATE_TREE_HEIGHT; i++) { + uint256 totalHeight = BALANCE_CONTAINER_PROOF_LEN / 32; + uint256 depth = 0; + for (uint256 i = 0; i < BeaconChainProofs.BEACON_STATE_TREE_HEIGHT; i++) { bytes32 sibling = trees[curTimestamp].stateTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, i))), - sibling - ) + mstore(add(proof, add(32, mul(32, i))), sibling) } curNode = trees[curTimestamp].stateTree.parents[curNode]; depth++; } - for (uint i = depth; i < totalHeight; i++) { + for (uint256 i = depth; i < totalHeight; i++) { bytes32 sibling = trees[curTimestamp].blockTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, i))), - sibling - ) + mstore(add(proof, add(32, mul(32, i))), sibling) } curNode = trees[curTimestamp].blockTree.parents[curNode]; depth++; } - balanceContainerProofs[curTimestamp] = BeaconChainProofs.BalanceContainerProof({ - balanceContainerRoot: balanceContainerRoot, - proof: proof - }); + balanceContainerProofs[curTimestamp] = + BeaconChainProofs.BalanceContainerProof({balanceContainerRoot: balanceContainerRoot, proof: proof}); } function _genCredentialProofs() internal { mapping(uint40 => ValidatorFieldsProof) storage vfProofs = validatorFieldsProofs[curTimestamp]; // Calculate credential proofs for each validator - for (uint i = 0; i < validators.length; i++) { - + for (uint256 i = 0; i < validators.length; i++) { bytes memory proof = new bytes(VAL_FIELDS_PROOF_LEN); bytes32[] memory validatorFields = _getValidatorFields(uint40(i)); bytes32 curNode = Merkle.merkleizeSha256(validatorFields); // Validator fields leaf -> validator container root - uint depth = 0; - for (uint j = 0; j < 1 + BeaconChainProofs.VALIDATOR_TREE_HEIGHT; j++) { + uint256 depth = 0; + for (uint256 j = 0; j < 1 + BeaconChainProofs.VALIDATOR_TREE_HEIGHT; j++) { bytes32 sibling = trees[curTimestamp].validatorTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, j))), - sibling - ) + mstore(add(proof, add(32, mul(32, j))), sibling) } curNode = trees[curTimestamp].validatorTree.parents[curNode]; @@ -656,18 +656,15 @@ contract BeaconChainMock is PrintUtils { // Validator container root -> beacon state root for ( - uint j = depth; - j < 1 + BeaconChainProofs.VALIDATOR_TREE_HEIGHT + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT; + uint256 j = depth; + j < 1 + BeaconChainProofs.VALIDATOR_TREE_HEIGHT + BeaconChainProofs.BEACON_STATE_TREE_HEIGHT; j++ ) { bytes32 sibling = trees[curTimestamp].stateTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, j))), - sibling - ) + mstore(add(proof, add(32, mul(32, j))), sibling) } curNode = trees[curTimestamp].stateTree.parents[curNode]; @@ -683,24 +680,20 @@ contract BeaconChainMock is PrintUtils { mapping(uint40 => BalanceRootProof) storage brProofs = balanceRootProofs[curTimestamp]; // Calculate current balance proofs for each balance root - uint numBalanceRoots = _numBalanceRoots(); - for (uint i = 0; i < numBalanceRoots; i++) { - + uint256 numBalanceRoots = _numBalanceRoots(); + for (uint256 i = 0; i < numBalanceRoots; i++) { bytes memory proof = new bytes(BALANCE_PROOF_LEN); bytes32 balanceRoot = balances[uint40(i)]; bytes32 curNode = balanceRoot; // Balance root leaf -> balances container root - uint depth = 0; - for (uint j = 0; j < 1 + BeaconChainProofs.BALANCE_TREE_HEIGHT; j++) { + uint256 depth = 0; + for (uint256 j = 0; j < 1 + BeaconChainProofs.BALANCE_TREE_HEIGHT; j++) { bytes32 sibling = trees[curTimestamp].balancesTree.siblings[curNode]; // proof[j] = sibling; assembly { - mstore( - add(proof, add(32, mul(32, j))), - sibling - ) + mstore(add(proof, add(32, mul(32, j))), sibling) } curNode = trees[curTimestamp].balancesTree.parents[curNode]; @@ -714,12 +707,10 @@ contract BeaconChainMock is PrintUtils { function _getValidatorLeaves() internal view returns (bytes32[] memory) { bytes32[] memory leaves = new bytes32[](validators.length); - + // Place each validator's validatorFields into tree - for (uint i = 0; i < validators.length; i++) { - leaves[i] = Merkle.merkleizeSha256( - _getValidatorFields(uint40(i)) - ); + for (uint256 i = 0; i < validators.length; i++) { + leaves[i] = Merkle.merkleizeSha256(_getValidatorFields(uint40(i))); } return leaves; @@ -728,25 +719,27 @@ contract BeaconChainMock is PrintUtils { function _getBalanceLeaves() internal view returns (bytes32[] memory) { // Place each validator's current balance into tree bytes32[] memory leaves = new bytes32[](_numBalanceRoots()); - for (uint i = 0; i < leaves.length; i++) { + for (uint256 i = 0; i < leaves.length; i++) { leaves[i] = balances[uint40(i)]; } return leaves; } - function _numBalanceRoots() internal view returns (uint) { + function _numBalanceRoots() internal view returns (uint256) { // Each balance leaf is shared by 4 validators. This uses div_ceil // to calculate the number of balance leaves - return (validators.length == 0) ? - 0 : ((validators.length - 1) / 4) + 1; + return (validators.length == 0) ? 0 : ((validators.length - 1) / 4) + 1; } - function _getBeaconStateLeaves(bytes32 validatorsRoot, bytes32 balancesRoot) internal pure returns (bytes32[] memory) { + function _getBeaconStateLeaves( + bytes32 validatorsRoot, + bytes32 balancesRoot + ) internal pure returns (bytes32[] memory) { bytes32[] memory leaves = new bytes32[](BEACON_STATE_FIELDS); // Pre-populate leaves with dummy values so sibling/parent tracking is correct - for (uint i = 0; i < leaves.length; i++) { + for (uint256 i = 0; i < leaves.length; i++) { leaves[i] = bytes32(i + 1); } @@ -756,11 +749,13 @@ contract BeaconChainMock is PrintUtils { return leaves; } - function _getBeaconBlockLeaves(bytes32 beaconStateRoot) internal pure returns (bytes32[] memory) { + function _getBeaconBlockLeaves( + bytes32 beaconStateRoot + ) internal pure returns (bytes32[] memory) { bytes32[] memory leaves = new bytes32[](BEACON_BLOCK_FIELDS); // Pre-populate leaves with dummy values so sibling/parent tracking is correct - for (uint i = 0; i < leaves.length; i++) { + for (uint256 i = 0; i < leaves.length; i++) { leaves[i] = bytes32(i + 1); } @@ -769,7 +764,9 @@ contract BeaconChainMock is PrintUtils { return leaves; } - function _currentBalanceGwei(uint40 validatorIndex) internal view returns (uint64) { + function _currentBalanceGwei( + uint40 validatorIndex + ) internal view returns (uint64) { return currentBalance(validatorIndex); } @@ -779,41 +776,52 @@ contract BeaconChainMock is PrintUtils { } /// @dev Returns the validator's exit epoch - function exitEpoch(uint40 validatorIndex) public view returns (uint64) { + function exitEpoch( + uint40 validatorIndex + ) public view returns (uint64) { return validators[validatorIndex].exitEpoch; } - function totalEffectiveBalanceWei(uint40[] memory validatorIndices) public view returns (uint) { - uint total; - for (uint i = 0; i < validatorIndices.length; i++) { - total += uint(validators[validatorIndices[i]].effectiveBalanceGwei * GWEI_TO_WEI); + function totalEffectiveBalanceWei( + uint40[] memory validatorIndices + ) public view returns (uint256) { + uint256 total; + for (uint256 i = 0; i < validatorIndices.length; i++) { + total += uint256(validators[validatorIndices[i]].effectiveBalanceGwei * GWEI_TO_WEI); } return total; } /// @dev Returns the validator's effective balance, in gwei - function effectiveBalance(uint40 validatorIndex) public view returns (uint64) { + function effectiveBalance( + uint40 validatorIndex + ) public view returns (uint64) { return validators[validatorIndex].effectiveBalanceGwei; } /// @dev Returns the validator's current balance, in gwei - function currentBalance(uint40 validatorIndex) public view returns (uint64) { - return BeaconChainProofs.getBalanceAtIndex( - getBalanceRoot(validatorIndex), - validatorIndex - ); + function currentBalance( + uint40 validatorIndex + ) public view returns (uint64) { + return BeaconChainProofs.getBalanceAtIndex(getBalanceRoot(validatorIndex), validatorIndex); } - function getBalanceRoot(uint40 validatorIndex) public view returns (bytes32) { + function getBalanceRoot( + uint40 validatorIndex + ) public view returns (bytes32) { return balances[validatorIndex / 4]; } - function _getBalanceRootIndex(uint40 validatorIndex) internal pure returns (uint40) { + function _getBalanceRootIndex( + uint40 validatorIndex + ) internal pure returns (uint40) { return validatorIndex / 4; } - function _getValidatorFields(uint40 validatorIndex) internal view returns (bytes32[] memory) { + function _getValidatorFields( + uint40 validatorIndex + ) internal view returns (bytes32[] memory) { bytes32[] memory vFields = new bytes32[](8); Validator memory v = validators[validatorIndex]; @@ -836,33 +844,40 @@ contract BeaconChainMock is PrintUtils { } /// From EigenPod.sol - function _nextEpochStartTimestamp(uint64 epoch) internal view returns (uint64) { - return - genesisTime + ((1 + epoch) * BeaconChainProofs.SECONDS_PER_EPOCH); + function _nextEpochStartTimestamp( + uint64 epoch + ) internal view returns (uint64) { + return genesisTime + ((1 + epoch) * BeaconChainProofs.SECONDS_PER_EPOCH); } - function _calcValProofIndex(uint40 validatorIndex) internal pure returns (uint) { - return - (BeaconChainProofs.VALIDATOR_CONTAINER_INDEX << (BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1)) | - uint(validatorIndex); + function _calcValProofIndex( + uint40 validatorIndex + ) internal pure returns (uint256) { + return (BeaconChainProofs.VALIDATOR_CONTAINER_INDEX << (BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1)) + | uint256(validatorIndex); } - function _calcBalanceProofIndex(uint40 balanceRootIndex) internal pure returns (uint) { - return - (BeaconChainProofs.BALANCE_CONTAINER_INDEX << (BeaconChainProofs.BALANCE_TREE_HEIGHT + 1)) | - uint(balanceRootIndex); + function _calcBalanceProofIndex( + uint40 balanceRootIndex + ) internal pure returns (uint256) { + return (BeaconChainProofs.BALANCE_CONTAINER_INDEX << (BeaconChainProofs.BALANCE_TREE_HEIGHT + 1)) + | uint256(balanceRootIndex); } - function _getZeroNode(uint depth) internal view returns (bytes32) { + function _getZeroNode( + uint256 depth + ) internal view returns (bytes32) { require(depth < ZERO_NODES_LENGTH, "_getZeroNode: invalid depth"); return zeroNodes[depth]; } /// @dev Opposite of Endian.fromLittleEndianUint64 - function _toLittleEndianUint64(uint64 num) internal pure returns (bytes32) { + function _toLittleEndianUint64( + uint64 num + ) internal pure returns (bytes32) { uint256 lenum; - + // Rearrange the bytes from big-endian to little-endian format lenum |= uint256((num & 0xFF) << 56); lenum |= uint256((num & 0xFF00) << 40); @@ -880,38 +895,49 @@ contract BeaconChainMock is PrintUtils { /// @dev Opposite of BeaconChainProofs.getBalanceAtIndex, calculates a new balance /// root by updating the balance at validatorIndex /// @return The new, updated balance root - function _calcBalanceRoot(bytes32 balanceRoot, uint40 validatorIndex, uint64 newBalanceGwei) internal pure returns (bytes32) { + function _calcBalanceRoot( + bytes32 balanceRoot, + uint40 validatorIndex, + uint64 newBalanceGwei + ) internal pure returns (bytes32) { // Clear out old balance - uint bitShiftAmount = 256 - (64 * ((validatorIndex % 4) + 1)); - uint mask = ~(uint(0xFFFFFFFFFFFFFFFF) << bitShiftAmount); - uint clearedRoot = uint(balanceRoot) & mask; + uint256 bitShiftAmount = 256 - (64 * ((validatorIndex % 4) + 1)); + uint256 mask = ~(uint256(0xFFFFFFFFFFFFFFFF) << bitShiftAmount); + uint256 clearedRoot = uint256(balanceRoot) & mask; // Convert validator balance to little endian and shift to correct position - uint leBalance = uint(_toLittleEndianUint64(newBalanceGwei)); - uint shiftedBalance = leBalance >> (192 - bitShiftAmount); + uint256 leBalance = uint256(_toLittleEndianUint64(newBalanceGwei)); + uint256 shiftedBalance = leBalance >> (192 - bitShiftAmount); return bytes32(clearedRoot | shiftedBalance); } /// @dev Helper to convert 32-byte withdrawal credentials to an address - function _toAddress(bytes memory withdrawalCreds) internal pure returns (address a) { + function _toAddress( + bytes memory withdrawalCreds + ) internal pure returns (address a) { bytes32 creds = bytes32(withdrawalCreds); uint160 mask = type(uint160).max; - assembly { a := and(creds, mask) } + assembly { + a := and(creds, mask) + } } - /******************************************************************************* - VIEW METHODS - *******************************************************************************/ - - function getCredentialProofs(uint40[] memory _validators) public view returns (CredentialProofs memory) { + /** + * + * VIEW METHODS + * + */ + function getCredentialProofs( + uint40[] memory _validators + ) public view returns (CredentialProofs memory) { // If we have not advanced an epoch since a validator was created, no proofs have been // generated for that validator. We check this here and revert early so we don't return // empty proofs. - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { require( - _validators[i] <= lastIndexProcessed, + _validators[i] <= lastIndexProcessed, "BeaconChain.getCredentialProofs: validator has not been included in beacon chain state (DID YOU CALL advanceEpoch YET?)" ); } @@ -924,7 +950,7 @@ contract BeaconChainMock is PrintUtils { }); // Get proofs for each validator - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { ValidatorFieldsProof memory proof = validatorFieldsProofs[curTimestamp][_validators[i]]; proofs.validatorFieldsProofs[i] = proof.validatorFieldsProof; proofs.validatorFields[i] = proof.validatorFields; @@ -933,13 +959,16 @@ contract BeaconChainMock is PrintUtils { return proofs; } - function getCheckpointProofs(uint40[] memory _validators, uint64 timestamp) public view returns (CheckpointProofs memory) { + function getCheckpointProofs( + uint40[] memory _validators, + uint64 timestamp + ) public view returns (CheckpointProofs memory) { // If we have not advanced an epoch since a validator was created, no proofs have been // generated for that validator. We check this here and revert early so we don't return // empty proofs. - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { require( - _validators[i] <= lastIndexProcessed, + _validators[i] <= lastIndexProcessed, "BeaconChain.getCredentialProofs: no checkpoint proof found (did you call advanceEpoch yet?)" ); } @@ -950,7 +979,7 @@ contract BeaconChainMock is PrintUtils { }); // Get proofs for each validator - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { uint40 validatorIndex = _validators[i]; uint40 balanceRootIndex = _getBalanceRootIndex(validatorIndex); BalanceRootProof memory proof = balanceRootProofs[timestamp][balanceRootIndex]; @@ -965,7 +994,9 @@ contract BeaconChainMock is PrintUtils { return proofs; } - function getStaleBalanceProofs(uint40 validatorIndex) public view returns (StaleBalanceProofs memory) { + function getStaleBalanceProofs( + uint40 validatorIndex + ) public view returns (StaleBalanceProofs memory) { ValidatorFieldsProof memory vfProof = validatorFieldsProofs[curTimestamp][validatorIndex]; return StaleBalanceProofs({ beaconTimestamp: curTimestamp, @@ -977,31 +1008,43 @@ contract BeaconChainMock is PrintUtils { }); } - function balanceOfGwei(uint40 validatorIndex) public view returns (uint64) { + function balanceOfGwei( + uint40 validatorIndex + ) public view returns (uint64) { return validators[validatorIndex].effectiveBalanceGwei; } - function pubkeyHash(uint40 validatorIndex) public view returns (bytes32) { + function pubkeyHash( + uint40 validatorIndex + ) public view returns (bytes32) { return validators[validatorIndex].pubkeyHash; } - function pubkey(uint40 validatorIndex) public pure returns (bytes memory) { + function pubkey( + uint40 validatorIndex + ) public pure returns (bytes memory) { bytes memory _pubkey = new bytes(48); - assembly { mstore(add(48, _pubkey), validatorIndex) } + assembly { + mstore(add(48, _pubkey), validatorIndex) + } return _pubkey; } - function getPubkeyHashes(uint40[] memory _validators) public view returns (bytes32[] memory) { + function getPubkeyHashes( + uint40[] memory _validators + ) public view returns (bytes32[] memory) { bytes32[] memory pubkeyHashes = new bytes32[](_validators.length); - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { pubkeyHashes[i] = validators[_validators[i]].pubkeyHash; } return pubkeyHashes; } - function isActive(uint40 validatorIndex) public view returns (bool) { + function isActive( + uint40 validatorIndex + ) public view returns (bool) { return validators[validatorIndex].exitEpoch == BeaconChainProofs.FAR_FUTURE_EPOCH; } } diff --git a/src/test/integration/mocks/EIP_4788_Oracle_Mock.t.sol b/src/test/integration/mocks/EIP_4788_Oracle_Mock.t.sol index b83aac72a..60a5e6f89 100644 --- a/src/test/integration/mocks/EIP_4788_Oracle_Mock.t.sol +++ b/src/test/integration/mocks/EIP_4788_Oracle_Mock.t.sol @@ -2,15 +2,14 @@ pragma solidity ^0.8.12; contract EIP_4788_Oracle_Mock { + mapping(uint256 => bytes32) blockRoots; - mapping(uint => bytes32) blockRoots; - - uint constant HISTORY_BUFFER_LENGTH = 8191; + uint256 constant HISTORY_BUFFER_LENGTH = 8191; fallback() external { require(msg.data.length == 32, "4788OracleMock.fallback: malformed msg.data"); - uint timestamp = abi.decode(msg.data, (uint)); + uint256 timestamp = abi.decode(msg.data, (uint256)); require(timestamp != 0, "4788OracleMock.fallback: timestamp is 0"); bytes32 blockRoot = blockRoots[timestamp]; @@ -22,7 +21,9 @@ contract EIP_4788_Oracle_Mock { } } - function timestampToBlockRoot(uint timestamp) public view returns (bytes32) { + function timestampToBlockRoot( + uint256 timestamp + ) public view returns (bytes32) { return blockRoots[uint64(timestamp)]; } diff --git a/src/test/integration/tests/Delegate_Deposit_Queue_Complete.t.sol b/src/test/integration/tests/Delegate_Deposit_Queue_Complete.t.sol index 1c20e1807..1f713e8fa 100644 --- a/src/test/integration/tests/Delegate_Deposit_Queue_Complete.t.sol +++ b/src/test/integration/tests/Delegate_Deposit_Queue_Complete.t.sol @@ -5,8 +5,9 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { - - function testFuzz_delegate_deposit_queue_completeAsShares(uint24 _random) public { + function testFuzz_delegate_deposit_queue_completeAsShares( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -14,8 +15,8 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { _userTypes: DEFAULT | ALT_METHODS }); // Create a staker and an operator with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); @@ -25,7 +26,7 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { // 2. Deposit into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); // Check that the deposit increased operator shares the staker is delegated to check_Deposit_State(staker, strategies, shares); @@ -38,13 +39,15 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { // 4. Complete Queued Withdrawal _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { staker.completeWithdrawalAsShares(withdrawals[i]); check_Withdrawal_AsShares_State(staker, operator, withdrawals[i], strategies, shares); } } - function testFuzz_delegate_deposit_queue_completeAsTokens(uint24 _random) public { + function testFuzz_delegate_deposit_queue_completeAsTokens( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -53,8 +56,8 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { }); // Create a staker and an operator with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); @@ -64,7 +67,7 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { // 2. Deposit into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); // Check that the deposit increased operator shares the staker is delegated to check_Deposit_State(staker, strategies, shares); @@ -77,10 +80,12 @@ contract Integration_Delegate_Deposit_Queue_Complete is IntegrationCheckUtils { // 4. Complete Queued Withdrawal _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); + for (uint256 i = 0; i < withdrawals.length; i++) { + uint256[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator, withdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator, withdrawals[i], strategies, shares, tokens, expectedTokens + ); } } } diff --git a/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol b/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol index 7a703dea9..4da537121 100644 --- a/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol @@ -5,18 +5,21 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { - - /******************************************************************************* - FULL WITHDRAWALS - *******************************************************************************/ + /** + * + * FULL WITHDRAWALS + * + */ /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies /// 2. delegates to an operator /// 3. queues a withdrawal for a ALL shares /// 4. completes the queued withdrawal as tokens - function testFuzz_deposit_delegate_queue_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_queue_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -28,16 +31,12 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // - corresponding to a random subset of valid strategies (StrategyManager and/or EigenPodManager) // // ... check that the staker has no delegatable shares and isn't currently delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -62,13 +61,21 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { for (uint256 i = 0; i < withdrawals.length; i++) { uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator, withdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator, withdrawals[i], strategies, shares, tokens, expectedTokens + ); } // Check final state: - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + assertEq( + address(operator), + delegationManager.delegatedTo(address(staker)), + "staker should still be delegated to operator" + ); assert_HasNoDelegatableShares(staker, "staker should have withdrawn all shares"); - assert_HasUnderlyingTokenBalances(staker, strategies, tokenBalances, "staker should once again have original token balances"); + assert_HasUnderlyingTokenBalances( + staker, strategies, tokenBalances, "staker should once again have original token balances" + ); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } @@ -77,8 +84,10 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { /// 2. delegates to an operator /// 3. queues a withdrawal for a ALL shares /// 4. completes the queued withdrawal as shares - function testFuzz_deposit_delegate_queue_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_queue_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -90,16 +99,12 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // - corresponding to a random subset of valid strategies (StrategyManager and/or EigenPodManager) // // ... check that the staker has no delegatable shares and isn't currently delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -127,23 +132,31 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { } // Check final state: - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + assertEq( + address(operator), + delegationManager.delegatedTo(address(staker)), + "staker should still be delegated to operator" + ); assert_HasExpectedShares(staker, strategies, shares, "staker should have all original shares"); assert_HasNoUnderlyingTokenBalance(staker, strategies, "staker not have any underlying tokens"); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - /******************************************************************************* - RANDOM WITHDRAWALS - *******************************************************************************/ + /** + * + * RANDOM WITHDRAWALS + * + */ /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies /// 2. delegates to an operator /// 3. queues a withdrawal for a random subset of shares /// 4. completes the queued withdrawal as tokens - function testFuzz_deposit_delegate_queueRand_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_queueRand_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -155,16 +168,12 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // - corresponding to a random subset of valid strategies (StrategyManager and/or EigenPodManager) // // ... check that the staker has no delegatable shares and isn't currently delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -179,10 +188,7 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // 3. Queue Withdrawals // Randomly select one or more assets to withdraw - ( - IStrategy[] memory withdrawStrats, - uint[] memory withdrawShares - ) = _randWithdrawal(strategies, shares); + (IStrategy[] memory withdrawStrats, uint256[] memory withdrawShares) = _randWithdrawal(strategies, shares); IDelegationManager.Withdrawal[] memory withdrawals = staker.queueWithdrawals(withdrawStrats, withdrawShares); bytes32[] memory withdrawalRoots = _getWithdrawalHashes(withdrawals); @@ -194,11 +200,17 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { for (uint256 i = 0; i < withdrawals.length; i++) { uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator, withdrawals[i], withdrawStrats, withdrawShares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator, withdrawals[i], withdrawStrats, withdrawShares, tokens, expectedTokens + ); } // Check final state: - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + assertEq( + address(operator), + delegationManager.delegatedTo(address(staker)), + "staker should still be delegated to operator" + ); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } @@ -207,8 +219,10 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { /// 2. delegates to an operator /// 3. queues a withdrawal for a random subset of shares /// 4. completes the queued withdrawal as shares - function testFuzz_deposit_delegate_queueRand_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_queueRand_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -220,16 +234,12 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // - corresponding to a random subset of valid strategies (StrategyManager and/or EigenPodManager) // // ... check that the staker has no delegatable shares and isn't currently delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -244,10 +254,7 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // 3. Queue Withdrawals // Randomly select one or more assets to withdraw - ( - IStrategy[] memory withdrawStrats, - uint[] memory withdrawShares - ) = _randWithdrawal(strategies, shares); + (IStrategy[] memory withdrawStrats, uint256[] memory withdrawShares) = _randWithdrawal(strategies, shares); IDelegationManager.Withdrawal[] memory withdrawals = staker.queueWithdrawals(withdrawStrats, withdrawShares); bytes32[] memory withdrawalRoots = _getWithdrawalHashes(withdrawals); @@ -257,21 +264,27 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { // Fast forward to when we can complete the withdrawal _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { staker.completeWithdrawalAsShares(withdrawals[i]); check_Withdrawal_AsShares_State(staker, operator, withdrawals[i], withdrawStrats, withdrawShares); } // Check final state: - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + assertEq( + address(operator), + delegationManager.delegatedTo(address(staker)), + "staker should still be delegated to operator" + ); assert_HasExpectedShares(staker, strategies, shares, "staker should have all original shares"); assert_HasNoUnderlyingTokenBalance(staker, strategies, "staker not have any underlying tokens"); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - /******************************************************************************* - UNHAPPY PATH TESTS - *******************************************************************************/ + /** + * + * UNHAPPY PATH TESTS + * + */ /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies @@ -279,7 +292,9 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { /// 2. delegates to an operator /// /// ... we check that the final step fails - function testFuzz_deposit_delegate_revert_alreadyDelegated(uint24 _random) public { + function testFuzz_deposit_delegate_revert_alreadyDelegated( + uint24 _random + ) public { _configRand({ _randomSeed: _random, _assetTypes: NO_ASSETS | HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -287,16 +302,12 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { }); /// 0. Create a staker and operator - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); diff --git a/src/test/integration/tests/Deposit_Delegate_Redelegate_Complete.t.sol b/src/test/integration/tests/Deposit_Delegate_Redelegate_Complete.t.sol index e5bc6b91d..9607163b6 100644 --- a/src/test/integration/tests/Deposit_Delegate_Redelegate_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_Redelegate_Complete.t.sol @@ -9,12 +9,14 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti /// 1. deposit into strategy /// 2. delegate to an operator /// 3. undelegates from the operator - /// 4. complete queued withdrawal as shares + /// 4. complete queued withdrawal as shares /// 5. delegate to a new operator /// 5. queueWithdrawal /// 7. complete their queued withdrawal as tokens - function testFuzz_deposit_delegate_reDelegate_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_reDelegate_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -27,17 +29,13 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -60,13 +58,19 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // 5. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, shares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); // 6. Queue Withdrawal withdrawals = staker.queueWithdrawals(strategies, shares); @@ -78,15 +82,25 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete withdrawals - for (uint i = 0; i < withdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + for (uint256 i = 0; i < withdrawals.length; i++) { + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator2, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, + operator2, + withdrawals[i], + withdrawals[i].strategies, + withdrawals[i].shares, + tokens, + expectedTokens + ); } } - function testFuzz_deposit_delegate_reDelegate_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_reDelegate_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -99,17 +113,13 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -132,13 +142,19 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // 5. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, shares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); // 6. Queue Withdrawal withdrawals = staker.queueWithdrawals(strategies, shares); @@ -150,15 +166,15 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete all but last withdrawal as tokens - for (uint i = 0; i < withdrawals.length - 1; i++) { + for (uint256 i = 0; i < withdrawals.length - 1; i++) { IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - uint[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); + uint256[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); check_Withdrawal_AsTokens_State(staker, staker, withdrawals[i], strategies, shares, tokens, expectedTokens); } // Complete last withdrawal as shares IERC20[] memory finalWithdrawaltokens = staker.completeWithdrawalAsTokens(withdrawals[withdrawals.length - 1]); - uint[] memory finalExpectedTokens = _calculateExpectedTokens(strategies, shares); + uint256[] memory finalExpectedTokens = _calculateExpectedTokens(strategies, shares); check_Withdrawal_AsTokens_State( staker, operator2, @@ -170,8 +186,10 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti ); } - function testFuzz_deposit_delegate_reDelegate_depositAfterRedelegate(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_reDelegate_depositAfterRedelegate( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST, // not holding ETH since we can only deposit 32 ETH multiples @@ -184,30 +202,26 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); { // Divide shares by 2 in new array to do deposits after redelegate - uint[] memory numTokensToDeposit = new uint[](tokenBalances.length); - uint[] memory numTokensRemaining = new uint[](tokenBalances.length); - for (uint i = 0; i < shares.length; i++) { + uint256[] memory numTokensToDeposit = new uint256[](tokenBalances.length); + uint256[] memory numTokensRemaining = new uint256[](tokenBalances.length); + for (uint256 i = 0; i < shares.length; i++) { numTokensToDeposit[i] = tokenBalances[i] / 2; numTokensRemaining[i] = tokenBalances[i] - numTokensToDeposit[i]; } - uint[] memory halfShares = _calculateExpectedShares(strategies, numTokensToDeposit); + uint256[] memory halfShares = _calculateExpectedShares(strategies, numTokensToDeposit); /// 1. Deposit Into Strategies staker.depositIntoEigenlayer(strategies, numTokensToDeposit); @@ -227,16 +241,22 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // 5. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, halfShares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); // 6. Deposit into Strategies - uint[] memory sharesAdded = _calculateExpectedShares(strategies, numTokensRemaining); + uint256[] memory sharesAdded = _calculateExpectedShares(strategies, numTokensRemaining); staker.depositIntoEigenlayer(strategies, numTokensRemaining); tokenBalances = _calculateExpectedTokens(strategies, shares); check_Deposit_State(staker, strategies, sharesAdded); @@ -254,16 +274,21 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete withdrawals - for (uint i = 0; i < newWithdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(newWithdrawals[i].strategies, newWithdrawals[i].shares); + for (uint256 i = 0; i < newWithdrawals.length; i++) { + uint256[] memory expectedTokens = + _calculateExpectedTokens(newWithdrawals[i].strategies, newWithdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(newWithdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator2, newWithdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator2, newWithdrawals[i], strategies, shares, tokens, expectedTokens + ); } } } - function testFuzz_deposit_delegate_reDelegate_depositBeforeRedelegate(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_reDelegate_depositBeforeRedelegate( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST, // not holding ETH since we can only deposit 32 ETH multiples @@ -276,30 +301,26 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); { // Divide shares by 2 in new array to do deposits after redelegate - uint[] memory numTokensToDeposit = new uint[](tokenBalances.length); - uint[] memory numTokensRemaining = new uint[](tokenBalances.length); - for (uint i = 0; i < shares.length; i++) { + uint256[] memory numTokensToDeposit = new uint256[](tokenBalances.length); + uint256[] memory numTokensRemaining = new uint256[](tokenBalances.length); + for (uint256 i = 0; i < shares.length; i++) { numTokensToDeposit[i] = tokenBalances[i] / 2; numTokensRemaining[i] = tokenBalances[i] - numTokensToDeposit[i]; } - uint[] memory halfShares = _calculateExpectedShares(strategies, numTokensToDeposit); + uint256[] memory halfShares = _calculateExpectedShares(strategies, numTokensToDeposit); /// 1. Deposit Into Strategies staker.depositIntoEigenlayer(strategies, numTokensToDeposit); @@ -319,11 +340,13 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // 5. Deposit into Strategies - uint[] memory sharesAdded = _calculateExpectedShares(strategies, numTokensRemaining); + uint256[] memory sharesAdded = _calculateExpectedShares(strategies, numTokensRemaining); staker.depositIntoEigenlayer(strategies, numTokensRemaining); tokenBalances = _calculateExpectedTokens(strategies, shares); check_Deposit_State(staker, strategies, sharesAdded); @@ -331,7 +354,11 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // 6. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, shares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); } { @@ -346,16 +373,21 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete withdrawals - for (uint i = 0; i < newWithdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(newWithdrawals[i].strategies, newWithdrawals[i].shares); + for (uint256 i = 0; i < newWithdrawals.length; i++) { + uint256[] memory expectedTokens = + _calculateExpectedTokens(newWithdrawals[i].strategies, newWithdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(newWithdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator2, newWithdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator2, newWithdrawals[i], strategies, shares, tokens, expectedTokens + ); } } } - function testFuzz_deposit_delegate_undelegate_withdrawAsTokens_reDelegate_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_undelegate_withdrawAsTokens_reDelegate_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -363,24 +395,20 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti }); /// 0. Create operators and a staker - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); /// 1. Deposit Into Strategies staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory withdrawnTokenBalances = _calculateExpectedTokens(strategies, shares); + uint256[] memory withdrawnTokenBalances = _calculateExpectedTokens(strategies, shares); check_Deposit_State(staker, strategies, shares); // 2. Delegate to an operator @@ -396,20 +424,32 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // Fast forward to when we can complete the withdrawal _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, + operator1, + withdrawals[i], + withdrawals[i].strategies, + withdrawals[i].shares, + tokens, + expectedTokens + ); } //5. Deposit into Strategies staker.depositIntoEigenlayer(strategies, withdrawnTokenBalances); shares = _calculateExpectedShares(strategies, withdrawnTokenBalances); check_Deposit_State(staker, strategies, shares); - + // 6. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, shares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); // 7. Queue Withdrawal withdrawals = staker.queueWithdrawals(strategies, shares); @@ -421,15 +461,19 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete withdrawals as tokens - for (uint i = 0; i < withdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + for (uint256 i = 0; i < withdrawals.length; i++) { + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator2, withdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, operator2, withdrawals[i], strategies, shares, tokens, expectedTokens + ); } } - function testFuzz_deposit_delegate_undelegate_withdrawAsTokens_reDelegate_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_undelegate_withdrawAsTokens_reDelegate_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -437,24 +481,20 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti }); /// 0. Create operators and a staker - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator1, ,) = _newRandomOperator(); - (User operator2, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator1,,) = _newRandomOperator(); + (User operator2,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); /// 1. Deposit Into Strategies staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory withdrawnTokenBalances = _calculateExpectedTokens(strategies, shares); + uint256[] memory withdrawnTokenBalances = _calculateExpectedTokens(strategies, shares); check_Deposit_State(staker, strategies, shares); // 2. Delegate to an operator @@ -470,19 +510,31 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti // Fast forward to when we can complete the withdrawal _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator1, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, + operator1, + withdrawals[i], + withdrawals[i].strategies, + withdrawals[i].shares, + tokens, + expectedTokens + ); } //5. Deposit into Strategies staker.depositIntoEigenlayer(strategies, withdrawnTokenBalances); check_Deposit_State(staker, strategies, shares); - + // 6. Delegate to a new operator staker.delegateTo(operator2); check_Delegation_State(staker, operator2, strategies, shares); - assertNotEq(address(operator1), delegationManager.delegatedTo(address(staker)), "staker should not be delegated to operator1"); + assertNotEq( + address(operator1), + delegationManager.delegatedTo(address(staker)), + "staker should not be delegated to operator1" + ); // 7. Queue Withdrawal shares = _calculateExpectedShares(strategies, withdrawnTokenBalances); @@ -495,7 +547,7 @@ contract Integration_Deposit_Delegate_Redelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); // Complete withdrawals as shares - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { staker.completeWithdrawalAsShares(withdrawals[i]); check_Withdrawal_AsShares_State(staker, operator2, withdrawals[i], strategies, shares); } diff --git a/src/test/integration/tests/Deposit_Delegate_Undelegate_Complete.t.sol b/src/test/integration/tests/Deposit_Delegate_Undelegate_Complete.t.sol index 9307eb358..8c24ba9c7 100644 --- a/src/test/integration/tests/Deposit_Delegate_Undelegate_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_Undelegate_Complete.t.sol @@ -5,14 +5,15 @@ import "src/test/integration/users/User.t.sol"; import "src/test/integration/IntegrationChecks.t.sol"; contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUtils { - /// Randomly generates a user with different held assets. Then: /// 1. deposit into strategy /// 2. delegate to an operator /// 3. undelegates from the operator /// 4. complete their queued withdrawal as tokens - function testFuzz_deposit_undelegate_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_undelegate_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -25,16 +26,12 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -58,14 +55,24 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti // Complete withdrawal for (uint256 i = 0; i < withdrawals.length; ++i) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, + operator, + withdrawals[i], + withdrawals[i].strategies, + withdrawals[i].shares, + tokens, + expectedTokens + ); } // Check Final State assert_HasNoDelegatableShares(staker, "staker should have withdrawn all shares"); - assert_HasUnderlyingTokenBalances(staker, strategies, tokenBalances, "staker should once again have original token balances"); + assert_HasUnderlyingTokenBalances( + staker, strategies, tokenBalances, "staker should once again have original token balances" + ); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } @@ -74,8 +81,10 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti /// 2. delegate to an operator /// 3. undelegates from the operator /// 4. complete their queued withdrawal as shares - function testFuzz_deposit_undelegate_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_undelegate_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -88,16 +97,12 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -121,7 +126,9 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // Check final state: @@ -130,8 +137,10 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - function testFuzz_deposit_delegate_forceUndelegate_completeAsTokens(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_forceUndelegate_completeAsTokens( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -144,16 +153,12 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -176,19 +181,31 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { - uint[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); + uint256[] memory expectedTokens = _calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, + operator, + withdrawals[i], + withdrawals[i].strategies, + withdrawals[i].shares, + tokens, + expectedTokens + ); } // Check Final State assert_HasNoDelegatableShares(staker, "staker should have withdrawn all shares"); - assert_HasUnderlyingTokenBalances(staker, strategies, tokenBalances, "staker should once again have original token balances"); + assert_HasUnderlyingTokenBalances( + staker, strategies, tokenBalances, "staker should once again have original token balances" + ); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - function testFuzz_deposit_delegate_forceUndelegate_completeAsShares(uint24 _random) public { - // When new Users are created, they will choose a random configuration from these params: + function testFuzz_deposit_delegate_forceUndelegate_completeAsShares( + uint24 _random + ) public { + // When new Users are created, they will choose a random configuration from these params: _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -201,16 +218,12 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti // // ... check that the staker has no deleagatable shares and isn't delegated - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -233,7 +246,9 @@ contract Integration_Deposit_Delegate_Undelegate_Complete is IntegrationCheckUti _rollBlocksForCompleteWithdrawals(strategies); for (uint256 i = 0; i < withdrawals.length; ++i) { staker.completeWithdrawalAsShares(withdrawals[i]); - check_Withdrawal_AsShares_Undelegated_State(staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares); + check_Withdrawal_AsShares_Undelegated_State( + staker, operator, withdrawals[i], withdrawals[i].strategies, withdrawals[i].shares + ); } // Check final state: diff --git a/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol b/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol index 53b42ff4a..c52431e2c 100644 --- a/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol @@ -5,14 +5,15 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_Deposit_Delegate_UpdateBalance is IntegrationCheckUtils { - /// Generates a random stake and operator. The staker: /// 1. deposits all assets into strategies /// 2. delegates to an operator /// 3. queues a withdrawal for a ALL shares /// 4. updates their balance randomly /// 5. completes the queued withdrawal as tokens - function testFuzz_deposit_delegate_updateBalance_completeAsTokens(uint24 _random) public { + function testFuzz_deposit_delegate_updateBalance_completeAsTokens( + uint24 _random + ) public { _configRand({ _randomSeed: _random, _assetTypes: HOLDS_LST | HOLDS_ETH | HOLDS_ALL, @@ -20,16 +21,12 @@ contract Integration_Deposit_Delegate_UpdateBalance is IntegrationCheckUtils { }); /// 0. Create an operator and staker with some underlying assets - ( - User staker, - IStrategy[] memory strategies, - uint[] memory tokenBalances - ) = _newRandomStaker(); - (User operator, ,) = _newRandomOperator(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); + (User operator,,) = _newRandomOperator(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); @@ -50,23 +47,28 @@ contract Integration_Deposit_Delegate_UpdateBalance is IntegrationCheckUtils { // Generate a random balance update: // - For LSTs, the tokenDelta is positive tokens minted to the staker // - For ETH, the tokenDelta is a positive or negative change in beacon chain balance - ( - int[] memory tokenDeltas, - int[] memory stakerShareDeltas, - int[] memory operatorShareDeltas - ) = _randBalanceUpdate(staker, strategies); + (int256[] memory tokenDeltas, int256[] memory stakerShareDeltas, int256[] memory operatorShareDeltas) = + _randBalanceUpdate(staker, strategies); // 4. Update LST balance by depositing, and beacon balance by submitting a proof staker.updateBalances(strategies, tokenDeltas); - assert_Snap_Delta_StakerShares(staker, strategies, stakerShareDeltas, "staker should have applied deltas correctly"); - assert_Snap_Delta_OperatorShares(operator, strategies, operatorShareDeltas, "operator should have applied deltas correctly"); + assert_Snap_Delta_StakerShares( + staker, strategies, stakerShareDeltas, "staker should have applied deltas correctly" + ); + assert_Snap_Delta_OperatorShares( + operator, strategies, operatorShareDeltas, "operator should have applied deltas correctly" + ); // Fast forward to when we can complete the withdrawal _rollBlocksForCompleteWithdrawals(strategies); // 5. Complete queued withdrawals as tokens staker.completeWithdrawalsAsTokens(withdrawals); - assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + assertEq( + address(operator), + delegationManager.delegatedTo(address(staker)), + "staker should still be delegated to operator" + ); assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); assert_Snap_Unchanged_TokenBalances(operator, "operator token balances should not have changed"); assert_Snap_Unchanged_OperatorShares(operator, "operator shares should not have changed"); diff --git a/src/test/integration/tests/Deposit_Queue_Complete.t.sol b/src/test/integration/tests/Deposit_Queue_Complete.t.sol index 3260cf32c..52aa3c318 100644 --- a/src/test/integration/tests/Deposit_Queue_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Queue_Complete.t.sol @@ -5,12 +5,13 @@ import "src/test/integration/users/User.t.sol"; import "src/test/integration/IntegrationChecks.t.sol"; contract Integration_Deposit_QueueWithdrawal_Complete is IntegrationCheckUtils { - /// Randomly generates a user with different held assets. Then: /// 1. deposit into strategy /// 2. queueWithdrawal /// 3. completeQueuedWithdrawal" - function testFuzz_deposit_queueWithdrawal_completeAsTokens(uint24 _random) public { + function testFuzz_deposit_queueWithdrawal_completeAsTokens( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -19,13 +20,13 @@ contract Integration_Deposit_QueueWithdrawal_Complete is IntegrationCheckUtils { }); // Create a staker with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); // 1. Deposit into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); check_Deposit_State(staker, strategies, shares); // Ensure staker is not delegated to anyone post deposit @@ -36,17 +37,23 @@ contract Integration_Deposit_QueueWithdrawal_Complete is IntegrationCheckUtils { // 3. Complete Queued Withdrawal _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { - uint[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); + for (uint256 i = 0; i < withdrawals.length; i++) { + uint256[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - check_Withdrawal_AsTokens_State(staker, User(payable(0)), withdrawals[i], strategies, shares, tokens, expectedTokens); + check_Withdrawal_AsTokens_State( + staker, User(payable(0)), withdrawals[i], strategies, shares, tokens, expectedTokens + ); } // Ensure staker is still not delegated to anyone post withdrawal completion - assertFalse(delegationManager.isDelegated(address(staker)), "Staker should still not be delegated after withdrawal"); + assertFalse( + delegationManager.isDelegated(address(staker)), "Staker should still not be delegated after withdrawal" + ); } - function testFuzz_deposit_queueWithdrawal_completeAsShares(uint24 _random) public { + function testFuzz_deposit_queueWithdrawal_completeAsShares( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -55,13 +62,13 @@ contract Integration_Deposit_QueueWithdrawal_Complete is IntegrationCheckUtils { }); // Create a staker with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); // 1. Deposit into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); check_Deposit_State(staker, strategies, shares); // Ensure staker is not delegated to anyone post deposit @@ -72,12 +79,14 @@ contract Integration_Deposit_QueueWithdrawal_Complete is IntegrationCheckUtils { // 3. Complete Queued Withdrawal _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { - staker.completeWithdrawalAsShares(withdrawals[i]); + for (uint256 i = 0; i < withdrawals.length; i++) { + staker.completeWithdrawalAsShares(withdrawals[i]); check_Withdrawal_AsShares_State(staker, User(payable(0)), withdrawals[i], strategies, shares); } // Ensure staker is still not delegated to anyone post withdrawal completion - assertFalse(delegationManager.isDelegated(address(staker)), "Staker should still not be delegated after withdrawal"); + assertFalse( + delegationManager.isDelegated(address(staker)), "Staker should still not be delegated after withdrawal" + ); } } diff --git a/src/test/integration/tests/Deposit_Register_QueueWithdrawal_Complete.t.sol b/src/test/integration/tests/Deposit_Register_QueueWithdrawal_Complete.t.sol index 9da5443a1..0b94c3d27 100644 --- a/src/test/integration/tests/Deposit_Register_QueueWithdrawal_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Register_QueueWithdrawal_Complete.t.sol @@ -5,7 +5,9 @@ import "src/test/integration/users/User.t.sol"; import "src/test/integration/IntegrationChecks.t.sol"; contract Integration_Deposit_Register_QueueWithdrawal_Complete is IntegrationCheckUtils { - function testFuzz_deposit_registerOperator_queueWithdrawal_completeAsShares(uint24 _random) public { + function testFuzz_deposit_registerOperator_queueWithdrawal_completeAsShares( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -14,17 +16,17 @@ contract Integration_Deposit_Register_QueueWithdrawal_Complete is IntegrationChe }); // Create a staker with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); // 1. Staker deposits into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); check_Deposit_State(staker, strategies, shares); // 2. Staker registers as an operator - staker.registerAsOperator(); + staker.registerAsOperator(); assertTrue(delegationManager.isOperator(address(staker)), "Staker should be registered as an operator"); // 3. Queue Withdrawal @@ -34,13 +36,15 @@ contract Integration_Deposit_Register_QueueWithdrawal_Complete is IntegrationChe // 4. Complete Queued Withdrawal as Shares _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { staker.completeWithdrawalAsShares(withdrawals[i]); check_Withdrawal_AsShares_State(staker, staker, withdrawals[i], strategies, shares); } } - function testFuzz_deposit_registerOperator_queueWithdrawal_completeAsTokens(uint24 _random) public { + function testFuzz_deposit_registerOperator_queueWithdrawal_completeAsTokens( + uint24 _random + ) public { // Configure the random parameters for the test _configRand({ _randomSeed: _random, @@ -49,13 +53,13 @@ contract Integration_Deposit_Register_QueueWithdrawal_Complete is IntegrationChe }); // Create a staker with a nonzero balance and corresponding strategies - (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _newRandomStaker(); + (User staker, IStrategy[] memory strategies, uint256[] memory tokenBalances) = _newRandomStaker(); // Upgrade contracts if forkType is not local _upgradeEigenLayerContracts(); // 1. Staker deposits into strategy staker.depositIntoEigenlayer(strategies, tokenBalances); - uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + uint256[] memory shares = _calculateExpectedShares(strategies, tokenBalances); check_Deposit_State(staker, strategies, shares); // 2. Staker registers as an operator @@ -69,10 +73,10 @@ contract Integration_Deposit_Register_QueueWithdrawal_Complete is IntegrationChe // 4. Complete Queued Withdrawal as Tokens _rollBlocksForCompleteWithdrawals(strategies); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { IERC20[] memory tokens = staker.completeWithdrawalAsTokens(withdrawals[i]); - uint[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); - + uint256[] memory expectedTokens = _calculateExpectedTokens(strategies, shares); + check_Withdrawal_AsTokens_State(staker, staker, withdrawals[i], strategies, shares, tokens, expectedTokens); } } diff --git a/src/test/integration/tests/Upgrade_Setup.t.sol b/src/test/integration/tests/Upgrade_Setup.t.sol index cbfb4eb45..fee141f06 100644 --- a/src/test/integration/tests/Upgrade_Setup.t.sol +++ b/src/test/integration/tests/Upgrade_Setup.t.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.12; import "src/test/integration/IntegrationChecks.t.sol"; contract IntegrationMainnetFork_UpgradeSetup is IntegrationCheckUtils { - // /// @notice Test upgrade setup is correct // /// forge-config: default.fuzz.runs = 1 // function test_mainnet_upgrade_setup(uint24 _random) public { @@ -61,11 +60,10 @@ contract IntegrationMainnetFork_UpgradeSetup is IntegrationCheckUtils { /// @notice Ensure contracts point at each other correctly via constructors /// override to remove ethPOSDeposit contract check - function _verifyContractPointers() internal virtual override view { + function _verifyContractPointers() internal view virtual override { // AVSDirectory require( - avsDirectory.delegation() == delegationManager, - "avsDirectory: delegationManager address not set correctly" + avsDirectory.delegation() == delegationManager, "avsDirectory: delegationManager address not set correctly" ); // DelegationManager require(delegationManager.slasher() == slasher, "delegationManager: slasher address not set correctly"); @@ -102,4 +100,4 @@ contract IntegrationMainnetFork_UpgradeSetup is IntegrationCheckUtils { "eigenPodManager: delegationManager contract address not set correctly" ); } -} \ No newline at end of file +} diff --git a/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol b/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol index fd641bab2..57006c8f1 100644 --- a/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol +++ b/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol @@ -5,26 +5,23 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { - - modifier r(uint24 _rand) { - _configRand({ - _randomSeed: _rand, - _assetTypes: HOLDS_ETH, - _userTypes: DEFAULT - }); + modifier r( + uint24 _rand + ) { + _configRand({_randomSeed: _rand, _assetTypes: HOLDS_ETH, _userTypes: DEFAULT}); _; } function test_GasMetering() public r(0) { - (User staker, ,) = _newRandomStaker(); + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); // Deal user 20 full stakers worth of ETH emit log_named_string("Dealing 20 * 32 ETH to", staker.NAME()); cheats.deal(address(staker), 32 ether * 20); cheats.pauseGasMetering(); - (uint40[] memory validators, ) = staker.startValidators(); + (uint40[] memory validators,) = staker.startValidators(); beaconChain.advanceEpoch_NoRewards(); EigenPod pod = staker.pod(); @@ -33,7 +30,7 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { cheats.startPrank(address(staker)); cheats.resumeGasMetering(); - uint startGas = gasleft(); + uint256 startGas = gasleft(); pod.verifyWithdrawalCredentials({ beaconTimestamp: proofs.beaconTimestamp, stateRootProof: proofs.stateRootProof, @@ -41,9 +38,9 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { validatorFieldsProofs: proofs.validatorFieldsProofs, validatorFields: proofs.validatorFields }); - uint endGas = gasleft(); + uint256 endGas = gasleft(); cheats.pauseGasMetering(); - uint totalGas = startGas - endGas; + uint256 totalGas = startGas - endGas; emit log_named_uint("== num validators", validators.length); emit log_named_uint("== verifyWC gas", totalGas); @@ -72,17 +69,21 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { // revert(); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (TIMING VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (TIMING VARIANTS) + * + */ /// 1. Verify validators' withdrawal credentials /// 2. start a checkpoint /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -101,8 +102,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 1. Verify validators' withdrawal credentials /// 2. Verify validators' withdrawal credentials again /// => This should fail - function test_VerifyWC_VerifyWC_Fails(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_VerifyWC_Fails( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -111,7 +114,9 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { staker.verifyWithdrawalCredentials(validators); check_VerifyWC_State(staker, validators, beaconBalanceGwei); - cheats.expectRevert("EigenPod._verifyWithdrawalCredentials: validator must be inactive to prove withdrawal credentials"); + cheats.expectRevert( + "EigenPod._verifyWithdrawalCredentials: validator must be inactive to prove withdrawal credentials" + ); staker.verifyWithdrawalCredentials(validators); } @@ -119,8 +124,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. start a checkpoint again /// => This should fail - function test_VerifyWC_StartCP_StartCP_Fails(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_StartCP_Fails( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -141,8 +148,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 3. complete a checkpoint /// 4. start a checkpoint without advancing a block /// => this should fail - function test_VerifyWC_StartCP_CompleteCP_StartCP_Fails(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_CompleteCP_StartCP_Fails( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -166,8 +175,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_Advance_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_Advance_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -191,8 +202,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// -- move forward 1 or more epochs /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_StartCP_Advance_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_Advance_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -211,19 +224,23 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_State(staker); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (EXIT TO POD VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (EXIT TO POD VARIANTS) + * + */ /// -- Fully exit validators before verifying withdrawal credentials /// 1. Verify validators' withdrawal credentials /// => This should fail - function test_ExitValidators_VerifyWC_Fails(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_ExitValidators_VerifyWC_Fails( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); - (uint40[] memory validators, ) = staker.startValidators(); + (uint40[] memory validators,) = staker.startValidators(); staker.exitValidators(validators); beaconChain.advanceEpoch_NoRewards(); @@ -236,8 +253,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_ExitValidators_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_ExitValidators_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -267,8 +286,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 4. start a checkpoint /// 5. complete a checkpoint /// => exited balance should be reflected in 4 and 5 - function test_VerifyWC_StartCP_ExitValidators_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_ExitValidators_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -295,23 +316,27 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithExits_State(staker, subset, exitedBalanceGwei); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (SLASH TO POD VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (SLASH TO POD VARIANTS) + * + */ /// -- get slashed on beacon chain /// 1. Try to verify validators' withdrawal credentials /// => this should fail - function test_SlashToPod_VerifyWC_Fails(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_SlashToPod_VerifyWC_Fails( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); - (uint40[] memory validators, ) = staker.startValidators(); + (uint40[] memory validators,) = staker.startValidators(); beaconChain.slashValidators(validators); // Advance epoch, withdrawing slashed validators to pod beaconChain.advanceEpoch_NoRewards(); - + cheats.expectRevert("EigenPod._verifyWithdrawalCredentials: validator must not be exiting"); staker.verifyWithdrawalCredentials(validators); } @@ -321,8 +346,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares should decrease by slashed amount - function test_VerifyWC_SlashToPod_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_SlashToPod_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -342,7 +369,6 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithSlashing_State(staker, validators, slashedBalanceGwei); } - /// 1. Verify validators' withdrawal credentials /// 2. start a checkpoint /// -- get slashed on beacon chain; exit to pod @@ -352,8 +378,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 4. start a checkpoint /// 5. complete a checkpoint /// => slashed balance should be reflected in 4 and 5 - function test_VerifyWC_StartCP_SlashToPod_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_SlashToPod_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -379,17 +407,21 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithSlashing_State(staker, validators, slashedBalanceGwei); } - /******************************************************************************* - VERIFY -> PROVE STALE BALANCE -> COMPLETE CHECKPOINT - *******************************************************************************/ + /** + * + * VERIFY -> PROVE STALE BALANCE -> COMPLETE CHECKPOINT + * + */ /// 1. Verify validators' withdrawal credentials /// -- get slashed on beacon chain; exit to pod /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares should decrease by slashed amount - function test_VerifyWC_SlashToPod_VerifyStale_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_SlashToPod_VerifyStale_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -414,8 +446,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares should decrease by slashed amount - function test_VerifyWC_SlashToCL_VerifyStale_CompleteCP_SlashAgain(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_SlashToCL_VerifyStale_CompleteCP_SlashAgain( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -455,8 +489,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 4. start a checkpoint /// 5. complete a checkpoint /// => slashed balance should be reflected in 4 and 5 - function test_VerifyWC_StartCP_SlashToPod_CompleteCP_VerifyStale(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_SlashToPod_CompleteCP_VerifyStale( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -482,18 +518,22 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithSlashing_State(staker, validators, slashedBalanceGwei); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (EARN ON CL VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (EARN ON CL VARIANTS) + * + */ /// -- earn rewards on beacon chain (not withdrawn to pod) /// 1. Verify validators' withdrawal credentials /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares increase by rewards earned on beacon chain - function test_EarnOnBeacon_VerifyWC_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_EarnOnBeacon_VerifyWC_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -516,8 +556,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares increase by rewards earned on beacon chain - function test_VerifyWC_EarnOnBeacon_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_EarnOnBeacon_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -541,9 +583,11 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// -- earn rewards on beacon chain (not withdrawn to pod) /// 3. complete a checkpoint - /// => no change in shares between 1 and 3 - function test_VerifyWC_StartCP_EarnOnBeacon_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + /// => no change in shares between 1 and 3 + function test_VerifyWC_StartCP_EarnOnBeacon_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -562,18 +606,22 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_EarnOnBeacon_State(staker, 0); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (EARN TO POD VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (EARN TO POD VARIANTS) + * + */ /// -- earn rewards on beacon chain (withdrawn to pod) /// 1. Verify validators' withdrawal credentials /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares increase by rewards withdrawn to pod - function test_EarnToPod_VerifyWC_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_EarnToPod_VerifyWC_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -596,8 +644,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares increase by rewards withdrawn to pod - function test_VerifyWC_EarnToPod_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_EarnToPod_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -622,8 +672,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// -- earn rewards on beacon chain (withdrawn to pod) /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_StartCP_EarnToPod_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_EarnToPod_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -647,19 +699,23 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithPodBalance_State(staker, 0); } - /******************************************************************************* - VERIFY -> START -> COMPLETE CHECKPOINT - (NATIVE ETH VARIANTS) - *******************************************************************************/ + /** + * + * VERIFY -> START -> COMPLETE CHECKPOINT + * (NATIVE ETH VARIANTS) + * + */ /// -- Pod receives native ETH via fallback /// 1. start a checkpoint /// => checkpoint should auto-complete, awarding shares for ETH in pod - function test_NativeETH_StartCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_NativeETH_StartCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); // Send a random amount of ETH to staker's fallback - (uint64 gweiSent, ) = _sendRandomETH(address(staker.pod())); + (uint64 gweiSent,) = _sendRandomETH(address(staker.pod())); // Move forward an epoch so we generate a state root that can be queried in startCheckpoint beaconChain.advanceEpoch(); @@ -674,15 +730,17 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares should account for native ETH - function test_NativeETH_VerifyWC_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_NativeETH_VerifyWC_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); beaconChain.advanceEpoch_NoRewards(); // Send a random amount of ETH to staker's fallback - (uint64 gweiSent, uint remainderSent) = _sendRandomETH(address(staker.pod())); + (uint64 gweiSent, uint256 remainderSent) = _sendRandomETH(address(staker.pod())); staker.verifyWithdrawalCredentials(validators); check_VerifyWC_State(staker, validators, beaconBalanceGwei); @@ -702,8 +760,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// 2. start a checkpoint /// 3. complete a checkpoint /// => after 3, shares should account for native ETH - function test_VerifyWC_NativeETH_StartCP_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_NativeETH_StartCP_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -713,7 +773,7 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_VerifyWC_State(staker, validators, beaconBalanceGwei); // Send a random amount of ETH to staker's fallback - (uint64 gweiSent, uint remainderSent) = _sendRandomETH(address(staker.pod())); + (uint64 gweiSent, uint256 remainderSent) = _sendRandomETH(address(staker.pod())); // should behave identically to partial withdrawals captured by the "earn to pod" variants staker.startCheckpoint(); @@ -730,8 +790,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { /// -- Pod receives native ETH via fallback /// 3. complete a checkpoint /// => no change in shares between 1 and 3 - function test_VerifyWC_StartCP_NativeETH_CompleteCP(uint24 _rand) public r(_rand) { - (User staker, ,) = _newRandomStaker(); + function test_VerifyWC_StartCP_NativeETH_CompleteCP( + uint24 _rand + ) public r(_rand) { + (User staker,,) = _newRandomStaker(); _upgradeEigenLayerContracts(); (uint40[] memory validators, uint64 beaconBalanceGwei) = staker.startValidators(); @@ -746,11 +808,11 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_StartCheckpoint_WithPodBalance_State(staker, 0); // Send a random amount of ETH to staker's fallback - (uint64 gweiSent, uint remainderSent) = _sendRandomETH(address(staker.pod())); + (uint64 gweiSent, uint256 remainderSent) = _sendRandomETH(address(staker.pod())); staker.completeCheckpoint(); // `pod.balance == gweiSent + remainderSent assert_PodBalance_Eq(staker, (gweiSent * GWEI_TO_WEI) + remainderSent, "pod balance should equal expected"); check_CompleteCheckpoint_WithPodBalance_State(staker, 0); } -} \ No newline at end of file +} diff --git a/src/test/integration/users/User.t.sol b/src/test/integration/users/User.t.sol index 7875e56c6..5282c77bf 100644 --- a/src/test/integration/users/User.t.sol +++ b/src/test/integration/users/User.t.sol @@ -28,7 +28,6 @@ interface IUserDeployer { } contract User is PrintUtils { - Vm cheats = Vm(HEVM_ADDRESS); DelegationManager delegationManager; @@ -45,16 +44,18 @@ contract User is PrintUtils { IStrategy constant BEACONCHAIN_ETH_STRAT = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); IERC20 constant NATIVE_ETH = IERC20(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); - uint constant GWEI_TO_WEI = 1e9; + uint256 constant GWEI_TO_WEI = 1e9; - constructor(string memory name) { + constructor( + string memory name + ) { IUserDeployer deployer = IUserDeployer(msg.sender); delegationManager = deployer.delegationManager(); strategyManager = deployer.strategyManager(); eigenPodManager = deployer.eigenPodManager(); timeMachine = deployer.timeMachine(); - + beaconChain = deployer.beaconChain(); _createPod(); @@ -72,11 +73,12 @@ contract User is PrintUtils { return _NAME; } - /******************************************************************************* - DELEGATIONMANAGER METHODS - *******************************************************************************/ - - function registerAsOperator() public createSnapshot virtual { + /** + * + * DELEGATIONMANAGER METHODS + * + */ + function registerAsOperator() public virtual createSnapshot { _logM("registerAsOperator"); IDelegationManager.OperatorDetails memory details = IDelegationManager.OperatorDetails({ @@ -89,7 +91,9 @@ contract User is PrintUtils { } /// @dev Delegate to the operator without a signature - function delegateTo(User operator) public createSnapshot virtual { + function delegateTo( + User operator + ) public virtual createSnapshot { _logM("delegateTo", operator.NAME()); ISignatureUtils.SignatureWithExpiry memory emptySig; @@ -97,49 +101,50 @@ contract User is PrintUtils { } /// @dev Undelegate from operator - function undelegate() public createSnapshot virtual returns(IDelegationManager.Withdrawal[] memory){ + function undelegate() public virtual createSnapshot returns (IDelegationManager.Withdrawal[] memory) { _logM("undelegate"); - IDelegationManager.Withdrawal[] memory expectedWithdrawals = _getExpectedWithdrawalStructsForStaker(address(this)); + IDelegationManager.Withdrawal[] memory expectedWithdrawals = + _getExpectedWithdrawalStructsForStaker(address(this)); delegationManager.undelegate(address(this)); - for (uint i = 0; i < expectedWithdrawals.length; i++) { + for (uint256 i = 0; i < expectedWithdrawals.length; i++) { emit log("expecting withdrawal:"); emit log_named_uint("nonce: ", expectedWithdrawals[i].nonce); emit log_named_address("strat: ", address(expectedWithdrawals[i].strategies[0])); emit log_named_uint("shares: ", expectedWithdrawals[i].shares[0]); } - + return expectedWithdrawals; } /// @dev Force undelegate staker - function forceUndelegate(User staker) public createSnapshot virtual returns(IDelegationManager.Withdrawal[] memory){ + function forceUndelegate( + User staker + ) public virtual createSnapshot returns (IDelegationManager.Withdrawal[] memory) { _logM("forceUndelegate", staker.NAME()); - IDelegationManager.Withdrawal[] memory expectedWithdrawals = _getExpectedWithdrawalStructsForStaker(address(staker)); + IDelegationManager.Withdrawal[] memory expectedWithdrawals = + _getExpectedWithdrawalStructsForStaker(address(staker)); delegationManager.undelegate(address(staker)); return expectedWithdrawals; } /// @dev Queues a single withdrawal for every share and strategy pair function queueWithdrawals( - IStrategy[] memory strategies, - uint[] memory shares - ) public createSnapshot virtual returns (IDelegationManager.Withdrawal[] memory) { + IStrategy[] memory strategies, + uint256[] memory shares + ) public virtual createSnapshot returns (IDelegationManager.Withdrawal[] memory) { _logM("queueWithdrawals"); address operator = delegationManager.delegatedTo(address(this)); address withdrawer = address(this); - uint nonce = delegationManager.cumulativeWithdrawalsQueued(address(this)); + uint256 nonce = delegationManager.cumulativeWithdrawalsQueued(address(this)); // Create queueWithdrawals params IDelegationManager.QueuedWithdrawalParams[] memory params = new IDelegationManager.QueuedWithdrawalParams[](1); - params[0] = IDelegationManager.QueuedWithdrawalParams({ - strategies: strategies, - shares: shares, - withdrawer: withdrawer - }); + params[0] = + IDelegationManager.QueuedWithdrawalParams({strategies: strategies, shares: shares, withdrawer: withdrawer}); // Create Withdrawal struct using same info IDelegationManager.Withdrawal[] memory withdrawals = new IDelegationManager.Withdrawal[](1); @@ -161,45 +166,55 @@ contract User is PrintUtils { return (withdrawals); } - function completeWithdrawalsAsTokens(IDelegationManager.Withdrawal[] memory withdrawals) public createSnapshot virtual returns (IERC20[][] memory) { + function completeWithdrawalsAsTokens( + IDelegationManager.Withdrawal[] memory withdrawals + ) public virtual createSnapshot returns (IERC20[][] memory) { _logM("completeWithdrawalsAsTokens"); IERC20[][] memory tokens = new IERC20[][](withdrawals.length); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { tokens[i] = _completeQueuedWithdrawal(withdrawals[i], true); } return tokens; } - - function completeWithdrawalAsTokens(IDelegationManager.Withdrawal memory withdrawal) public createSnapshot virtual returns (IERC20[] memory) { + + function completeWithdrawalAsTokens( + IDelegationManager.Withdrawal memory withdrawal + ) public virtual createSnapshot returns (IERC20[] memory) { _logM("completeWithdrawalsAsTokens"); return _completeQueuedWithdrawal(withdrawal, true); } - function completeWithdrawalsAsShares(IDelegationManager.Withdrawal[] memory withdrawals) public createSnapshot virtual returns (IERC20[][] memory) { + function completeWithdrawalsAsShares( + IDelegationManager.Withdrawal[] memory withdrawals + ) public virtual createSnapshot returns (IERC20[][] memory) { _logM("completeWithdrawalAsShares"); - + IERC20[][] memory tokens = new IERC20[][](withdrawals.length); - for (uint i = 0; i < withdrawals.length; i++) { + for (uint256 i = 0; i < withdrawals.length; i++) { tokens[i] = _completeQueuedWithdrawal(withdrawals[i], false); } return tokens; } - function completeWithdrawalAsShares(IDelegationManager.Withdrawal memory withdrawal) public createSnapshot virtual returns (IERC20[] memory) { + function completeWithdrawalAsShares( + IDelegationManager.Withdrawal memory withdrawal + ) public virtual createSnapshot returns (IERC20[] memory) { _logM("completeWithdrawalAsShares"); return _completeQueuedWithdrawal(withdrawal, false); } - /******************************************************************************* - BEACON CHAIN METHODS - *******************************************************************************/ + /** + * + * BEACON CHAIN METHODS + * + */ /// @dev Uses any ETH held by the User to start validators on the beacon chain /// @return A list of created validator indices @@ -207,43 +222,48 @@ contract User is PrintUtils { /// Note: If the user does not have enough ETH to start a validator, this method reverts /// Note: This method also advances one epoch forward on the beacon chain, so that /// withdrawal credential proofs are generated for each validator. - function startValidators() public createSnapshot virtual returns (uint40[] memory, uint64) { + function startValidators() public virtual createSnapshot returns (uint40[] memory, uint64) { _logM("startValidators"); return _startValidators(); } - function exitValidators(uint40[] memory _validators) public createSnapshot virtual returns (uint64 exitedBalanceGwei) { + function exitValidators( + uint40[] memory _validators + ) public virtual createSnapshot returns (uint64 exitedBalanceGwei) { _logM("exitValidators"); return _exitValidators(_validators); } - /******************************************************************************* - EIGENPOD METHODS - *******************************************************************************/ - + /** + * + * EIGENPOD METHODS + * + */ function verifyWithdrawalCredentials( uint40[] memory _validators - ) public createSnapshot virtual { + ) public virtual createSnapshot { _logM("verifyWithdrawalCredentials"); _verifyWithdrawalCredentials(_validators); } - function startCheckpoint() public createSnapshot virtual { + function startCheckpoint() public virtual createSnapshot { _logM("startCheckpoint"); _startCheckpoint(); } - function completeCheckpoint() public createSnapshot virtual { + function completeCheckpoint() public virtual createSnapshot { _logM("completeCheckpoint"); _completeCheckpoint(); } - function verifyStaleBalance(uint40 validatorIndex) public createSnapshot virtual { + function verifyStaleBalance( + uint40 validatorIndex + ) public virtual createSnapshot { _logM("verifyStaleBalance"); StaleBalanceProofs memory proof = beaconChain.getStaleBalanceProofs(validatorIndex); @@ -252,25 +272,30 @@ contract User is PrintUtils { beaconTimestamp: proof.beaconTimestamp, stateRootProof: proof.stateRootProof, proof: proof.validatorProof - }) { } catch (bytes memory err) { + }) {} catch (bytes memory err) { _revert(err); } } - /******************************************************************************* - STRATEGY METHODS - *******************************************************************************/ + /** + * + * STRATEGY METHODS + * + */ /// @dev For each strategy/token balance, call the relevant deposit method - function depositIntoEigenlayer(IStrategy[] memory strategies, uint[] memory tokenBalances) public createSnapshot virtual { + function depositIntoEigenlayer( + IStrategy[] memory strategies, + uint256[] memory tokenBalances + ) public virtual createSnapshot { _logM("depositIntoEigenlayer"); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - uint tokenBalance = tokenBalances[i]; + uint256 tokenBalance = tokenBalances[i]; if (strat == BEACONCHAIN_ETH_STRAT) { - (uint40[] memory newValidators, ) = _startValidators(); + (uint40[] memory newValidators,) = _startValidators(); // Advance forward one epoch and generate credential and balance proofs for each validator beaconChain.advanceEpoch_NoRewards(); _verifyWithdrawalCredentials(newValidators); @@ -282,12 +307,12 @@ contract User is PrintUtils { } } - function updateBalances(IStrategy[] memory strategies, int[] memory tokenDeltas) public createSnapshot virtual { + function updateBalances(IStrategy[] memory strategies, int256[] memory tokenDeltas) public virtual createSnapshot { _logM("updateBalances"); - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - int delta = tokenDeltas[i]; + int256 delta = tokenDeltas[i]; if (strat == BEACONCHAIN_ETH_STRAT) { // If any balance update has occured, a checkpoint will pick it up @@ -296,7 +321,7 @@ contract User is PrintUtils { _completeCheckpoint(); } } else { - uint tokens = uint(delta); + uint256 tokens = uint256(delta); IERC20 underlyingToken = strat.underlyingToken(); underlyingToken.approve(address(strategyManager), tokens); strategyManager.depositIntoStrategy(strat, underlyingToken, tokens); @@ -304,17 +329,18 @@ contract User is PrintUtils { } } - /******************************************************************************* - INTERNAL METHODS - *******************************************************************************/ - + /** + * + * INTERNAL METHODS + * + */ function _completeQueuedWithdrawal( - IDelegationManager.Withdrawal memory withdrawal, + IDelegationManager.Withdrawal memory withdrawal, bool receiveAsTokens ) internal virtual returns (IERC20[] memory) { IERC20[] memory tokens = new IERC20[](withdrawal.strategies.length); - for (uint i = 0; i < tokens.length; i++) { + for (uint256 i = 0; i < tokens.length; i++) { IStrategy strat = withdrawal.strategies[i]; if (strat == BEACONCHAIN_ETH_STRAT) { @@ -323,7 +349,6 @@ contract User is PrintUtils { // If we're withdrawing native ETH as tokens, stop ALL validators // and complete a checkpoint if (receiveAsTokens) { - _log("- exiting all validators and completing checkpoint"); _exitValidators(getActiveValidators()); @@ -355,17 +380,17 @@ contract User is PrintUtils { /// Note: This method also advances one epoch forward on the beacon chain, so that /// withdrawal credential proofs are generated for each validator. function _startValidators() internal returns (uint40[] memory, uint64) { - uint balanceWei = address(this).balance; + uint256 balanceWei = address(this).balance; // Number of full validators: balance / 32 ETH - uint numValidators = balanceWei / 32 ether; + uint256 numValidators = balanceWei / 32 ether; balanceWei -= (numValidators * 32 ether); // If we still have at least 1 ETH left over, we can create another (non-full) validator // Note that in the mock beacon chain this validator will generate rewards like any other. // The main point is to ensure pods are able to handle validators that have less than 32 ETH - uint lastValidatorBalance; - uint totalValidators = numValidators; + uint256 lastValidatorBalance; + uint256 totalValidators = numValidators; if (balanceWei >= 1 ether) { lastValidatorBalance = balanceWei - (balanceWei % 1 gwei); balanceWei -= lastValidatorBalance; @@ -380,10 +405,8 @@ contract User is PrintUtils { _log("- depositing balance to beacon chain (gwei)", totalBeaconBalanceGwei); // Create each of the full validators - for (uint i = 0; i < numValidators; i++) { - uint40 validatorIndex = beaconChain.newValidator{ - value: 32 ether - }(_podWithdrawalCredentials()); + for (uint256 i = 0; i < numValidators; i++) { + uint40 validatorIndex = beaconChain.newValidator{value: 32 ether}(_podWithdrawalCredentials()); newValidators[i] = validatorIndex; validators.push(validatorIndex); @@ -391,9 +414,7 @@ contract User is PrintUtils { // If we had a remainder, create the final, non-full validator if (totalValidators == numValidators + 1) { - uint40 validatorIndex = beaconChain.newValidator{ - value: lastValidatorBalance - }(_podWithdrawalCredentials()); + uint40 validatorIndex = beaconChain.newValidator{value: lastValidatorBalance}(_podWithdrawalCredentials()); newValidators[newValidators.length - 1] = validatorIndex; validators.push(validatorIndex); @@ -402,10 +423,12 @@ contract User is PrintUtils { return (newValidators, totalBeaconBalanceGwei); } - function _exitValidators(uint40[] memory _validators) internal returns (uint64 exitedBalanceGwei) { + function _exitValidators( + uint40[] memory _validators + ) internal returns (uint64 exitedBalanceGwei) { _log("- exiting num validators", _validators.length); - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { exitedBalanceGwei += beaconChain.exitValidator(_validators[i]); } @@ -415,7 +438,8 @@ contract User is PrintUtils { } function _startCheckpoint() internal { - try pod.startCheckpoint(false) {} catch (bytes memory err) { + try pod.startCheckpoint(false) {} + catch (bytes memory err) { _revert(err); } } @@ -432,13 +456,12 @@ contract User is PrintUtils { CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, checkpointTimestamp); _log("- submitting num checkpoint proofs", proofs.balanceProofs.length); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } - function _verifyWithdrawalCredentials(uint40[] memory _validators) internal { + function _verifyWithdrawalCredentials( + uint40[] memory _validators + ) internal { CredentialProofs memory proofs = beaconChain.getCredentialProofs(_validators); try pod.verifyWithdrawalCredentials({ @@ -447,15 +470,19 @@ contract User is PrintUtils { validatorIndices: _validators, validatorFieldsProofs: proofs.validatorFieldsProofs, validatorFields: proofs.validatorFields - }) { } catch (bytes memory err) { - _revert(err); + }) {} catch (bytes memory err) { + _revert(err); } } /// @dev Revert, passing through an error message - function _revert(bytes memory err) internal pure { + function _revert( + bytes memory err + ) internal pure { if (err.length != 0) { - assembly { revert(add(32, err), mload(err)) } + assembly { + revert(add(32, err), mload(err)) + } } revert("reverted with unknown error"); } @@ -466,14 +493,16 @@ contract User is PrintUtils { /// @notice Gets the expected withdrawals to be created when the staker is undelegated via a call to `DelegationManager.undelegate()` /// @notice Assumes staker and withdrawer are the same and that all strategies and shares are withdrawn - function _getExpectedWithdrawalStructsForStaker(address staker) internal view returns (IDelegationManager.Withdrawal[] memory) { - (IStrategy[] memory strategies, uint256[] memory shares) - = delegationManager.getDelegatableShares(staker); + function _getExpectedWithdrawalStructsForStaker( + address staker + ) internal view returns (IDelegationManager.Withdrawal[] memory) { + (IStrategy[] memory strategies, uint256[] memory shares) = delegationManager.getDelegatableShares(staker); - IDelegationManager.Withdrawal[] memory expectedWithdrawals = new IDelegationManager.Withdrawal[](strategies.length); + IDelegationManager.Withdrawal[] memory expectedWithdrawals = + new IDelegationManager.Withdrawal[](strategies.length); address delegatedTo = delegationManager.delegatedTo(staker); uint256 nonce = delegationManager.cumulativeWithdrawalsQueued(staker); - + for (uint256 i = 0; i < strategies.length; ++i) { IStrategy[] memory singleStrategy = new IStrategy[](1); uint256[] memory singleShares = new uint256[](1); @@ -496,9 +525,9 @@ contract User is PrintUtils { function getActiveValidators() public view returns (uint40[] memory) { uint40[] memory activeValidators = new uint40[](validators.length); - uint numActive; - uint pos; - for(uint i = 0; i < validators.length; i++) { + uint256 numActive; + uint256 pos; + for (uint256 i = 0; i < validators.length; i++) { if (beaconChain.isActive(validators[i])) { activeValidators[pos] = validators[i]; numActive++; @@ -507,7 +536,9 @@ contract User is PrintUtils { } // Manually update length - assembly { mstore(activeValidators, numActive) } + assembly { + mstore(activeValidators, numActive) + } return activeValidators; } @@ -515,12 +546,15 @@ contract User is PrintUtils { /// @notice A user contract that calls nonstandard methods (like xBySignature methods) contract User_AltMethods is User { - mapping(bytes32 => bool) public signedHashes; - constructor(string memory name) User(name) {} + constructor( + string memory name + ) User(name) {} - function delegateTo(User operator) public createSnapshot override { + function delegateTo( + User operator + ) public override createSnapshot { _logM("delegateTo_ALT", operator.NAME()); // Create empty data @@ -530,29 +564,35 @@ contract User_AltMethods is User { // Get signature ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry; stakerSignatureAndExpiry.expiry = expiry; - bytes32 digestHash = delegationManager.calculateCurrentStakerDelegationDigestHash(address(this), address(operator), expiry); + bytes32 digestHash = + delegationManager.calculateCurrentStakerDelegationDigestHash(address(this), address(operator), expiry); stakerSignatureAndExpiry.signature = bytes(abi.encodePacked(digestHash)); // dummy sig data // Mark hash as signed signedHashes[digestHash] = true; // Delegate - delegationManager.delegateToBySignature(address(this), address(operator), stakerSignatureAndExpiry, emptySig, bytes32(0)); + delegationManager.delegateToBySignature( + address(this), address(operator), stakerSignatureAndExpiry, emptySig, bytes32(0) + ); // Mark hash as used signedHashes[digestHash] = false; } - function depositIntoEigenlayer(IStrategy[] memory strategies, uint[] memory tokenBalances) public createSnapshot override { + function depositIntoEigenlayer( + IStrategy[] memory strategies, + uint256[] memory tokenBalances + ) public override createSnapshot { _logM("depositIntoEigenlayer_ALT"); - + uint256 expiry = type(uint256).max; - for (uint i = 0; i < strategies.length; i++) { + for (uint256 i = 0; i < strategies.length; i++) { IStrategy strat = strategies[i]; - uint tokenBalance = tokenBalances[i]; + uint256 tokenBalance = tokenBalances[i]; if (strat == BEACONCHAIN_ETH_STRAT) { - (uint40[] memory newValidators, ) = _startValidators(); + (uint40[] memory newValidators,) = _startValidators(); // Advance forward one epoch and generate credential and balance proofs for each validator beaconChain.advanceEpoch_NoRewards(); _verifyWithdrawalCredentials(newValidators); @@ -564,9 +604,18 @@ contract User_AltMethods is User { // Get signature uint256 nonceBefore = strategyManager.nonces(address(this)); bytes32 structHash = keccak256( - abi.encode(strategyManager.DEPOSIT_TYPEHASH(), address(this), strat, underlyingToken, tokenBalance, nonceBefore, expiry) + abi.encode( + strategyManager.DEPOSIT_TYPEHASH(), + address(this), + strat, + underlyingToken, + tokenBalance, + nonceBefore, + expiry + ) ); - bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", strategyManager.domainSeparator(), structHash)); + bytes32 digestHash = + keccak256(abi.encodePacked("\x19\x01", strategyManager.domainSeparator(), structHash)); bytes memory signature = bytes(abi.encodePacked(digestHash)); // dummy sig data // Mark hash as signed @@ -574,12 +623,7 @@ contract User_AltMethods is User { // Deposit strategyManager.depositIntoStrategyWithSignature( - strat, - underlyingToken, - tokenBalance, - address(this), - expiry, - signature + strat, underlyingToken, tokenBalance, address(this), expiry, signature ); // Mark hash as used @@ -587,13 +631,14 @@ contract User_AltMethods is User { } } } - + bytes4 internal constant MAGIC_VALUE = 0x1626ba7e; + function isValidSignature(bytes32 hash, bytes memory) external view returns (bytes4) { - if(signedHashes[hash]){ + if (signedHashes[hash]) { return MAGIC_VALUE; } else { return 0xffffffff; } - } + } } diff --git a/src/test/integration/users/User_M1.t.sol b/src/test/integration/users/User_M1.t.sol index 3f914cfaf..828f47277 100644 --- a/src/test/integration/users/User_M1.t.sol +++ b/src/test/integration/users/User_M1.t.sol @@ -24,7 +24,9 @@ contract User_M1 is User { IStrategyManager_DeprecatedM1 strategyManager_M1; IEigenPodManager_DeprecatedM1 eigenPodManager_M1; - constructor(string memory name) User(name) { + constructor( + string memory name + ) User(name) { IUserMainnetForkDeployer deployer = IUserMainnetForkDeployer(msg.sender); strategyManager_M1 = IStrategyManager_DeprecatedM1(address(deployer.strategyManager())); @@ -70,7 +72,9 @@ contract User_M1 is User { contract User_M1_AltMethods is User_M1 { mapping(bytes32 => bool) public signedHashes; - constructor(string memory name) User_M1(name) {} + constructor( + string memory name + ) User_M1(name) {} function depositIntoEigenlayer_M1( IStrategy[] memory strategies, @@ -86,7 +90,7 @@ contract User_M1_AltMethods is User_M1 { if (strat == BEACONCHAIN_ETH_STRAT) { revert("Should not be depositing with BEACONCHAIN_ETH_STRAT for M1-mainnet User"); } - + // Approve token IERC20 underlyingToken = strat.underlyingToken(); underlyingToken.approve(address(strategyManager), tokenBalance); @@ -95,17 +99,18 @@ contract User_M1_AltMethods is User_M1 { uint256 nonceBefore = strategyManager.nonces(address(this)); bytes32 structHash = keccak256( abi.encode( - strategyManager.DEPOSIT_TYPEHASH(), - strat, - underlyingToken, - tokenBalance, - nonceBefore, - expiry + strategyManager.DEPOSIT_TYPEHASH(), strat, underlyingToken, tokenBalance, nonceBefore, expiry + ) + ); + bytes32 domain_separator = keccak256( + abi.encode( + strategyManager.DOMAIN_TYPEHASH(), + keccak256(bytes("EigenLayer")), + block.chainid, + address(strategyManager) ) ); - bytes32 domain_separator = keccak256(abi.encode(strategyManager.DOMAIN_TYPEHASH(), keccak256(bytes("EigenLayer")), block.chainid, address(strategyManager))); - bytes32 digestHash = - keccak256(abi.encodePacked("\x19\x01", domain_separator, structHash)); + bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", domain_separator, structHash)); bytes memory signature = bytes(abi.encodePacked(digestHash)); // dummy sig data // Mark hash as signed diff --git a/src/test/integration/utils/PrintUtils.t.sol b/src/test/integration/utils/PrintUtils.t.sol index c80dd42ff..6fc2ed626 100644 --- a/src/test/integration/utils/PrintUtils.t.sol +++ b/src/test/integration/utils/PrintUtils.t.sol @@ -6,7 +6,6 @@ import "forge-std/Test.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; abstract contract PrintUtils is Test { - using Strings for *; using StdStyle for *; @@ -14,9 +13,11 @@ abstract contract PrintUtils is Test { string constant SECTION_DELIMITER = "======"; /// @dev Inheriting contracts implement this method - function NAME() public virtual view returns (string memory); + function NAME() public view virtual returns (string memory); - function _logHeader(string memory key) internal { + function _logHeader( + string memory key + ) internal { emit log(HEADER_DELIMITER); emit log(key); @@ -33,55 +34,40 @@ abstract contract PrintUtils is Test { emit log(HEADER_DELIMITER); } - function _logSection(string memory key) internal { - emit log(string.concat( - SECTION_DELIMITER, - key, - SECTION_DELIMITER - )); + function _logSection( + string memory key + ) internal { + emit log(string.concat(SECTION_DELIMITER, key, SECTION_DELIMITER)); } function _logSection(string memory key, address a) internal { - emit log(string.concat( - SECTION_DELIMITER, - key.cyan(), - ": ", - a.yellow().dim(), - SECTION_DELIMITER - )); + emit log(string.concat(SECTION_DELIMITER, key.cyan(), ": ", a.yellow().dim(), SECTION_DELIMITER)); } function _logAction(string memory key, string memory action) internal { - emit log_named_string( - key.cyan(), - action.italic() - ); + emit log_named_string(key.cyan(), action.italic()); } /// @dev Log method name - function _logM(string memory method) internal { - emit log(string.concat( - NAME().cyan(), - ".", - method.italic() - )); + function _logM( + string memory method + ) internal { + emit log(string.concat(NAME().cyan(), ".", method.italic())); } function _logM(string memory method, string memory arg) internal { - emit log(string.concat( - NAME().cyan(), - ".", - method.italic(), - ":", - arg - )); + emit log(string.concat(NAME().cyan(), ".", method.italic(), ":", arg)); } - function _log(string memory s) internal { + function _log( + string memory s + ) internal { emit log(s); } - function _logGreen(string memory s) internal { + function _logGreen( + string memory s + ) internal { emit log(s.green()); } @@ -97,7 +83,7 @@ abstract contract PrintUtils is Test { emit log_named_string(key, value); } - function _log(string memory key, uint value) internal { + function _log(string memory key, uint256 value) internal { emit log_named_uint(key, value); } @@ -116,4 +102,4 @@ abstract contract PrintUtils is Test { function _log(string memory key, bool value) internal { emit log_named_string(key, value ? "true".green() : "false".magenta()); } -} \ No newline at end of file +} diff --git a/src/test/mocks/DelegationManagerMock.sol b/src/test/mocks/DelegationManagerMock.sol index 7facde3a0..2a8022529 100644 --- a/src/test/mocks/DelegationManagerMock.sol +++ b/src/test/mocks/DelegationManagerMock.sol @@ -5,16 +5,22 @@ import "forge-std/Test.sol"; import "../../contracts/interfaces/IDelegationManager.sol"; import "../../contracts/interfaces/IStrategyManager.sol"; - contract DelegationManagerMock is IDelegationManager, Test { mapping(address => bool) public isOperator; mapping(address => mapping(IStrategy => uint256)) public operatorShares; - function getDelegatableShares(address staker) external view returns (IStrategy[] memory, uint256[] memory) {} + function getDelegatableShares( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory) {} - function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) external {} + function setMinWithdrawalDelayBlocks( + uint256 newMinWithdrawalDelayBlocks + ) external {} - function setStrategyWithdrawalDelayBlocks(IStrategy[] calldata strategies, uint256[] calldata withdrawalDelayBlocks) external {} + function setStrategyWithdrawalDelayBlocks( + IStrategy[] calldata strategies, + uint256[] calldata withdrawalDelayBlocks + ) external {} function setIsOperator(address operator, bool _isOperatorReturnValue) external { isOperator[operator] = _isOperatorReturnValue; @@ -25,42 +31,55 @@ contract DelegationManagerMock is IDelegationManager, Test { operatorShares[operator][strategy] = shares; } - mapping (address => address) public delegatedTo; + mapping(address => address) public delegatedTo; - function registerAsOperator(OperatorDetails calldata /*registeringOperatorDetails*/, string calldata /*metadataURI*/) external pure {} - - function updateOperatorMetadataURI(string calldata /*metadataURI*/) external pure {} + function registerAsOperator( + OperatorDetails calldata, /*registeringOperatorDetails*/ + string calldata /*metadataURI*/ + ) external pure {} + + function updateOperatorMetadataURI( + string calldata /*metadataURI*/ + ) external pure {} - function updateAVSMetadataURI(string calldata /*metadataURI*/) external pure {} + function updateAVSMetadataURI( + string calldata /*metadataURI*/ + ) external pure {} - function delegateTo(address operator, SignatureWithExpiry memory /*approverSignatureAndExpiry*/, bytes32 /*approverSalt*/) external { + function delegateTo( + address operator, + SignatureWithExpiry memory, /*approverSignatureAndExpiry*/ + bytes32 /*approverSalt*/ + ) external { delegatedTo[msg.sender] = operator; } - function modifyOperatorDetails(OperatorDetails calldata /*newOperatorDetails*/) external pure {} + function modifyOperatorDetails( + OperatorDetails calldata /*newOperatorDetails*/ + ) external pure {} function delegateToBySignature( - address /*staker*/, - address /*operator*/, - SignatureWithExpiry memory /*stakerSignatureAndExpiry*/, - SignatureWithExpiry memory /*approverSignatureAndExpiry*/, + address, /*staker*/ + address, /*operator*/ + SignatureWithExpiry memory, /*stakerSignatureAndExpiry*/ + SignatureWithExpiry memory, /*approverSignatureAndExpiry*/ bytes32 /*approverSalt*/ ) external pure {} - function undelegate(address staker) external returns (bytes32[] memory withdrawalRoot) { + function undelegate( + address staker + ) external returns (bytes32[] memory withdrawalRoot) { delegatedTo[staker] = address(0); return withdrawalRoot; } - function increaseDelegatedShares(address /*staker*/, IStrategy /*strategy*/, uint256 /*shares*/) external pure {} + function increaseDelegatedShares(address, /*staker*/ IStrategy, /*strategy*/ uint256 /*shares*/ ) external pure {} - function decreaseDelegatedShares( - address /*staker*/, - IStrategy /*strategy*/, - uint256 /*shares*/ - ) external pure {} + function decreaseDelegatedShares(address, /*staker*/ IStrategy, /*strategy*/ uint256 /*shares*/ ) external pure {} - function operatorDetails(address operator) external pure returns (OperatorDetails memory) { + function operatorDetails( + address operator + ) external pure returns (OperatorDetails memory) { OperatorDetails memory returnValue = OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: operator, @@ -69,11 +88,15 @@ contract DelegationManagerMock is IDelegationManager, Test { return returnValue; } - function delegationApprover(address operator) external pure returns (address) { + function delegationApprover( + address operator + ) external pure returns (address) { return operator; } - function stakerOptOutWindowBlocks(address /*operator*/) external pure returns (uint256) { + function stakerOptOutWindowBlocks( + address /*operator*/ + ) external pure returns (uint256) { return 0; } @@ -88,51 +111,83 @@ contract DelegationManagerMock is IDelegationManager, Test { * @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). */ - function strategyWithdrawalDelayBlocks(IStrategy /*strategy*/) external pure returns (uint256) { + function strategyWithdrawalDelayBlocks( + IStrategy /*strategy*/ + ) external pure returns (uint256) { return 0; } - + function getOperatorShares( address operator, IStrategy[] memory strategies ) external view returns (uint256[] memory) {} - function getWithdrawalDelay(IStrategy[] calldata /*strategies*/) public pure returns (uint256) { + function getWithdrawalDelay( + IStrategy[] calldata /*strategies*/ + ) public pure returns (uint256) { return 0; } - function isDelegated(address staker) external view returns (bool) { + function isDelegated( + address staker + ) external view returns (bool) { return (delegatedTo[staker] != address(0)); } - function isNotDelegated(address /*staker*/) external pure returns (bool) {} + function isNotDelegated( + address /*staker*/ + ) external pure returns (bool) {} // function isOperator(address /*operator*/) external pure returns (bool) {} - function stakerNonce(address /*staker*/) external pure returns (uint256) {} + function stakerNonce( + address /*staker*/ + ) external pure returns (uint256) {} - function delegationApproverSaltIsSpent(address /*delegationApprover*/, bytes32 /*salt*/) external pure returns (bool) {} + function delegationApproverSaltIsSpent( + address, /*delegationApprover*/ + bytes32 /*salt*/ + ) external pure returns (bool) {} - function calculateCurrentStakerDelegationDigestHash(address /*staker*/, address /*operator*/, uint256 /*expiry*/) external view returns (bytes32) {} + function calculateCurrentStakerDelegationDigestHash( + address, /*staker*/ + address, /*operator*/ + uint256 /*expiry*/ + ) external view returns (bytes32) {} - function calculateStakerDelegationDigestHash(address /*staker*/, uint256 /*stakerNonce*/, address /*operator*/, uint256 /*expiry*/) external view returns (bytes32) {} + function calculateStakerDelegationDigestHash( + address, /*staker*/ + uint256, /*stakerNonce*/ + address, /*operator*/ + uint256 /*expiry*/ + ) external view returns (bytes32) {} function calculateDelegationApprovalDigestHash( - address /*staker*/, - address /*operator*/, - address /*_delegationApprover*/, - bytes32 /*approverSalt*/, + address, /*staker*/ + address, /*operator*/ + address, /*_delegationApprover*/ + bytes32, /*approverSalt*/ uint256 /*expiry*/ ) external view returns (bytes32) {} - function calculateStakerDigestHash(address /*staker*/, address /*operator*/, uint256 /*expiry*/) - external pure returns (bytes32 stakerDigestHash) {} + function calculateStakerDigestHash( + address, /*staker*/ + address, /*operator*/ + uint256 /*expiry*/ + ) external pure returns (bytes32 stakerDigestHash) {} - function calculateApproverDigestHash(address /*staker*/, address /*operator*/, uint256 /*expiry*/) - external pure returns (bytes32 approverDigestHash) {} + function calculateApproverDigestHash( + address, /*staker*/ + address, /*operator*/ + uint256 /*expiry*/ + ) external pure returns (bytes32 approverDigestHash) {} - function calculateOperatorAVSRegistrationDigestHash(address /*operator*/, address /*avs*/, bytes32 /*salt*/, uint256 /*expiry*/) - external pure returns (bytes32 digestHash) {} + function calculateOperatorAVSRegistrationDigestHash( + address, /*operator*/ + address, /*avs*/ + bytes32, /*salt*/ + uint256 /*expiry*/ + ) external pure returns (bytes32 digestHash) {} function DOMAIN_TYPEHASH() external view returns (bytes32) {} @@ -142,19 +197,28 @@ contract DelegationManagerMock is IDelegationManager, Test { function OPERATOR_AVS_REGISTRATION_TYPEHASH() external view returns (bytes32) {} - function cumulativeWithdrawalsQueued(address staker) external view returns (uint256) {} + function cumulativeWithdrawalsQueued( + address staker + ) external view returns (uint256) {} - function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32) {} + function calculateWithdrawalRoot( + Withdrawal memory withdrawal + ) external pure returns (bytes32) {} - function registerOperatorToAVS(address operator, ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature) external {} + function registerOperatorToAVS( + address operator, + ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature + ) external {} - function deregisterOperatorFromAVS(address operator) external {} + function deregisterOperatorFromAVS( + address operator + ) external {} function operatorSaltIsSpent(address avs, bytes32 salt) external view returns (bool) {} function domainSeparator() external view returns (bytes32) {} - function queueWithdrawals( + function queueWithdrawals( QueuedWithdrawalParams[] calldata queuedWithdrawalParams ) external returns (bytes32[] memory) {} @@ -171,7 +235,7 @@ contract DelegationManagerMock is IDelegationManager, Test { uint256[] calldata middlewareTimesIndexes, bool[] calldata receiveAsTokens ) external {} - + // onlyDelegationManager functions in StrategyManager function addShares( IStrategyManager strategyManager, diff --git a/src/test/mocks/ERC20Mock.sol b/src/test/mocks/ERC20Mock.sol index 5e02b68e8..3c9b89f09 100644 --- a/src/test/mocks/ERC20Mock.sol +++ b/src/test/mocks/ERC20Mock.sol @@ -53,7 +53,7 @@ contract ERC20Mock is Context, IERC20 { function decimals() external pure returns (uint8) { return 18; } - + /** * @dev See {IERC20-totalSupply}. */ @@ -64,7 +64,9 @@ contract ERC20Mock is Context, IERC20 { /** * @dev See {IERC20-balanceOf}. */ - function balanceOf(address account) public view virtual override returns (uint256) { + function balanceOf( + address account + ) public view virtual override returns (uint256) { return _balances[account]; } @@ -89,7 +91,7 @@ contract ERC20Mock is Context, IERC20 { return _allowances[owner][spender]; } - function mint(address /*to*/, uint256 amount) public virtual { + function mint(address, /*to*/ uint256 amount) public virtual { address owner = _msgSender(); _mint(owner, amount); } @@ -104,7 +106,7 @@ contract ERC20Mock is Context, IERC20 { * * - `spender` cannot be the zero address. */ - function approve(address /*spender*/, uint256 /*amount*/) public virtual override returns (bool) { + function approve(address, /*spender*/ uint256 /*amount*/ ) public virtual override returns (bool) { return true; } @@ -162,7 +164,8 @@ contract ERC20Mock is Context, IERC20 { _afterTokenTransfer(from, to, amount); } - /** @dev Creates `amount` tokens and assigns them to `account`, increasing + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. @@ -247,7 +250,6 @@ contract ERC20Mock is Context, IERC20 { } } - /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. diff --git a/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol b/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol index 173acf69b..dbb56afbf 100644 --- a/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol +++ b/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol @@ -1,11 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.12; - // copy-pasted OZ code with _balances mapping made *internal* instead of private - - // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) // pragma solidity ^0.8.0; @@ -60,7 +57,9 @@ interface OpenZeppelin_IERC20 { /** * @dev Returns the amount of tokens owned by `account`. */ - function balanceOf(address account) external view returns (uint256); + function balanceOf( + address account + ) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. @@ -233,7 +232,9 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe /** * @dev See {IERC20-balanceOf}. */ - function balanceOf(address account) public view virtual override returns (uint256) { + function balanceOf( + address account + ) public view virtual override returns (uint256) { return _balances[account]; } @@ -374,7 +375,8 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe _afterTokenTransfer(from, to, amount); } - /** @dev Creates `amount` tokens and assigns them to `account`, increasing + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. @@ -499,7 +501,6 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} } - // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) // pragma solidity ^0.8.0; @@ -518,7 +519,9 @@ abstract contract OpenZeppelin_ERC20Burnable is OpenZeppelin_Context, OpenZeppel * * See {ERC20-_burn}. */ - function burn(uint256 amount) public virtual { + function burn( + uint256 amount + ) public virtual { _burn(_msgSender(), amount); } @@ -564,19 +567,29 @@ contract OpenZeppelin_ERC20PresetFixedSupply is OpenZeppelin_ERC20Burnable { * * See {ERC20-constructor}. */ - constructor(string memory name, string memory symbol, uint256 initialSupply, address owner) OpenZeppelin_ERC20(name, symbol) { + constructor( + string memory name, + string memory symbol, + uint256 initialSupply, + address owner + ) OpenZeppelin_ERC20(name, symbol) { _mint(owner, initialSupply); } } - - // actual mock code contract ERC20_OneWeiFeeOnTransfer is OpenZeppelin_ERC20PresetFixedSupply { - - constructor(uint256 initSupply, address initOwner) - OpenZeppelin_ERC20PresetFixedSupply("ERC20_OneWeiFeeOnTransfer_Mock", "ERC20_OneWeiFeeOnTransfer_Mock", initSupply, initOwner) - {} + constructor( + uint256 initSupply, + address initOwner + ) + OpenZeppelin_ERC20PresetFixedSupply( + "ERC20_OneWeiFeeOnTransfer_Mock", + "ERC20_OneWeiFeeOnTransfer_Mock", + initSupply, + initOwner + ) + {} /** * @dev Moves `amount` of tokens from `from` to `to`. @@ -606,12 +619,11 @@ contract ERC20_OneWeiFeeOnTransfer is OpenZeppelin_ERC20PresetFixedSupply { // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += (amount - 1); - } + } } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } - } diff --git a/src/test/mocks/ERC20_SetTransferReverting_Mock.sol b/src/test/mocks/ERC20_SetTransferReverting_Mock.sol index dd12a7fd3..ac5322bb4 100644 --- a/src/test/mocks/ERC20_SetTransferReverting_Mock.sol +++ b/src/test/mocks/ERC20_SetTransferReverting_Mock.sol @@ -4,14 +4,18 @@ pragma solidity ^0.8.12; import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; contract ERC20_SetTransferReverting_Mock is ERC20PresetFixedSupply { - bool public transfersRevert; - constructor(uint256 initSupply, address initOwner) + constructor( + uint256 initSupply, + address initOwner + ) ERC20PresetFixedSupply("ERC20_SetTransferReverting_Mock", "ERC20_SetTransferReverting_Mock", initSupply, initOwner) - {} + {} - function setTransfersRevert(bool _transfersRevert) public { + function setTransfersRevert( + bool _transfersRevert + ) public { transfersRevert = _transfersRevert; } @@ -22,5 +26,4 @@ contract ERC20_SetTransferReverting_Mock is ERC20PresetFixedSupply { // revert("ERC20_SetTransferReverting_Mock._beforeTokenTransfer: transfersRevert set"); } } - } diff --git a/src/test/mocks/ETHDepositMock.sol b/src/test/mocks/ETHDepositMock.sol index 8b8841974..7220adf7a 100644 --- a/src/test/mocks/ETHDepositMock.sol +++ b/src/test/mocks/ETHDepositMock.sol @@ -3,9 +3,7 @@ pragma solidity ^0.8.12; import "../../contracts/interfaces/IETHPOSDeposit.sol"; - contract ETHPOSDepositMock is IETHPOSDeposit { - function deposit( bytes calldata pubkey, bytes calldata withdrawal_credentials, @@ -13,7 +11,6 @@ contract ETHPOSDepositMock is IETHPOSDeposit { bytes32 deposit_data_root ) external payable {} - function get_deposit_root() external pure returns (bytes32) { bytes32 root; return root; @@ -25,7 +22,4 @@ contract ETHPOSDepositMock is IETHPOSDeposit { bytes memory root; return root; } - - } - diff --git a/src/test/mocks/EigenPodManagerMock.sol b/src/test/mocks/EigenPodManagerMock.sol index 127fcc49a..52b8152c6 100644 --- a/src/test/mocks/EigenPodManagerMock.sol +++ b/src/test/mocks/EigenPodManagerMock.sol @@ -5,7 +5,6 @@ import "forge-std/Test.sol"; import "../../contracts/interfaces/IEigenPodManager.sol"; import "../../contracts/permissions/Pausable.sol"; - contract EigenPodManagerMock is IEigenPodManager, Test, Pausable { IStrategy public constant beaconChainETHStrategy = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); IBeacon public eigenPodBeacon; @@ -13,35 +12,49 @@ contract EigenPodManagerMock is IEigenPodManager, Test, Pausable { mapping(address => int256) public podShares; - constructor(IPauserRegistry _pauserRegistry) { + constructor( + IPauserRegistry _pauserRegistry + ) { _initializePauser(_pauserRegistry, 0); } - function slasher() external view returns(ISlasher) {} + function slasher() external view returns (ISlasher) {} - function createPod() external returns(address) {} + function createPod() external returns (address) {} - function stake(bytes calldata /*pubkey*/, bytes calldata /*signature*/, bytes32 /*depositDataRoot*/) external payable {} + function stake( + bytes calldata, /*pubkey*/ + bytes calldata, /*signature*/ + bytes32 /*depositDataRoot*/ + ) external payable {} - function recordBeaconChainETHBalanceUpdate(address /*podOwner*/, int256 /*sharesDelta*/) external pure {} + function recordBeaconChainETHBalanceUpdate(address, /*podOwner*/ int256 /*sharesDelta*/ ) external pure {} - function ownerToPod(address /*podOwner*/) external pure returns(IEigenPod) { + function ownerToPod( + address /*podOwner*/ + ) external pure returns (IEigenPod) { return IEigenPod(address(0)); } - function getPod(address podOwner) external pure returns(IEigenPod) { + function getPod( + address podOwner + ) external pure returns (IEigenPod) { return IEigenPod(podOwner); } - function strategyManager() external pure returns(IStrategyManager) { + function strategyManager() external pure returns (IStrategyManager) { return IStrategyManager(address(0)); } - - function hasPod(address /*podOwner*/) external pure returns (bool) { + + function hasPod( + address /*podOwner*/ + ) external pure returns (bool) { return false; } - function podOwnerShares(address podOwner) external view returns (int256) { + function podOwnerShares( + address podOwner + ) external view returns (int256) { return podShares[podOwner]; } @@ -49,7 +62,7 @@ contract EigenPodManagerMock is IEigenPodManager, Test, Pausable { podShares[podOwner] = shares; } - function addShares(address /*podOwner*/, uint256 shares) external pure returns (uint256) { + function addShares(address, /*podOwner*/ uint256 shares) external pure returns (uint256) { // this is the "increase in delegateable tokens" return (shares); } @@ -66,5 +79,7 @@ contract EigenPodManagerMock is IEigenPodManager, Test, Pausable { return type(uint64).max; } - function setDenebForkTimestamp(uint64 timestamp) external{} -} \ No newline at end of file + function setDenebForkTimestamp( + uint64 timestamp + ) external {} +} diff --git a/src/test/mocks/EigenPodMock.sol b/src/test/mocks/EigenPodMock.sol index d1e12199f..c75fbce43 100644 --- a/src/test/mocks/EigenPodMock.sol +++ b/src/test/mocks/EigenPodMock.sol @@ -5,14 +5,15 @@ import "forge-std/Test.sol"; import "../../contracts/interfaces/IEigenPod.sol"; contract EigenPodMock is IEigenPod, Test { + function nonBeaconChainETHBalanceWei() external view returns (uint256) {} - function nonBeaconChainETHBalanceWei() external view returns(uint256) {} - - /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer), - function withdrawableRestakedExecutionLayerGwei() external view returns(uint64) {} + /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer), + function withdrawableRestakedExecutionLayerGwei() external view returns (uint64) {} /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager - function initialize(address owner) external {} + function initialize( + address owner + ) external {} /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable {} @@ -38,10 +39,14 @@ contract EigenPodMock is IEigenPod, Test { function mostRecentWithdrawalTimestamp() external view returns (uint64) {} /// @notice Returns the validatorInfo struct for the provided pubkeyHash - function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external view returns (ValidatorInfo memory) {} + function validatorPubkeyHashToInfo( + bytes32 validatorPubkeyHash + ) external view returns (ValidatorInfo memory) {} /// @notice This returns the status of a given validator - function validatorStatus(bytes32 pubkeyHash) external view returns(VALIDATOR_STATUS) {} + function validatorStatus( + bytes32 pubkeyHash + ) external view returns (VALIDATOR_STATUS) {} /// @notice Number of validators with proven withdrawal credentials, who do not have proven full withdrawals function activeValidatorCount() external view returns (uint256) {} @@ -55,9 +60,13 @@ contract EigenPodMock is IEigenPod, Test { /// @notice Returns the currently-active checkpoint function currentCheckpoint() external view returns (Checkpoint memory) {} - function checkpointBalanceExitedGwei(uint64) external view returns (uint64) {} + function checkpointBalanceExitedGwei( + uint64 + ) external view returns (uint64) {} - function startCheckpoint(bool revertIfNoBalance) external {} + function startCheckpoint( + bool revertIfNoBalance + ) external {} function verifyCheckpointProofs( BeaconChainProofs.BalanceContainerProof calldata balanceContainerProof, @@ -90,16 +99,24 @@ contract EigenPodMock is IEigenPod, Test { /// @notice called by owner of a pod to remove any ERC20s deposited in the pod function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external {} - function setProofSubmitter(address newProofSubmitter) external {} + function setProofSubmitter( + address newProofSubmitter + ) external {} function proofSubmitter() external view returns (address) {} - function validatorStatus(bytes calldata pubkey) external view returns (VALIDATOR_STATUS){} - function validatorPubkeyToInfo(bytes calldata validatorPubkey) external view returns (ValidatorInfo memory){} + function validatorStatus( + bytes calldata pubkey + ) external view returns (VALIDATOR_STATUS) {} + function validatorPubkeyToInfo( + bytes calldata validatorPubkey + ) external view returns (ValidatorInfo memory) {} /// @notice Query the 4788 oracle to get the parent block root of the slot with the given `timestamp` /// @param timestamp of the block for which the parent block root will be returned. MUST correspond /// to an existing slot within the last 24 hours. If the slot at `timestamp` was skipped, this method /// will revert. - function getParentBlockRoot(uint64 timestamp) external view returns (bytes32) {} -} \ No newline at end of file + function getParentBlockRoot( + uint64 timestamp + ) external view returns (bytes32) {} +} diff --git a/src/test/mocks/LiquidStakingToken.sol b/src/test/mocks/LiquidStakingToken.sol index b453ce4d2..b88bf4a5b 100644 --- a/src/test/mocks/LiquidStakingToken.sol +++ b/src/test/mocks/LiquidStakingToken.sol @@ -16,7 +16,9 @@ contract WETH is ERC20 { } /// @dev withdraw ether based on requested amount and user balance. - function withdraw(uint256 _amount) external { + function withdraw( + uint256 _amount + ) external { require(balanceOf(msg.sender) >= _amount, "insufficient balance."); _burn(msg.sender, _amount); payable(msg.sender).transfer(_amount); diff --git a/src/test/mocks/Reenterer.sol b/src/test/mocks/Reenterer.sol index 0b2b23e79..b534f0587 100644 --- a/src/test/mocks/Reenterer.sol +++ b/src/test/mocks/Reenterer.sol @@ -15,11 +15,7 @@ contract Reenterer is Test { event Reentered(bytes returnData); - function prepare( - address targetToUse, - uint256 msgValueToUse, - bytes memory callDataToUse - ) external { + function prepare(address targetToUse, uint256 msgValueToUse, bytes memory callDataToUse) external { target = targetToUse; msgValue = msgValueToUse; callData = callDataToUse; @@ -39,7 +35,9 @@ contract Reenterer is Test { } // added function that allows writing to `dataToReturn` - function prepareReturnData(bytes memory returnDataToUse) external { + function prepareReturnData( + bytes memory returnDataToUse + ) external { dataToReturn = returnDataToUse; } @@ -48,9 +46,7 @@ contract Reenterer is Test { if (expectedRevertData.length != 0) { cheats.expectRevert(expectedRevertData); } - (bool success, bytes memory returnData) = target.call{ - value: msgValue - }(callData); + (bool success, bytes memory returnData) = target.call{value: msgValue}(callData); if (!success) { assembly { @@ -77,9 +73,7 @@ contract Reenterer is Test { if (expectedRevertData.length != 0) { cheats.expectRevert(expectedRevertData); } - (bool success, bytes memory returnData) = target.call{ - value: msgValue - }(callData); + (bool success, bytes memory returnData) = target.call{value: msgValue}(callData); if (!success) { assembly { @@ -99,4 +93,4 @@ contract Reenterer is Test { } } } -} \ No newline at end of file +} diff --git a/src/test/mocks/Reverter.sol b/src/test/mocks/Reverter.sol index 0295ef4e5..6f708307b 100644 --- a/src/test/mocks/Reverter.sol +++ b/src/test/mocks/Reverter.sol @@ -11,4 +11,4 @@ contract ReverterWithDecimals is Reverter { function decimals() external pure returns (uint8) { return 18; } -} \ No newline at end of file +} diff --git a/src/test/mocks/SlasherMock.sol b/src/test/mocks/SlasherMock.sol index 6524fc466..7d5c8e056 100644 --- a/src/test/mocks/SlasherMock.sol +++ b/src/test/mocks/SlasherMock.sol @@ -4,41 +4,55 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; import "../../contracts/interfaces/ISlasher.sol"; - contract SlasherMock is ISlasher, Test { - mapping(address => bool) public isFrozen; bool public _canWithdraw = true; IStrategyManager public strategyManager; IDelegationManager public delegation; - function setCanWithdrawResponse(bool response) external { + function setCanWithdrawResponse( + bool response + ) external { _canWithdraw = response; } - function setOperatorFrozenStatus(address operator, bool status) external{ + function setOperatorFrozenStatus(address operator, bool status) external { isFrozen[operator] = status; } - function freezeOperator(address toBeFrozen) external { + function freezeOperator( + address toBeFrozen + ) external { isFrozen[toBeFrozen] = true; } - - function optIntoSlashing(address contractAddress) external{} - function resetFrozenStatus(address[] calldata frozenAddresses) external{} + function optIntoSlashing( + address contractAddress + ) external {} + + function resetFrozenStatus( + address[] calldata frozenAddresses + ) external {} - function recordFirstStakeUpdate(address operator, uint32 serveUntilBlock) external{} + function recordFirstStakeUpdate(address operator, uint32 serveUntilBlock) external {} - function recordStakeUpdate(address operator, uint32 updateBlock, uint32 serveUntilBlock, uint256 insertAfter) external{} + function recordStakeUpdate( + address operator, + uint32 updateBlock, + uint32 serveUntilBlock, + uint256 insertAfter + ) external {} - function recordLastStakeUpdateAndRevokeSlashingAbility(address operator, uint32 serveUntilBlock) external{} + function recordLastStakeUpdateAndRevokeSlashingAbility(address operator, uint32 serveUntilBlock) external {} /// @notice Returns true if `slashingContract` is currently allowed to slash `toBeSlashed`. function canSlash(address toBeSlashed, address slashingContract) external view returns (bool) {} /// @notice Returns the UTC timestamp until which `serviceContract` is allowed to slash the `operator`. - function contractCanSlashOperatorUntilBlock(address operator, address serviceContract) external view returns (uint32) {} + function contractCanSlashOperatorUntilBlock( + address operator, + address serviceContract + ) external view returns (uint32) {} /// @notice Returns the block at which the `serviceContract` last updated its view of the `operator`'s stake function latestUpdateBlock(address operator, address serviceContract) external view returns (uint32) {} @@ -46,33 +60,47 @@ contract SlasherMock is ISlasher, Test { /// @notice A search routine for finding the correct input value of `insertAfter` to `recordStakeUpdate` / `_updateMiddlewareList`. function getCorrectValueForInsertAfter(address operator, uint32 updateBlock) external view returns (uint256) {} - function canWithdraw(address /*operator*/, uint32 /*withdrawalStartBlock*/, uint256 /*middlewareTimesIndex*/) external view returns(bool) { + function canWithdraw( + address, /*operator*/ + uint32, /*withdrawalStartBlock*/ + uint256 /*middlewareTimesIndex*/ + ) external view returns (bool) { return _canWithdraw; } /** - * operator => + * operator => * [ * ( - * the least recent update block of all of the middlewares it's serving/served, + * the least recent update block of all of the middlewares it's serving/served, * latest time that the stake bonded at that update needed to serve until * ) * ] */ - function operatorToMiddlewareTimes(address operator, uint256 arrayIndex) external view returns (MiddlewareTimes memory) {} + function operatorToMiddlewareTimes( + address operator, + uint256 arrayIndex + ) external view returns (MiddlewareTimes memory) {} /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator].length` - function middlewareTimesLength(address operator) external view returns (uint256) {} + function middlewareTimesLength( + address operator + ) external view returns (uint256) {} /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].stalestUpdateBlock`. - function getMiddlewareTimesIndexStalestUpdateBlock(address operator, uint32 index) external view returns(uint32) {} + function getMiddlewareTimesIndexStalestUpdateBlock(address operator, uint32 index) external view returns (uint32) {} /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].latestServeUntilBlock`. - function getMiddlewareTimesIndexServeUntilBlock(address operator, uint32 index) external view returns(uint32) {} + function getMiddlewareTimesIndexServeUntilBlock(address operator, uint32 index) external view returns (uint32) {} /// @notice Getter function for fetching `_operatorToWhitelistedContractsByUpdate[operator].size`. - function operatorWhitelistedContractsLinkedListSize(address operator) external view returns (uint256) {} + function operatorWhitelistedContractsLinkedListSize( + address operator + ) external view returns (uint256) {} /// @notice Getter function for fetching a single node in the operator's linked list (`_operatorToWhitelistedContractsByUpdate[operator]`). - function operatorWhitelistedContractsLinkedListEntry(address operator, address node) external view returns (bool, uint256, uint256) {} + function operatorWhitelistedContractsLinkedListEntry( + address operator, + address node + ) external view returns (bool, uint256, uint256) {} } diff --git a/src/test/mocks/StrategyManagerMock.sol b/src/test/mocks/StrategyManagerMock.sol index 4a5f39cb2..8e5d2d746 100644 --- a/src/test/mocks/StrategyManagerMock.sol +++ b/src/test/mocks/StrategyManagerMock.sol @@ -18,9 +18,8 @@ contract StrategyManagerMock is OwnableUpgradeable, ReentrancyGuardUpgradeable, Pausable - // ,Test { - + // ,Test IDelegationManager public delegation; IEigenPodManager public eigenPodManager; @@ -34,28 +33,32 @@ contract StrategyManagerMock is /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated. only increments (doesn't decrement) mapping(address => uint256) public cumulativeWithdrawalsQueued; - + mapping(IStrategy => bool) public thirdPartyTransfersForbidden; - function setAddresses(IDelegationManager _delegation, IEigenPodManager _eigenPodManager, ISlasher _slasher) external - { - delegation = _delegation; - slasher = _slasher; - eigenPodManager = _eigenPodManager; + function setAddresses( + IDelegationManager _delegation, + IEigenPodManager _eigenPodManager, + ISlasher _slasher + ) external { + delegation = _delegation; + slasher = _slasher; + eigenPodManager = _eigenPodManager; } - function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) - external - returns (uint256) {} - + function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) external returns (uint256) {} - function depositBeaconChainETH(address staker, uint256 amount) external{} + function depositBeaconChainETH(address staker, uint256 amount) external {} + function recordBeaconChainETHBalanceUpdate( + address overcommittedPodOwner, + uint256 beaconChainETHStrategyIndex, + int256 sharesDelta + ) external {} - function recordBeaconChainETHBalanceUpdate(address overcommittedPodOwner, uint256 beaconChainETHStrategyIndex, int256 sharesDelta) - external{} - - function setStrategyWhitelister(address newStrategyWhitelister) external {} + function setStrategyWhitelister( + address newStrategyWhitelister + ) external {} function depositIntoStrategyWithSignature( IStrategy strategy, @@ -64,9 +67,7 @@ contract StrategyManagerMock is address staker, uint256 expiry, bytes memory signature - ) - external - returns (uint256 shares) {} + ) external returns (uint256 shares) {} /// @notice Returns the current shares of `user` in `strategy` function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint256 shares) {} @@ -77,7 +78,11 @@ contract StrategyManagerMock is * @param _strategiesToReturn strategies to return in getDeposits * @param _sharesToReturn shares to return in getDeposits */ - function setDeposits(address staker, IStrategy[] calldata _strategiesToReturn, uint256[] calldata _sharesToReturn) external { + function setDeposits( + address staker, + IStrategy[] calldata _strategiesToReturn, + uint256[] calldata _sharesToReturn + ) external { require(_strategiesToReturn.length == _sharesToReturn.length, "StrategyManagerMock: length mismatch"); strategiesToReturn[staker] = _strategiesToReturn; sharesToReturn[staker] = _sharesToReturn; @@ -92,20 +97,29 @@ contract StrategyManagerMock is * @notice Get all details on the staker's deposits and corresponding shares * @return (staker's strategies, shares in these strategies) */ - function getDeposits(address staker) external view returns (IStrategy[] memory, uint256[] memory) { + function getDeposits( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory) { return (strategiesToReturn[staker], sharesToReturn[staker]); } /// @notice Returns the array of strategies in which `staker` has nonzero shares - function stakerStrats(address staker) external view returns (IStrategy[] memory) {} + function stakerStrats( + address staker + ) external view returns (IStrategy[] memory) {} uint256 public stakerStrategyListLengthReturnValue; /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. - function stakerStrategyListLength(address /*staker*/) external view returns (uint256) { + + function stakerStrategyListLength( + address /*staker*/ + ) external view returns (uint256) { return stakerStrategyListLengthReturnValue; } - function setStakerStrategyListLengthReturnValue(uint256 valueToSet) public { + function setStakerStrategyListLengthReturnValue( + uint256 valueToSet + ) public { stakerStrategyListLengthReturnValue = valueToSet; } @@ -116,7 +130,7 @@ contract StrategyManagerMock is function removeShares(address staker, IStrategy strategy, uint256 shares) external {} function addShares(address staker, IERC20 token, IStrategy strategy, uint256 shares) external {} - + function withdrawSharesAsTokens(address recipient, IStrategy strategy, uint256 shares, IERC20 token) external {} /// @notice returns the enshrined beaconChainETH Strategy @@ -136,5 +150,7 @@ contract StrategyManagerMock is } } - function removeStrategiesFromDepositWhitelist(IStrategy[] calldata /*strategiesToRemoveFromWhitelist*/) external pure {} + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata /*strategiesToRemoveFromWhitelist*/ + ) external pure {} } diff --git a/src/test/token/EigenTransferRestrictions.t.sol b/src/test/token/EigenTransferRestrictions.t.sol index c254f97a7..7197338a0 100644 --- a/src/test/token/EigenTransferRestrictions.t.sol +++ b/src/test/token/EigenTransferRestrictions.t.sol @@ -30,7 +30,9 @@ contract EigenTransferRestrictionsTest is Test { /// @notice event emitted when the transfer restrictions are disabled event TransferRestrictionsDisabled(); - modifier filterAddress(address fuzzedAddress) { + modifier filterAddress( + address fuzzedAddress + ) { vm.assume(!fuzzedOutAddresses[fuzzedAddress]); _; } @@ -39,13 +41,10 @@ contract EigenTransferRestrictionsTest is Test { vm.startPrank(minter1); proxyAdmin = new ProxyAdmin(); // initialize with dummy BackingEigen address - - eigenImpl = new EigenHarness(new ERC20PresetFixedSupply({ - name: "bEIGEN", - symbol: "bEIGEN", - initialSupply: totalSupply, - owner: minter1 - })); + + eigenImpl = new EigenHarness( + new ERC20PresetFixedSupply({name: "bEIGEN", symbol: "bEIGEN", initialSupply: totalSupply, owner: minter1}) + ); eigen = Eigen(address(new TransparentUpgradeableProxy(address(eigenImpl), address(proxyAdmin), ""))); eigen.bEIGEN().transfer(address(eigen), totalSupply); vm.stopPrank(); @@ -57,7 +56,9 @@ contract EigenTransferRestrictionsTest is Test { fuzzedOutAddresses[address(0)] = true; } - function test_AllowedFromCanSendAnywhere(address to) public filterAddress(to) { + function test_AllowedFromCanSendAnywhere( + address to + ) public filterAddress(to) { _simulateMint(); // minter1 and eigenminter2 are already allowedFrom @@ -90,7 +91,9 @@ contract EigenTransferRestrictionsTest is Test { assertEq(eigen.allowedFrom(from), false, "EigenTest.test_CanSetAllowedFrom: allowedFrom was not set correctly"); } - function test_OnlyOwnerCanSetAllowedFrom(address notOwner) public filterAddress(notOwner) { + function test_OnlyOwnerCanSetAllowedFrom( + address notOwner + ) public filterAddress(notOwner) { _simulateMint(); // set allowedFrom[from] = true @@ -99,13 +102,16 @@ contract EigenTransferRestrictionsTest is Test { eigen.setAllowedFrom(notOwner, true); } - function test_NotAllowedFromCannotSendIfNoAllowedTos(address from, address to) public filterAddress(from) filterAddress(to) { + function test_NotAllowedFromCannotSendIfNoAllowedTos( + address from, + address to + ) public filterAddress(from) filterAddress(to) { _simulateMint(); // send other tokens from minter1 vm.startPrank(minter1); eigen.transfer(from, eigen.balanceOf(minter1) / 2); - + // sending from other will revert vm.startPrank(from); uint256 fromBalance = eigen.balanceOf(from); @@ -135,7 +141,9 @@ contract EigenTransferRestrictionsTest is Test { assertEq(eigen.allowedTo(to), false, "EigenTest.test_CanSetAllowedTo: allowedTo was not set correctly"); } - function test_OnlyOwnerCanSetAllowedTo(address notOwner) public filterAddress(notOwner) { + function test_OnlyOwnerCanSetAllowedTo( + address notOwner + ) public filterAddress(notOwner) { _simulateMint(); // set allowedFrom[from] = true @@ -163,7 +171,11 @@ contract EigenTransferRestrictionsTest is Test { vm.expectEmit(true, true, true, true, address(eigen)); emit TransferRestrictionsDisabled(); eigen.disableTransferRestrictions(); - assertEq(eigen.transferRestrictionsDisabledAfter(), 0, "EigenTest.test_disableTransferRestrictions: transfer restrictions were not disabled correctly"); + assertEq( + eigen.transferRestrictionsDisabledAfter(), + 0, + "EigenTest.test_disableTransferRestrictions: transfer restrictions were not disabled correctly" + ); vm.startPrank(from); // transfer restrictions are disabled diff --git a/src/test/token/EigenWrapping.t.sol b/src/test/token/EigenWrapping.t.sol index 76b9e6385..77012a4e6 100644 --- a/src/test/token/EigenWrapping.t.sol +++ b/src/test/token/EigenWrapping.t.sol @@ -35,7 +35,9 @@ contract EigenWrappingTests is Test { /// @notice event emitted when the transfer restrictions are disabled event TransferRestrictionsDisabled(); - modifier filterAddress(address fuzzedAddress) { + modifier filterAddress( + address fuzzedAddress + ) { vm.assume(!fuzzedOutAddresses[fuzzedAddress]); _; } @@ -82,8 +84,7 @@ contract EigenWrappingTests is Test { // initial bEIGEN balance uint256 initialBEIGENBalanceOfEigenToken = bEIGEN.balanceOf(address(eigen)); // initial EIGEN token supply - assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), - "eigen totalSupply changed incorrectly"); + assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), "eigen totalSupply changed incorrectly"); // unwrap // unwrap amount should be less than minter1 balance @@ -92,10 +93,12 @@ contract EigenWrappingTests is Test { eigen.unwrap(unwrapAmount); // check total supply and balance changes - assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), - "eigen totalSupply changed incorrectly"); - assertEq(bEIGEN.balanceOf(address(eigen)), initialBEIGENBalanceOfEigenToken - unwrapAmount, - "beigen balance of EIGEN tokens changed incorrectly"); + assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), "eigen totalSupply changed incorrectly"); + assertEq( + bEIGEN.balanceOf(address(eigen)), + initialBEIGENBalanceOfEigenToken - unwrapAmount, + "beigen balance of EIGEN tokens changed incorrectly" + ); assertEq(eigen.balanceOf(address(unwrapper)), minter1Balance - unwrapAmount); assertEq(bEIGEN.balanceOf(address(unwrapper)), unwrapAmount); } @@ -120,8 +123,7 @@ contract EigenWrappingTests is Test { vm.stopPrank(); // initial EIGEN token supply - assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), - "eigen totalSupply changed incorrectly"); + assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), "eigen totalSupply changed incorrectly"); // wrap // wrap amount should be less than minter1 balance @@ -134,14 +136,16 @@ contract EigenWrappingTests is Test { vm.stopPrank(); // check total supply and balance changes - assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), - "eigen totalSupply changed incorrectly"); + assertEq(eigen.totalSupply(), bEIGEN.totalSupply(), "eigen totalSupply changed incorrectly"); assertEq(bEIGEN.balanceOf(address(eigen)), initialBEIGENBalanceOfEigenToken - minter1Balance + wrapAmount); assertEq(eigen.balanceOf(address(wrapper)), wrapAmount); assertEq(bEIGEN.balanceOf(address(wrapper)), minter1Balance - wrapAmount); } - function test_CannotUnwrapMoreThanBalance(address unwrapper, uint256 unwrapAmount) public filterAddress(unwrapper) { + function test_CannotUnwrapMoreThanBalance( + address unwrapper, + uint256 unwrapAmount + ) public filterAddress(unwrapper) { _simulateMint(); _simulateBackingAndSetTransferRestrictions(); @@ -203,6 +207,5 @@ contract EigenWrappingTests is Test { vm.startPrank(minter1); bEIGEN.setAllowedFrom(minter1, true); vm.stopPrank(); - } } diff --git a/src/test/token/bEIGEN.t.sol b/src/test/token/bEIGEN.t.sol index 06de8b60e..f07fc2c13 100644 --- a/src/test/token/bEIGEN.t.sol +++ b/src/test/token/bEIGEN.t.sol @@ -9,13 +9,12 @@ import "../harnesses/EigenHarness.sol"; import "../../contracts/token/BackingEigen.sol"; - contract bEIGENTest is Test { mapping(address => bool) fuzzedOutAddresses; address initialOwner = 0xbb00DDa2832850a43840A3A86515E3Fe226865F2; address minterToSet = address(500); - address mintTo = address(12345); + address mintTo = address(12_345); ProxyAdmin proxyAdmin; @@ -25,7 +24,6 @@ contract bEIGENTest is Test { BackingEigen bEIGENImpl; BackingEigen bEIGEN; - function setUp() public { vm.startPrank(initialOwner); proxyAdmin = new ProxyAdmin(); @@ -47,18 +45,20 @@ contract bEIGENTest is Test { function test_Initialize() public { bEIGEN.initialize(initialOwner); - + // check that the owner is initialOwner assertEq(bEIGEN.owner(), initialOwner); // check the transfer restrictions are disabled after one year in the future assertEq(bEIGEN.transferRestrictionsDisabledAfter(), type(uint256).max); } - function testFuzz_CanBackTheEigenToken(uint eigenSupply) public { + function testFuzz_CanBackTheEigenToken( + uint256 eigenSupply + ) public { StdCheats.deal(address(eigen), address(this), eigenSupply); bEIGEN.initialize(initialOwner); - + // check that the total supply of bEIGEN is equal to the total supply of EIGEN assertEq(bEIGEN.totalSupply(), eigen.totalSupply()); assertEq(bEIGEN.balanceOf(address(eigen)), bEIGEN.totalSupply()); diff --git a/src/test/unit/AVSDirectoryUnit.t.sol b/src/test/unit/AVSDirectoryUnit.t.sol index 6fd70891f..23b7be740 100644 --- a/src/test/unit/AVSDirectoryUnit.t.sol +++ b/src/test/unit/AVSDirectoryUnit.t.sol @@ -113,7 +113,9 @@ contract AVSDirectoryUnitTests is EigenLayerUnitTestSetup, IAVSDirectoryEvents { return operatorSignature; } - function _registerOperatorWithBaseDetails(address operator) internal { + function _registerOperatorWithBaseDetails( + address operator + ) internal { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: address(0), @@ -122,7 +124,9 @@ contract AVSDirectoryUnitTests is EigenLayerUnitTestSetup, IAVSDirectoryEvents { _registerOperator(operator, operatorDetails, emptyStringForMetadataURI); } - function _registerOperatorWithDelegationApprover(address operator) internal { + function _registerOperatorWithDelegationApprover( + address operator + ) internal { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: cheats.addr(delegationSignerPrivateKey), @@ -131,7 +135,9 @@ contract AVSDirectoryUnitTests is EigenLayerUnitTestSetup, IAVSDirectoryEvents { _registerOperator(operator, operatorDetails, emptyStringForMetadataURI); } - function _registerOperatorWith1271DelegationApprover(address operator) internal returns (ERC1271WalletMock) { + function _registerOperatorWith1271DelegationApprover( + address operator + ) internal returns (ERC1271WalletMock) { address delegationSigner = cheats.addr(delegationSignerPrivateKey); /** * deploy a ERC1271WalletMock contract with the `delegationSigner` address as the owner, @@ -177,14 +183,18 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni avsDirectory.pause(2 ** PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS); cheats.expectRevert("Pausable: index is paused"); - avsDirectory.registerOperatorToAVS(address(0), ISignatureUtils.SignatureWithSaltAndExpiry(abi.encodePacked(""), 0, 0)); + avsDirectory.registerOperatorToAVS( + address(0), ISignatureUtils.SignatureWithSaltAndExpiry(abi.encodePacked(""), 0, 0) + ); cheats.expectRevert("Pausable: index is paused"); avsDirectory.deregisterOperatorFromAVS(address(0)); } // @notice Tests that an avs who calls `updateAVSMetadataURI` will correctly see an `AVSMetadataURIUpdated` event emitted with their input - function testFuzz_UpdateAVSMetadataURI(string memory metadataURI) public { + function testFuzz_UpdateAVSMetadataURI( + string memory metadataURI + ) public { // call `updateAVSMetadataURI` and check for event cheats.expectEmit(true, true, true, true, address(avsDirectory)); cheats.prank(defaultAVS); @@ -193,7 +203,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } // @notice Verifies an operator registers successfull to avs and see an `OperatorAVSRegistrationStatusUpdated` event emitted - function testFuzz_registerOperatorToAVS(bytes32 salt) public { + function testFuzz_registerOperatorToAVS( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -213,7 +225,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } // @notice Verifies an operator registers successfull to avs and see an `OperatorAVSRegistrationStatusUpdated` event emitted - function testFuzz_revert_whenOperatorNotRegisteredToEigenLayerYet(bytes32 salt) public { + function testFuzz_revert_whenOperatorNotRegisteredToEigenLayerYet( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); @@ -227,7 +241,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } // @notice Verifies an operator registers fails when the signature is not from the operator - function testFuzz_revert_whenSignatureAddressIsNotOperator(bytes32 salt) public { + function testFuzz_revert_whenSignatureAddressIsNotOperator( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -253,7 +269,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } // @notice Verifies an operator registers fails when it's already registered to the avs - function testFuzz_revert_whenOperatorAlreadyRegisteredToAVS(bytes32 salt) public { + function testFuzz_revert_whenOperatorAlreadyRegisteredToAVS( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -271,7 +289,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } /// @notice Checks that cancelSalt updates the operatorSaltIsSpent mapping correctly - function testFuzz_cancelSalt(bytes32 salt) public { + function testFuzz_cancelSalt( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -283,10 +303,14 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni avsDirectory.cancelSalt(salt); assertTrue(avsDirectory.operatorSaltIsSpent(operator, salt), "salt was not successfully cancelled"); - assertFalse(avsDirectory.operatorSaltIsSpent(defaultAVS, salt), "salt should only be cancelled for the operator"); + assertFalse( + avsDirectory.operatorSaltIsSpent(defaultAVS, salt), "salt should only be cancelled for the operator" + ); - bytes32 newSalt; - unchecked { newSalt = bytes32(uint(salt) + 1); } + bytes32 newSalt; + unchecked { + newSalt = bytes32(uint256(salt) + 1); + } assertFalse(salt == newSalt, "bad test setup"); @@ -298,7 +322,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } /// @notice Verifies that registration fails when the salt has been cancelled via cancelSalt - function testFuzz_revert_whenRegisteringWithCancelledSalt(bytes32 salt) public { + function testFuzz_revert_whenRegisteringWithCancelledSalt( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -316,7 +342,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } /// @notice Verifies that an operator cannot cancel the same salt twice - function testFuzz_revert_whenSaltCancelledTwice(bytes32 salt) public { + function testFuzz_revert_whenSaltCancelledTwice( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); @@ -330,7 +358,9 @@ contract AVSDirectoryUnitTests_operatorAVSRegisterationStatus is AVSDirectoryUni } /// @notice Verifies that an operator cannot cancel the same salt twice - function testFuzz_revert_whenCancellingSaltUsedToRegister(bytes32 salt) public { + function testFuzz_revert_whenCancellingSaltUsedToRegister( + bytes32 salt + ) public { address operator = cheats.addr(delegationSignerPrivateKey); assertFalse(delegationManager.isOperator(operator), "bad test setup"); _registerOperatorWithBaseDetails(operator); diff --git a/src/test/unit/DelegationUnit.t.sol b/src/test/unit/DelegationUnit.t.sol index 79bf46daf..ae9287a9c 100644 --- a/src/test/unit/DelegationUnit.t.sol +++ b/src/test/unit/DelegationUnit.t.sol @@ -44,7 +44,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag address defaultAVS = address(this); // 604800 seconds in week / 12 = 50,400 blocks - uint256 minWithdrawalDelayBlocks = 50400; + uint256 minWithdrawalDelayBlocks = 50_400; IStrategy[] public initializeStrategiesToSetDelayBlocks; uint256[] public initializeWithdrawalDelayBlocks; @@ -60,7 +60,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag uint8 internal constant PAUSED_EXIT_WITHDRAWAL_QUEUE = 2; // the number of 12-second blocks in 30 days (60 * 60 * 24 * 30 / 12 = 216,000) - uint256 public constant MAX_WITHDRAWAL_DELAY_BLOCKS = 216000; + uint256 public constant MAX_WITHDRAWAL_DELAY_BLOCKS = 216_000; /// @notice mappings used to handle duplicate entries in fuzzed address array input mapping(address => uint256) public totalSharesForStrategyInArray; @@ -115,7 +115,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag */ /** - * @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. + * @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. * Since we are mocking the strategyManager we call strategyManagerMock.setDeposits so that when * DelegationManager calls getDeposits, we can have these share amounts returned. */ @@ -163,11 +163,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag approverSignatureAndExpiry.expiry = expiry; { bytes32 digestHash = delegationManager.calculateDelegationApprovalDigestHash( - staker, - operator, - delegationManager.delegationApprover(operator), - salt, - expiry + staker, operator, delegationManager.delegationApprover(operator), salt, expiry ); (uint8 v, bytes32 r, bytes32 s) = cheats.sign(_delegationSignerPrivateKey, digestHash); approverSignatureAndExpiry.signature = abi.encodePacked(r, s, v); @@ -203,13 +199,8 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag function _delegateToOperatorWhoRequiresSig(address staker, address operator, bytes32 salt) internal { uint256 expiry = type(uint256).max; - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - operator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, operator, salt, expiry); cheats.prank(staker); delegationManager.delegateTo(operator, approverSignatureAndExpiry, salt); } @@ -228,11 +219,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; cheats.prank(caller); delegationManager.delegateToBySignature( - staker, - operator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - salt + staker, operator, stakerSignatureAndExpiry, approverSignatureAndExpiry, salt ); } @@ -244,24 +231,17 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag bytes32 salt ) internal { uint256 expiry = type(uint256).max; - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - operator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, operator, salt, expiry); cheats.prank(caller); delegationManager.delegateToBySignature( - staker, - operator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - salt + staker, operator, stakerSignatureAndExpiry, approverSignatureAndExpiry, salt ); } - function _registerOperatorWithBaseDetails(address operator) internal { + function _registerOperatorWithBaseDetails( + address operator + ) internal { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: address(0), @@ -270,7 +250,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag _registerOperator(operator, operatorDetails, emptyStringForMetadataURI); } - function _registerOperatorWithDelegationApprover(address operator) internal { + function _registerOperatorWithDelegationApprover( + address operator + ) internal { IDelegationManager.OperatorDetails memory operatorDetails = IDelegationManager.OperatorDetails({ __deprecated_earningsReceiver: operator, delegationApprover: defaultApprover, @@ -279,7 +261,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag _registerOperator(operator, operatorDetails, emptyStringForMetadataURI); } - function _registerOperatorWith1271DelegationApprover(address operator) internal returns (ERC1271WalletMock) { + function _registerOperatorWith1271DelegationApprover( + address operator + ) internal returns (ERC1271WalletMock) { address delegationSigner = defaultApprover; /** * deploy a ERC1271WalletMock contract with the `delegationSigner` address as the owner, @@ -319,18 +303,16 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag /** * @notice Using this helper function to fuzz withdrawalAmounts since fuzzing two dynamic sized arrays of equal lengths - * reject too many inputs. + * reject too many inputs. */ - function _fuzzWithdrawalAmounts(uint256[] memory depositAmounts) internal view returns (uint256[] memory) { + function _fuzzWithdrawalAmounts( + uint256[] memory depositAmounts + ) internal view returns (uint256[] memory) { uint256[] memory withdrawalAmounts = new uint256[](depositAmounts.length); for (uint256 i = 0; i < depositAmounts.length; i++) { cheats.assume(depositAmounts[i] > 0); // generate withdrawal amount within range s.t withdrawAmount <= depositAmount - withdrawalAmounts[i] = bound( - uint256(keccak256(abi.encodePacked(depositAmounts[i]))), - 0, - depositAmounts[i] - ); + withdrawalAmounts[i] = bound(uint256(keccak256(abi.encodePacked(depositAmounts[i]))), 0, depositAmounts[i]); } return withdrawalAmounts; } @@ -340,17 +322,18 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag address withdrawer, IStrategy strategy, uint256 withdrawalAmount - ) internal view returns ( - IDelegationManager.QueuedWithdrawalParams[] memory, - IDelegationManager.Withdrawal memory, - bytes32 - ) { + ) + internal + view + returns (IDelegationManager.QueuedWithdrawalParams[] memory, IDelegationManager.Withdrawal memory, bytes32) + { IStrategy[] memory strategyArray = new IStrategy[](1); strategyArray[0] = strategy; uint256[] memory withdrawalAmounts = new uint256[](1); withdrawalAmounts[0] = withdrawalAmount; - IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = new IDelegationManager.QueuedWithdrawalParams[](1); + IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = + new IDelegationManager.QueuedWithdrawalParams[](1); queuedWithdrawalParams[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: strategyArray, shares: withdrawalAmounts, @@ -367,7 +350,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag shares: withdrawalAmounts }); bytes32 withdrawalRoot = delegationManager.calculateWithdrawalRoot(withdrawal); - + return (queuedWithdrawalParams, withdrawal, withdrawalRoot); } @@ -376,18 +359,19 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag address withdrawer, IStrategy[] memory strategies, uint256[] memory withdrawalAmounts - ) internal view returns ( - IDelegationManager.QueuedWithdrawalParams[] memory, - IDelegationManager.Withdrawal memory, - bytes32 - ) { - IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = new IDelegationManager.QueuedWithdrawalParams[](1); + ) + internal + view + returns (IDelegationManager.QueuedWithdrawalParams[] memory, IDelegationManager.Withdrawal memory, bytes32) + { + IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = + new IDelegationManager.QueuedWithdrawalParams[](1); queuedWithdrawalParams[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: strategies, shares: withdrawalAmounts, withdrawer: withdrawer }); - + IDelegationManager.Withdrawal memory withdrawal = IDelegationManager.Withdrawal({ staker: staker, delegatedTo: delegationManager.delegatedTo(staker), @@ -398,13 +382,13 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag shares: withdrawalAmounts }); bytes32 withdrawalRoot = delegationManager.calculateWithdrawalRoot(withdrawal); - + return (queuedWithdrawalParams, withdrawal, withdrawalRoot); } /** * Deploy and deposit staker into a single strategy, then set up a queued withdrawal for the staker - * Assumptions: + * Assumptions: * - operator is already a registered operator. * - withdrawalAmount <= depositAmount */ @@ -440,9 +424,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag return (withdrawal, tokens, withdrawalRoot); } - /** + /** * Deploy and deposit staker into a single strategy, then set up a queued withdrawal for the staker - * Assumptions: + * Assumptions: * - operator is already a registered operator. * - withdrawalAmount <= depositAmount */ @@ -481,7 +465,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag /** * Deploy and deposit staker into strategies, then set up a queued withdrawal for the staker - * Assumptions: + * Assumptions: * - operator is already a registered operator. * - for each i, withdrawalAmount[i] <= depositAmount[i] (see filterFuzzedDepositWithdrawInputs above) */ @@ -559,12 +543,16 @@ contract DelegationManagerUnitTests_Initialization_Setters is DelegationManagerU delegationManager.setMinWithdrawalDelayBlocks(0); } - function testFuzz_setMinWithdrawalDelayBlocks_revert_tooLarge(uint256 newMinWithdrawalDelayBlocks) external { + function testFuzz_setMinWithdrawalDelayBlocks_revert_tooLarge( + uint256 newMinWithdrawalDelayBlocks + ) external { // filter fuzzed inputs to disallowed amounts cheats.assume(newMinWithdrawalDelayBlocks > delegationManager.MAX_WITHDRAWAL_DELAY_BLOCKS()); // attempt to set the `minWithdrawalDelayBlocks` variable - cheats.expectRevert("DelegationManager._setMinWithdrawalDelayBlocks: _minWithdrawalDelayBlocks cannot be > MAX_WITHDRAWAL_DELAY_BLOCKS"); + cheats.expectRevert( + "DelegationManager._setMinWithdrawalDelayBlocks: _minWithdrawalDelayBlocks cannot be > MAX_WITHDRAWAL_DELAY_BLOCKS" + ); delegationManager.setMinWithdrawalDelayBlocks(newMinWithdrawalDelayBlocks); } @@ -653,7 +641,9 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU cheats.assume(operatorDetails.stakerOptOutWindowBlocks > delegationManager.MAX_STAKER_OPT_OUT_WINDOW_BLOCKS()); cheats.prank(defaultOperator); - cheats.expectRevert("DelegationManager._setOperatorDetails: stakerOptOutWindowBlocks cannot be > MAX_STAKER_OPT_OUT_WINDOW_BLOCKS"); + cheats.expectRevert( + "DelegationManager._setOperatorDetails: stakerOptOutWindowBlocks cannot be > MAX_STAKER_OPT_OUT_WINDOW_BLOCKS" + ); delegationManager.registerAsOperator(operatorDetails, emptyStringForMetadataURI); } @@ -747,9 +737,8 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU ); delegationManager.modifyOperatorDetails(modifiedOperatorDetails); // or the transition is allowed, - } else if ( - modifiedOperatorDetails.stakerOptOutWindowBlocks >= initialOperatorDetails.stakerOptOutWindowBlocks - ) { + } else if (modifiedOperatorDetails.stakerOptOutWindowBlocks >= initialOperatorDetails.stakerOptOutWindowBlocks) + { cheats.expectEmit(true, true, true, true, address(delegationManager)); emit OperatorDetailsModified(defaultOperator, modifiedOperatorDetails); delegationManager.modifyOperatorDetails(modifiedOperatorDetails); @@ -796,7 +785,9 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU } // @notice Tests that an operator who calls `updateOperatorMetadataURI` will correctly see an `OperatorMetadataURIUpdated` event emitted with their input - function testFuzz_UpdateOperatorMetadataURI(string memory metadataURI) public { + function testFuzz_UpdateOperatorMetadataURI( + string memory metadataURI + ) public { // register *this contract* as an operator _registerOperatorWithBaseDetails(defaultOperator); @@ -892,10 +883,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // Set staker shares in StrategyManager @@ -921,10 +909,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { assertFalse(delegationManager.isOperator(staker), "staker incorrectly registered as operator"); // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); } @@ -951,10 +936,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // Set staker shares in BeaconChainStrategy @@ -989,10 +971,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { assertFalse(delegationManager.isOperator(staker), "staker incorrectly registered as operator"); // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); } @@ -1017,10 +996,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // Set staker shares in BeaconChainStrategy and StrategyMananger @@ -1065,10 +1041,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { assertFalse(delegationManager.isOperator(staker), "staker incorrectly registered as operator"); // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); } @@ -1091,10 +1064,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); @@ -1110,10 +1080,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { assertFalse(delegationManager.isOperator(staker), "staker incorrectly registered as operator"); // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); } @@ -1136,13 +1103,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { _registerOperatorWithDelegationApprover(defaultOperator); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // delegate from the `staker` to the operator cheats.startPrank(staker); @@ -1172,30 +1134,19 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // delegate from the `staker` to the operator, undelegate, and then try to delegate again with same approversalt // to check that call reverts cheats.startPrank(staker); delegationManager.delegateTo(defaultOperator, approverSignatureAndExpiry, salt); assertTrue( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent not spent?" ); delegationManager.undelegate(staker); @@ -1223,11 +1174,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { approverSignatureAndExpiry.expiry = expiry; { bytes32 digestHash = delegationManager.calculateDelegationApprovalDigestHash( - staker, - defaultOperator, - delegationManager.delegationApprover(defaultOperator), - emptySalt, - expiry + staker, defaultOperator, delegationManager.delegationApprover(defaultOperator), emptySalt, expiry ); (uint8 v, bytes32 r, bytes32 s) = cheats.sign(delegationSignerPrivateKey, digestHash); // mess up the signature by flipping v's parity @@ -1265,20 +1212,12 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // delegate from the `staker` to the operator cheats.startPrank(staker); @@ -1295,8 +1234,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -1304,8 +1242,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); @@ -1337,20 +1274,12 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // Set staker shares in StrategyManager IStrategy[] memory strategiesToReturn = new IStrategy[](1); @@ -1375,8 +1304,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -1384,8 +1312,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); @@ -1417,20 +1344,12 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // Set staker shares in BeaconChainStrategy eigenPodManagerMock.setPodOwnerShares(staker, beaconShares); @@ -1467,8 +1386,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -1476,8 +1394,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); @@ -1511,20 +1428,12 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // Set staker shares in BeaconChainStrategy and StrategyMananger { @@ -1573,8 +1482,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -1582,8 +1490,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); @@ -1637,13 +1544,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.assume(staker != address(wallet) && staker != defaultOperator); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // delegate from the `staker` to the operator cheats.startPrank(staker); @@ -1731,13 +1633,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // calculate the delegationSigner's but this is not the correct signature from the wallet contract // since the wallet owner is address(1) - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // try to delegate from the `staker` to the operator, and check reversion cheats.startPrank(staker); @@ -1773,20 +1670,12 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); // calculate the delegationSigner's signature - ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - staker, - defaultOperator, - salt, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = + _getApproverSignature(delegationSignerPrivateKey, staker, defaultOperator, salt, expiry); // delegate from the `staker` to the operator cheats.startPrank(staker); @@ -1804,8 +1693,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -1813,8 +1701,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); @@ -1839,19 +1726,12 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn delegationManager.pause(2 ** PAUSED_NEW_DELEGATION); uint256 expiry = type(uint256).max; - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; cheats.expectRevert("Pausable: index is paused"); delegationManager.delegateToBySignature( - defaultStaker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + defaultStaker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); } @@ -1864,10 +1744,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn ) public filterFuzzedAddressInputs(staker) filterFuzzedAddressInputs(operator) { expiry = bound(expiry, 0, block.timestamp - 1); cheats.expectRevert("DelegationManager.delegateToBySignature: staker signature expired"); - ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = ISignatureUtils.SignatureWithExpiry({ - signature: signature, - expiry: expiry - }); + ISignatureUtils.SignatureWithExpiry memory signatureWithExpiry = + ISignatureUtils.SignatureWithExpiry({signature: signature, expiry: expiry}); delegationManager.delegateToBySignature(staker, operator, signatureWithExpiry, signatureWithExpiry, emptySalt); } @@ -1879,11 +1757,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn _registerOperatorWithBaseDetails(defaultOperator); - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` // Should revert from invalid signature as staker is not set as the address of signer @@ -1892,11 +1767,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // use an empty approver signature input since none is needed / the input is unchecked ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; delegationManager.delegateToBySignature( - invalidStaker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + invalidStaker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); cheats.stopPrank(); } @@ -1909,11 +1780,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn _registerOperatorWithBaseDetails(defaultOperator); - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` // Should revert from invalid signature as staker is not set as the address of signer @@ -1922,11 +1790,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // use an empty approver signature input since none is needed / the input is unchecked ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; delegationManager.delegateToBySignature( - staker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + staker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); cheats.stopPrank(); } @@ -1939,11 +1803,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn _registerOperatorWithBaseDetails(defaultOperator); - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); _delegateToOperatorWhoAcceptsAllStakers(staker, defaultOperator); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` @@ -1953,11 +1814,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // use an empty approver signature input since none is needed / the input is unchecked ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; delegationManager.delegateToBySignature( - staker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + staker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); cheats.stopPrank(); } @@ -1968,11 +1825,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn address caller = address(2000); uint256 expiry = type(uint256).max; - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` // Should revert as `operator` is not registered @@ -1981,11 +1835,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // use an empty approver signature input since none is needed / the input is unchecked ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry; delegationManager.delegateToBySignature( - staker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + staker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); cheats.stopPrank(); } @@ -2000,7 +1850,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn uint256 delegationApproverExpiry ) public filterFuzzedAddressInputs(caller) { cheats.assume(caller != defaultOperator); - + // roll to a very late timestamp skip(type(uint256).max / 2); @@ -2013,34 +1863,22 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn console.log(stakerExpiry); console.log(delegationApproverExpiry); - _registerOperatorWithDelegationApprover(defaultOperator); // calculate the delegationSigner's signature ISignatureUtils.SignatureWithExpiry memory approverSignatureAndExpiry = _getApproverSignature( - delegationSignerPrivateKey, - defaultStaker, - defaultOperator, - emptySalt, - delegationApproverExpiry + delegationSignerPrivateKey, defaultStaker, defaultOperator, emptySalt, delegationApproverExpiry ); // calculate the staker signature - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - stakerExpiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, stakerExpiry); // try delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature`, and check for reversion cheats.startPrank(caller); cheats.expectRevert("DelegationManager._delegate: approver signature expired"); delegationManager.delegateToBySignature( - defaultStaker, - defaultOperator, - stakerSignatureAndExpiry, - approverSignatureAndExpiry, - emptySalt + defaultStaker, defaultOperator, stakerSignatureAndExpiry, approverSignatureAndExpiry, emptySalt ); cheats.stopPrank(); } @@ -2070,8 +1908,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt hasn't been used before assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - emptySalt + delegationManager.delegationApprover(defaultOperator), emptySalt ), "salt somehow spent too early?" ); @@ -2090,11 +1927,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // fetch the staker's current nonce uint256 currentStakerNonce = delegationManager.stakerNonce(defaultStaker); // calculate the staker signature - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` cheats.expectEmit(true, true, true, true, address(delegationManager)); @@ -2106,11 +1940,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn emit OperatorSharesIncreased(defaultOperator, defaultStaker, beaconChainETHStrategy, uint256(beaconShares)); } _delegateToBySignatureOperatorWhoAcceptsAllStakers( - defaultStaker, - caller, - defaultOperator, - stakerSignatureAndExpiry, - emptySalt + defaultStaker, caller, defaultOperator, stakerSignatureAndExpiry, emptySalt ); // Check operator shares increases @@ -2132,23 +1962,14 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn assertEq(operatorSharesBefore + shares, operatorSharesAfter, "operator shares not increased correctly"); // check all the delegation status changes assertTrue(delegationManager.isDelegated(defaultStaker), "staker not delegated correctly"); - assertEq( - delegationManager.delegatedTo(defaultStaker), - defaultOperator, - "staker delegated to the wrong address" - ); + assertEq(delegationManager.delegatedTo(defaultStaker), defaultOperator, "staker delegated to the wrong address"); assertFalse(delegationManager.isOperator(defaultStaker), "staker incorrectly registered as operator"); // check that the staker nonce incremented appropriately - assertEq( - delegationManager.stakerNonce(defaultStaker), - currentStakerNonce + 1, - "staker nonce did not increment" - ); + assertEq(delegationManager.stakerNonce(defaultStaker), currentStakerNonce + 1, "staker nonce did not increment"); // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - emptySalt + delegationManager.delegationApprover(defaultOperator), emptySalt ), "salt somehow spent too incorrectly?" ); @@ -2180,10 +2001,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); { @@ -2201,11 +2019,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // fetch the staker's current nonce uint256 currentStakerNonce = delegationManager.stakerNonce(defaultStaker); // calculate the staker signature - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` cheats.expectEmit(true, true, true, true, address(delegationManager)); @@ -2217,11 +2032,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn emit OperatorSharesIncreased(defaultOperator, defaultStaker, beaconChainETHStrategy, uint256(beaconShares)); } _delegateToBySignatureOperatorWhoRequiresSig( - defaultStaker, - caller, - defaultOperator, - stakerSignatureAndExpiry, - salt + defaultStaker, caller, defaultOperator, stakerSignatureAndExpiry, salt ); { // Check operator shares increases @@ -2243,11 +2054,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn assertEq(operatorSharesBefore + shares, operatorSharesAfter, "operator shares not increased correctly"); } assertTrue(delegationManager.isDelegated(defaultStaker), "staker not delegated correctly"); - assertEq( - delegationManager.delegatedTo(defaultStaker), - defaultOperator, - "staker delegated to the wrong address" - ); + assertEq(delegationManager.delegatedTo(defaultStaker), defaultOperator, "staker delegated to the wrong address"); assertFalse(delegationManager.isOperator(defaultStaker), "staker incorrectly registered as operator"); // check that the delegationApprover nonce incremented appropriately @@ -2255,8 +2062,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -2264,19 +2070,14 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); } // check that the staker nonce incremented appropriately - assertEq( - delegationManager.stakerNonce(defaultStaker), - currentStakerNonce + 1, - "staker nonce did not increment" - ); + assertEq(delegationManager.stakerNonce(defaultStaker), currentStakerNonce + 1, "staker nonce did not increment"); } /** @@ -2304,10 +2105,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt hasn't been used before assertFalse( - delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt - ), + delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt), "salt somehow spent too early?" ); { @@ -2325,11 +2123,8 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // fetch the staker's current nonce uint256 currentStakerNonce = delegationManager.stakerNonce(defaultStaker); // calculate the staker signature - ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = _getStakerSignature( - stakerPrivateKey, - defaultOperator, - expiry - ); + ISignatureUtils.SignatureWithExpiry memory stakerSignatureAndExpiry = + _getStakerSignature(stakerPrivateKey, defaultOperator, expiry); // delegate from the `staker` to the operator, via having the `caller` call `DelegationManager.delegateToBySignature` cheats.expectEmit(true, true, true, true, address(delegationManager)); @@ -2341,11 +2136,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn emit OperatorSharesIncreased(defaultOperator, defaultStaker, beaconChainETHStrategy, uint256(beaconShares)); } _delegateToBySignatureOperatorWhoRequiresSig( - defaultStaker, - caller, - defaultOperator, - stakerSignatureAndExpiry, - salt + defaultStaker, caller, defaultOperator, stakerSignatureAndExpiry, salt ); { @@ -2368,11 +2159,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn assertEq(operatorSharesBefore + shares, operatorSharesAfter, "operator shares not increased correctly"); } assertTrue(delegationManager.isDelegated(defaultStaker), "staker not delegated correctly"); - assertEq( - delegationManager.delegatedTo(defaultStaker), - defaultOperator, - "staker delegated to the wrong address" - ); + assertEq(delegationManager.delegatedTo(defaultStaker), defaultOperator, "staker delegated to the wrong address"); assertFalse(delegationManager.isOperator(defaultStaker), "staker incorrectly registered as operator"); // check that the delegationApprover nonce incremented appropriately @@ -2380,8 +2167,7 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt is still marked as unused (since it wasn't checked or used) assertFalse( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent too incorrectly?" ); @@ -2389,19 +2175,14 @@ contract DelegationManagerUnitTests_delegateToBySignature is DelegationManagerUn // verify that the salt is marked as used assertTrue( delegationManager.delegationApproverSaltIsSpent( - delegationManager.delegationApprover(defaultOperator), - salt + delegationManager.delegationApprover(defaultOperator), salt ), "salt somehow spent not spent?" ); } // check that the staker nonce incremented appropriately - assertEq( - delegationManager.stakerNonce(defaultStaker), - currentStakerNonce + 1, - "staker nonce did not increment" - ); + assertEq(delegationManager.stakerNonce(defaultStaker), currentStakerNonce + 1, "staker nonce did not increment"); } /** @@ -2468,7 +2249,9 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest } // @notice Verifies that there is no change in shares if the staker is not delegated - function testFuzz_increaseDelegatedShares_noop(address staker) public { + function testFuzz_increaseDelegatedShares_noop( + address staker + ) public { cheats.assume(staker != defaultOperator); _registerOperatorWithBaseDetails(defaultOperator); assertFalse(delegationManager.isDelegated(staker), "bad test setup"); @@ -2499,10 +2282,8 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest _delegateToOperatorWhoAcceptsAllStakers(staker, defaultOperator); } - uint256 _delegatedSharesBefore = delegationManager.operatorShares( - delegationManager.delegatedTo(staker), - strategyMock - ); + uint256 _delegatedSharesBefore = + delegationManager.operatorShares(delegationManager.delegatedTo(staker), strategyMock); if (delegationManager.isDelegated(staker)) { cheats.expectEmit(true, true, true, true, address(delegationManager)); @@ -2512,16 +2293,12 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest cheats.prank(address(strategyManagerMock)); delegationManager.increaseDelegatedShares(staker, strategyMock, shares); - uint256 delegatedSharesAfter = delegationManager.operatorShares( - delegationManager.delegatedTo(staker), - strategyMock - ); + uint256 delegatedSharesAfter = + delegationManager.operatorShares(delegationManager.delegatedTo(staker), strategyMock); if (delegationManager.isDelegated(staker)) { assertEq( - delegatedSharesAfter, - _delegatedSharesBefore + shares, - "delegated shares did not increment correctly" + delegatedSharesAfter, _delegatedSharesBefore + shares, "delegated shares did not increment correctly" ); } else { assertEq(delegatedSharesAfter, _delegatedSharesBefore, "delegated shares incremented incorrectly"); @@ -2543,7 +2320,9 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest } // @notice Verifies that there is no change in shares if the staker is not delegated - function testFuzz_decreaseDelegatedShares_noop(address staker) public { + function testFuzz_decreaseDelegatedShares_noop( + address staker + ) public { cheats.assume(staker != defaultOperator); _registerOperatorWithBaseDetails(defaultOperator); assertFalse(delegationManager.isDelegated(staker), "bad test setup"); @@ -2602,12 +2381,7 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest if (isDelegated) { for (uint256 i = 0; i < strategies.length; ++i) { cheats.expectEmit(true, true, true, true, address(delegationManager)); - emit OperatorSharesDecreased( - operatorToDecreaseSharesOf, - staker, - strategies[i], - sharesInputArray[i] - ); + emit OperatorSharesDecreased(operatorToDecreaseSharesOf, staker, strategies[i], sharesInputArray[i]); delegationManager.decreaseDelegatedShares(staker, strategies[i], sharesInputArray[i]); } } @@ -2639,7 +2413,9 @@ contract DelegationManagerUnitTests_ShareAdjustment is DelegationManagerUnitTest contract DelegationManagerUnitTests_Undelegate is DelegationManagerUnitTests { // @notice Verifies that undelegating is not possible when the "undelegation paused" switch is flipped - function test_undelegate_revert_paused(address staker) public filterFuzzedAddressInputs(staker) { + function test_undelegate_revert_paused( + address staker + ) public filterFuzzedAddressInputs(staker) { // set the pausing flag cheats.prank(pauser); delegationManager.pause(2 ** PAUSED_ENTER_WITHDRAWAL_QUEUE); @@ -2661,7 +2437,9 @@ contract DelegationManagerUnitTests_Undelegate is DelegationManagerUnitTests { } // @notice Verifies that an operator cannot undelegate from themself (this should always be forbidden) - function testFuzz_undelegate_revert_stakerIsOperator(address operator) public filterFuzzedAddressInputs(operator) { + function testFuzz_undelegate_revert_stakerIsOperator( + address operator + ) public filterFuzzedAddressInputs(operator) { _registerOperatorWithBaseDetails(operator); cheats.prank(operator); @@ -2731,9 +2509,11 @@ contract DelegationManagerUnitTests_Undelegate is DelegationManagerUnitTests { * Properly undelegates the staker, i.e. the staker becomes “delegated to” the zero address, and `isDelegated(staker)` returns ‘false’ * Emits a `StakerUndelegated` event */ - function testFuzz_undelegate_noDelegateableShares(address staker) public filterFuzzedAddressInputs(staker) { + function testFuzz_undelegate_noDelegateableShares( + address staker + ) public filterFuzzedAddressInputs(staker) { cheats.assume(staker != defaultOperator); - + // register *this contract* as an operator and delegate from the `staker` to them _registerOperatorWithBaseDetails(defaultOperator); _delegateToOperatorWhoAcceptsAllStakers(staker, defaultOperator); @@ -2745,9 +2525,7 @@ contract DelegationManagerUnitTests_Undelegate is DelegationManagerUnitTests { assertEq(withdrawalRoots.length, 0, "withdrawalRoot should be an empty array"); assertEq( - delegationManager.delegatedTo(staker), - address(0), - "undelegated staker should be delegated to zero address" + delegationManager.delegatedTo(staker), address(0), "undelegated staker should be delegated to zero address" ); assertFalse(delegationManager.isDelegated(staker), "staker not undelegated"); } @@ -2781,9 +2559,7 @@ contract DelegationManagerUnitTests_Undelegate is DelegationManagerUnitTests { assertEq(withdrawalRoots.length, 0, "withdrawalRoot should be an empty array"); assertEq( - delegationManager.delegatedTo(staker), - address(0), - "undelegated staker should be delegated to zero address" + delegationManager.delegatedTo(staker), address(0), "undelegated staker should be delegated to zero address" ); assertFalse(delegationManager.isDelegated(staker), "staker not undelegated"); } @@ -2793,7 +2569,8 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes function test_Revert_WhenEnterQueueWithdrawalsPaused() public { cheats.prank(pauser); delegationManager.pause(2 ** PAUSED_ENTER_WITHDRAWAL_QUEUE); - (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams, , ) = _setUpQueueWithdrawalsSingleStrat({ + (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams,,) = + _setUpQueueWithdrawalsSingleStrat({ staker: defaultStaker, withdrawer: defaultStaker, strategy: strategyMock, @@ -2810,7 +2587,8 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes shareAmounts[0] = 100; shareAmounts[1] = 100; - IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = new IDelegationManager.QueuedWithdrawalParams[](1); + IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = + new IDelegationManager.QueuedWithdrawalParams[](1); queuedWithdrawalParams[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: strategyArray, shares: shareAmounts, @@ -2821,10 +2599,13 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes delegationManager.queueWithdrawals(queuedWithdrawalParams); } - function test_Revert_WhenNotStakerWithdrawer(address withdrawer) public { + function test_Revert_WhenNotStakerWithdrawer( + address withdrawer + ) public { cheats.assume(withdrawer != defaultStaker); - (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams, , ) = _setUpQueueWithdrawalsSingleStrat({ + (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams,,) = + _setUpQueueWithdrawalsSingleStrat({ staker: defaultStaker, withdrawer: withdrawer, strategy: strategyMock, @@ -2840,7 +2621,8 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes uint256[] memory shareAmounts = new uint256[](0); address withdrawer = defaultOperator; - IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = new IDelegationManager.QueuedWithdrawalParams[](1); + IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams = + new IDelegationManager.QueuedWithdrawalParams[](1); queuedWithdrawalParams[0] = IDelegationManager.QueuedWithdrawalParams({ strategies: strategyArray, shares: shareAmounts, @@ -2853,7 +2635,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes /** * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * from the `strategy` for the `sharesAmount`. + * from the `strategy` for the `sharesAmount`. * - Asserts that staker is delegated to the operator * - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented @@ -2895,7 +2677,9 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes uint256 nonceAfter = delegationManager.cumulativeWithdrawalsQueued(staker); uint256 delegatedSharesAfter = delegationManager.operatorShares(defaultOperator, strategies[0]); assertEq(nonceBefore + 1, nonceAfter, "staker nonce should have incremented"); - assertEq(delegatedSharesBefore - withdrawalAmount, delegatedSharesAfter, "delegated shares not decreased correctly"); + assertEq( + delegatedSharesBefore - withdrawalAmount, delegatedSharesAfter, "delegated shares not decreased correctly" + ); } /** @@ -2911,7 +2695,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes function testFuzz_queueWithdrawal_MultipleStrats( address staker, uint256[] memory depositAmounts - ) public filterFuzzedAddressInputs(staker){ + ) public filterFuzzedAddressInputs(staker) { cheats.assume(staker != defaultOperator); cheats.assume(depositAmounts.length > 0 && depositAmounts.length <= 32); uint256[] memory withdrawalAmounts = _fuzzWithdrawalAmounts(depositAmounts); @@ -2959,7 +2743,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` * with multiple strategies and sharesAmounts and with thirdPartyTransfersForbidden for one of the strategies. * Queuing a withdrawal should pass as the `withdrawer` address is the same as the staker. - * + * * Depending on length sharesAmounts, deploys corresponding number of strategies * and deposits sharesAmounts into each strategy for the staker and delegates to operator. * For each strategy, withdrawAmount <= depositAmount @@ -2972,7 +2756,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes address staker, uint256[] memory depositAmounts, uint256 randSalt - ) public filterFuzzedAddressInputs(staker){ + ) public filterFuzzedAddressInputs(staker) { cheats.assume(depositAmounts.length > 0 && depositAmounts.length <= 32); cheats.assume(staker != defaultOperator); uint256[] memory withdrawalAmounts = _fuzzWithdrawalAmounts(depositAmounts); @@ -3041,7 +2825,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes strategyManagerMock.setThirdPartyTransfersForbidden(strategies[randStrategyIndex], true); _registerOperatorWithBaseDetails(defaultOperator); _delegateToOperatorWhoAcceptsAllStakers(staker, defaultOperator); - (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams, , ) = _setUpQueueWithdrawals({ + (IDelegationManager.QueuedWithdrawalParams[] memory queuedWithdrawalParams,,) = _setUpQueueWithdrawals({ staker: staker, withdrawer: withdrawer, strategies: strategies, @@ -3052,9 +2836,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes // NOTE: Originally, you could queue a withdrawal to a different address, which would fail with a specific error // if third party transfers were forbidden. Now, withdrawing to a different address is forbidden regardless // of third party transfer status. - cheats.expectRevert( - "DelegationManager.queueWithdrawal: withdrawer must be staker" - ); + cheats.expectRevert("DelegationManager.queueWithdrawal: withdrawer must be staker"); cheats.prank(staker); delegationManager.queueWithdrawals(queuedWithdrawalParams); } @@ -3078,16 +2860,13 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage _delegateToOperatorWhoAcceptsAllStakers(defaultStaker, defaultOperator); cheats.expectRevert("Pausable: index is paused"); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); } function test_Revert_WhenInvalidWithdrawalRoot() public { _registerOperatorWithBaseDetails(defaultOperator); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokens, - bytes32 withdrawalRoot - ) = _setUpCompleteQueuedWithdrawalSingleStrat({ + (IDelegationManager.Withdrawal memory withdrawal, IERC20[] memory tokens, bytes32 withdrawalRoot) = + _setUpCompleteQueuedWithdrawalSingleStrat({ staker: defaultStaker, withdrawer: defaultStaker, depositAmount: 100, @@ -3098,13 +2877,16 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage assertTrue(delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRoot should be pending"); cheats.roll(block.number + delegationManager.getWithdrawalDelay(withdrawal.strategies)); cheats.prank(defaultStaker); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); - assertFalse(delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRoot should be completed and marked false now"); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); + assertFalse( + delegationManager.pendingWithdrawals(withdrawalRoot), + "withdrawalRoot should be completed and marked false now" + ); cheats.roll(block.number + delegationManager.getWithdrawalDelay(withdrawal.strategies)); cheats.expectRevert("DelegationManager._completeQueuedWithdrawal: action is not in queue"); cheats.prank(defaultStaker); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); } /** @@ -3118,7 +2900,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ) public { cheats.assume(depositAmounts.length > 0 && depositAmounts.length <= 32); uint256[] memory withdrawalAmounts = _fuzzWithdrawalAmounts(depositAmounts); - + _registerOperatorWithBaseDetails(defaultOperator); ( IDelegationManager.Withdrawal memory withdrawal, @@ -3138,7 +2920,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage "DelegationManager._completeQueuedWithdrawal: minWithdrawalDelayBlocks period has not yet passed" ); cheats.roll(block.number + minWithdrawalDelayBlocks - 1); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, receiveAsTokens); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ receiveAsTokens); uint256 validBlockNumber = delegationManager.getWithdrawalDelay(withdrawal.strategies); if (validBlockNumber > minWithdrawalDelayBlocks) { @@ -3146,7 +2928,9 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage "DelegationManager._completeQueuedWithdrawal: withdrawalDelayBlocks period has not yet passed for this strategy" ); cheats.roll(validBlockNumber - 1); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, receiveAsTokens); + delegationManager.completeQueuedWithdrawal( + withdrawal, tokens, 0, /* middlewareTimesIndex */ receiveAsTokens + ); } cheats.stopPrank(); @@ -3187,7 +2971,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage "DelegationManager._completeQueuedWithdrawal: minWithdrawalDelayBlocks period has not yet passed" ); cheats.roll(block.number + minWithdrawalDelayBlocks - 1); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); uint256 validBlockNumber = delegationManager.getWithdrawalDelay(withdrawal.strategies); if (validBlockNumber > minWithdrawalDelayBlocks) { @@ -3195,7 +2979,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage "DelegationManager._completeQueuedWithdrawal: withdrawalDelayBlocks period has not yet passed for this strategy" ); cheats.roll(validBlockNumber - 1); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); } cheats.stopPrank(); @@ -3217,12 +3001,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.roll(block.number + delegationManager.getWithdrawalDelay(withdrawal.strategies)); cheats.expectRevert("DelegationManager._completeQueuedWithdrawal: only withdrawer can complete action"); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); } function test_Revert_WhenTokensArrayLengthMismatch() public { _registerOperatorWithBaseDetails(defaultOperator); - (IDelegationManager.Withdrawal memory withdrawal, , ) = _setUpCompleteQueuedWithdrawalSingleStrat({ + (IDelegationManager.Withdrawal memory withdrawal,,) = _setUpCompleteQueuedWithdrawalSingleStrat({ staker: defaultStaker, withdrawer: defaultStaker, depositAmount: 100, @@ -3234,7 +3018,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.roll(block.number + delegationManager.getWithdrawalDelay(withdrawal.strategies)); cheats.expectRevert("DelegationManager._completeQueuedWithdrawal: input length mismatch"); cheats.prank(defaultStaker); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, true); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ true); } /** @@ -3252,11 +3036,8 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.assume(staker != defaultOperator); cheats.assume(withdrawalAmount > 0 && withdrawalAmount <= depositAmount); _registerOperatorWithBaseDetails(defaultOperator); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokens, - bytes32 withdrawalRoot - ) = _setUpCompleteQueuedWithdrawalSingleStrat({ + (IDelegationManager.Withdrawal memory withdrawal, IERC20[] memory tokens, bytes32 withdrawalRoot) = + _setUpCompleteQueuedWithdrawalSingleStrat({ staker: staker, withdrawer: staker, depositAmount: depositAmount, @@ -3271,11 +3052,14 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.prank(staker); cheats.expectEmit(true, true, true, true, address(delegationManager)); emit WithdrawalCompleted(withdrawalRoot); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, true); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ true); uint256 operatorSharesAfter = delegationManager.operatorShares(defaultOperator, withdrawal.strategies[0]); assertEq(operatorSharesAfter, operatorSharesBefore, "operator shares should be unchanged"); - assertFalse(delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRoot should be completed and marked false now"); + assertFalse( + delegationManager.pendingWithdrawals(withdrawalRoot), + "withdrawalRoot should be completed and marked false now" + ); } /** @@ -3295,11 +3079,8 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.assume(withdrawalAmount > 0 && withdrawalAmount <= depositAmount); _registerOperatorWithBaseDetails(defaultOperator); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokens, - bytes32 withdrawalRoot - ) = _setUpCompleteQueuedWithdrawalSingleStrat({ + (IDelegationManager.Withdrawal memory withdrawal, IERC20[] memory tokens, bytes32 withdrawalRoot) = + _setUpCompleteQueuedWithdrawalSingleStrat({ staker: staker, withdrawer: staker, depositAmount: depositAmount, @@ -3314,11 +3095,16 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage cheats.prank(staker); cheats.expectEmit(true, true, true, true, address(delegationManager)); emit WithdrawalCompleted(withdrawalRoot); - delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0 /* middlewareTimesIndex */, false); + delegationManager.completeQueuedWithdrawal(withdrawal, tokens, 0, /* middlewareTimesIndex */ false); uint256 operatorSharesAfter = delegationManager.operatorShares(defaultOperator, withdrawal.strategies[0]); // Since staker is delegated, operatorShares get incremented - assertEq(operatorSharesAfter, operatorSharesBefore + withdrawalAmount, "operator shares not increased correctly"); - assertFalse(delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRoot should be completed and marked false now"); + assertEq( + operatorSharesAfter, operatorSharesBefore + withdrawalAmount, "operator shares not increased correctly" + ); + assertFalse( + delegationManager.pendingWithdrawals(withdrawalRoot), + "withdrawalRoot should be completed and marked false now" + ); } } diff --git a/src/test/unit/EigenPodManagerUnit.t.sol b/src/test/unit/EigenPodManagerUnit.t.sol index b31d1d404..621ff1577 100644 --- a/src/test/unit/EigenPodManagerUnit.t.sol +++ b/src/test/unit/EigenPodManagerUnit.t.sol @@ -23,14 +23,14 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup { IETHPOSDeposit public ethPOSMock; IEigenPod public eigenPodMockImplementation; IBeacon public eigenPodBeacon; // Proxy for eigenPodMockImplementation - + // Constants uint256 public constant GWEI_TO_WEI = 1e9; address public defaultStaker = address(this); IEigenPod public defaultPod; address public initialOwner = address(this); - function setUp() virtual override public { + function setUp() public virtual override { EigenLayerUnitTestSetup.setUp(); // Deploy Mocks @@ -39,23 +39,15 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup { eigenPodBeacon = new UpgradeableBeacon(address(eigenPodMockImplementation)); // Deploy EPM Implementation & Proxy - eigenPodManagerImplementation = new EigenPodManager( - ethPOSMock, - eigenPodBeacon, - strategyManagerMock, - slasherMock, - delegationManagerMock - ); + eigenPodManagerImplementation = + new EigenPodManager(ethPOSMock, eigenPodBeacon, strategyManagerMock, slasherMock, delegationManagerMock); eigenPodManager = EigenPodManager( address( new TransparentUpgradeableProxy( address(eigenPodManagerImplementation), address(eigenLayerProxyAdmin), abi.encodeWithSelector( - EigenPodManager.initialize.selector, - initialOwner, - pauserRegistry, - 0 /*initialPausedStatus*/ + EigenPodManager.initialize.selector, initialOwner, pauserRegistry, 0 /*initialPausedStatus*/ ) ) ) @@ -69,26 +61,30 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup { addressIsExcludedFromFuzzedInputs[address(eigenPodManager)] = true; } - /******************************************************************************* - Helper Functions/Modifiers - *******************************************************************************/ - + /** + * + * Helper Functions/Modifiers + * + */ function _initializePodWithShares(address podOwner, int256 shares) internal { // Deploy pod IEigenPod deployedPod = _deployAndReturnEigenPodForStaker(podOwner); - + // Set shares cheats.prank(address(deployedPod)); eigenPodManager.recordBeaconChainETHBalanceUpdate(podOwner, shares); } - - modifier deployPodForStaker(address staker) { + modifier deployPodForStaker( + address staker + ) { _deployAndReturnEigenPodForStaker(staker); _; } - function _deployAndReturnEigenPodForStaker(address staker) internal returns (IEigenPod deployedPod) { + function _deployAndReturnEigenPodForStaker( + address staker + ) internal returns (IEigenPod deployedPod) { deployedPod = eigenPodManager.getPod(staker); cheats.prank(staker); eigenPodManager.createPod(); @@ -102,36 +98,48 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup { } contract EigenPodManagerUnitTests_Initialization_Setters is EigenPodManagerUnitTests, IEigenPodManagerEvents { - - /******************************************************************************* - Initialization Tests - *******************************************************************************/ - + /** + * + * Initialization Tests + * + */ function test_initialization() public { // Check max pods, beacon chain, owner, and pauser assertEq(eigenPodManager.owner(), initialOwner, "Initialization: owner incorrect"); - assertEq(address(eigenPodManager.pauserRegistry()), address(pauserRegistry), "Initialization: pauser registry incorrect"); + assertEq( + address(eigenPodManager.pauserRegistry()), + address(pauserRegistry), + "Initialization: pauser registry incorrect" + ); assertEq(eigenPodManager.paused(), 0, "Initialization: paused value not 0"); // Check storage variables assertEq(address(eigenPodManager.ethPOS()), address(ethPOSMock), "Initialization: ethPOS incorrect"); - assertEq(address(eigenPodManager.eigenPodBeacon()), address(eigenPodBeacon), "Initialization: eigenPodBeacon incorrect"); - assertEq(address(eigenPodManager.strategyManager()), address(strategyManagerMock), "Initialization: strategyManager incorrect"); + assertEq( + address(eigenPodManager.eigenPodBeacon()), + address(eigenPodBeacon), + "Initialization: eigenPodBeacon incorrect" + ); + assertEq( + address(eigenPodManager.strategyManager()), + address(strategyManagerMock), + "Initialization: strategyManager incorrect" + ); assertEq(address(eigenPodManager.slasher()), address(slasherMock), "Initialization: slasher incorrect"); - assertEq(address(eigenPodManager.delegationManager()), address(delegationManagerMock), "Initialization: delegationManager incorrect"); + assertEq( + address(eigenPodManager.delegationManager()), + address(delegationManagerMock), + "Initialization: delegationManager incorrect" + ); } function test_initialize_revert_alreadyInitialized() public { cheats.expectRevert("Initializable: contract is already initialized"); - eigenPodManager.initialize( - initialOwner, - pauserRegistry, - 0 /*initialPausedStatus*/); + eigenPodManager.initialize(initialOwner, pauserRegistry, 0 /*initialPausedStatus*/ ); } } contract EigenPodManagerUnitTests_CreationTests is EigenPodManagerUnitTests, IEigenPodManagerEvents { - function test_createPod() public { // Get expected pod address and pods before IEigenPod expectedPod = eigenPodManager.getPod(defaultStaker); @@ -153,8 +161,7 @@ contract EigenPodManagerUnitTests_CreationTests is EigenPodManagerUnitTests, IEi } contract EigenPodManagerUnitTests_StakeTests is EigenPodManagerUnitTests { - - function test_stake_podAlreadyDeployed() deployPodForStaker(defaultStaker) public { + function test_stake_podAlreadyDeployed() public deployPodForStaker(defaultStaker) { // Declare dummy variables bytes memory pubkey = bytes("pubkey"); bytes memory sig = bytes("sig"); @@ -178,39 +185,45 @@ contract EigenPodManagerUnitTests_StakeTests is EigenPodManagerUnitTests { // Check pod deployed _checkPodDeployed(defaultStaker, address(defaultPod), 0); // staker, defaultPod, numPodsBefore - + // Expect pod has 32 ether assertEq(address(defaultPod).balance, 32 ether, "ETH not staked in EigenPod"); } } contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { - - /******************************************************************************* - Add Shares Tests - *******************************************************************************/ - - function testFuzz_addShares_revert_notDelegationManager(address notDelegationManager) public filterFuzzedAddressInputs(notDelegationManager){ + /** + * + * Add Shares Tests + * + */ + function testFuzz_addShares_revert_notDelegationManager( + address notDelegationManager + ) public filterFuzzedAddressInputs(notDelegationManager) { cheats.assume(notDelegationManager != address(delegationManagerMock)); cheats.prank(notDelegationManager); cheats.expectRevert("EigenPodManager.onlyDelegationManager: not the DelegationManager"); eigenPodManager.addShares(defaultStaker, 0); } - + function test_addShares_revert_podOwnerZeroAddress() public { cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.addShares: podOwner cannot be zero address"); eigenPodManager.addShares(address(0), 0); } - function testFuzz_addShares_revert_sharesNegative(int256 shares) public { + function testFuzz_addShares_revert_sharesNegative( + int256 shares + ) public { cheats.assume(shares < 0); cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.addShares: shares cannot be negative"); eigenPodManager.addShares(defaultStaker, uint256(shares)); } - function testFuzz_addShares_revert_sharesNotWholeGwei(uint256 shares) public { + function testFuzz_addShares_revert_sharesNotWholeGwei( + uint256 shares + ) public { cheats.assume(int256(shares) >= 0); cheats.assume(shares % GWEI_TO_WEI != 0); cheats.prank(address(delegationManagerMock)); @@ -218,7 +231,9 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { eigenPodManager.addShares(defaultStaker, shares); } - function testFuzz_addShares(uint256 shares) public { + function testFuzz_addShares( + uint256 shares + ) public { // Fuzz inputs cheats.assume(defaultStaker != address(0)); shares = shares - (shares % GWEI_TO_WEI); // Round down to nearest Gwei @@ -232,25 +247,32 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { assertEq(eigenPodManager.podOwnerShares(defaultStaker), int256(shares), "Incorrect number of shares added"); } - /******************************************************************************* - Remove Shares Tests - ******************************************************************************/ - - function testFuzz_removeShares_revert_notDelegationManager(address notDelegationManager) public filterFuzzedAddressInputs(notDelegationManager) { + /** + * + * Remove Shares Tests + * + */ + function testFuzz_removeShares_revert_notDelegationManager( + address notDelegationManager + ) public filterFuzzedAddressInputs(notDelegationManager) { cheats.assume(notDelegationManager != address(delegationManagerMock)); cheats.prank(notDelegationManager); cheats.expectRevert("EigenPodManager.onlyDelegationManager: not the DelegationManager"); eigenPodManager.removeShares(defaultStaker, 0); } - function testFuzz_removeShares_revert_sharesNegative(int256 shares) public { + function testFuzz_removeShares_revert_sharesNegative( + int256 shares + ) public { cheats.assume(shares < 0); cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.removeShares: shares cannot be negative"); eigenPodManager.removeShares(defaultStaker, uint256(shares)); } - - function testFuzz_removeShares_revert_sharesNotWholeGwei(uint256 shares) public { + + function testFuzz_removeShares_revert_sharesNotWholeGwei( + uint256 shares + ) public { cheats.assume(int256(shares) >= 0); cheats.assume(shares % GWEI_TO_WEI != 0); cheats.prank(address(delegationManagerMock)); @@ -287,14 +309,21 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { eigenPodManager.removeShares(defaultStaker, sharesRemoved); // Check storage - assertEq(eigenPodManager.podOwnerShares(defaultStaker), int256(sharesAdded - sharesRemoved), "Incorrect number of shares removed"); + assertEq( + eigenPodManager.podOwnerShares(defaultStaker), + int256(sharesAdded - sharesRemoved), + "Incorrect number of shares removed" + ); } - function testFuzz_removeShares_zeroShares(address podOwner, uint256 shares) public filterFuzzedAddressInputs(podOwner) { + function testFuzz_removeShares_zeroShares( + address podOwner, + uint256 shares + ) public filterFuzzedAddressInputs(podOwner) { // Constrain inputs cheats.assume(podOwner != address(0)); cheats.assume(shares < type(uint256).max / 2); - shares = shares - (shares % GWEI_TO_WEI); // Round down to nearest Gwei + shares = shares - (shares % GWEI_TO_WEI); // Round down to nearest Gwei assertTrue(int256(shares) % int256(GWEI_TO_WEI) == 0, "Shares must be a whole Gwei amount"); // Initialize pod with shares @@ -308,10 +337,11 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { assertEq(eigenPodManager.podOwnerShares(podOwner), 0, "Shares not reset to zero"); } - /******************************************************************************* - WithdrawSharesAsTokens Tests - ******************************************************************************/ - + /** + * + * WithdrawSharesAsTokens Tests + * + */ function test_withdrawSharesAsTokens_revert_podOwnerZeroAddress() public { cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.withdrawSharesAsTokens: podOwner cannot be zero address"); @@ -321,17 +351,21 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { function test_withdrawSharesAsTokens_revert_destinationZeroAddress() public { cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.withdrawSharesAsTokens: destination cannot be zero address"); - eigenPodManager.withdrawSharesAsTokens(defaultStaker, address(0), 0); + eigenPodManager.withdrawSharesAsTokens(defaultStaker, address(0), 0); } - function testFuzz_withdrawSharesAsTokens_revert_sharesNegative(int256 shares) public { + function testFuzz_withdrawSharesAsTokens_revert_sharesNegative( + int256 shares + ) public { cheats.assume(shares < 0); cheats.prank(address(delegationManagerMock)); cheats.expectRevert("EigenPodManager.withdrawSharesAsTokens: shares cannot be negative"); eigenPodManager.withdrawSharesAsTokens(defaultStaker, defaultStaker, uint256(shares)); } - function testFuzz_withdrawSharesAsTokens_revert_sharesNotWholeGwei(uint256 shares) public { + function testFuzz_withdrawSharesAsTokens_revert_sharesNotWholeGwei( + uint256 shares + ) public { cheats.assume(int256(shares) >= 0); cheats.assume(shares % GWEI_TO_WEI != 0); @@ -341,14 +375,14 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { } /** - * @notice The `withdrawSharesAsTokens` is called in the `completeQueuedWithdrawal` function from the + * @notice The `withdrawSharesAsTokens` is called in the `completeQueuedWithdrawal` function from the * delegationManager. When a withdrawal is queued in the delegationManager, `removeShares is called` */ function test_withdrawSharesAsTokens_reduceEntireDeficit() public { // Shares to initialize & withdraw int256 sharesBeginning = -100e18; uint256 sharesToWithdraw = 101e18; - + // Deploy Pod And initialize with negative shares _initializePodWithShares(defaultStaker, sharesBeginning); @@ -394,9 +428,13 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { } } -contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is EigenPodManagerUnitTests, IEigenPodManagerEvents { - - function testFuzz_recordBalanceUpdate_revert_notPod(address invalidCaller) public filterFuzzedAddressInputs(invalidCaller) deployPodForStaker(defaultStaker) { +contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is + EigenPodManagerUnitTests, + IEigenPodManagerEvents +{ + function testFuzz_recordBalanceUpdate_revert_notPod( + address invalidCaller + ) public filterFuzzedAddressInputs(invalidCaller) deployPodForStaker(defaultStaker) { cheats.assume(invalidCaller != address(defaultPod)); cheats.prank(invalidCaller); cheats.expectRevert("EigenPodManager.onlyEigenPod: not a pod"); @@ -410,10 +448,14 @@ contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is EigenPodMa eigenPodManager.recordBeaconChainETHBalanceUpdate(address(0), 0); } - function testFuzz_recordBalanceUpdate_revert_nonWholeGweiAmount(int256 sharesDelta) public deployPodForStaker(defaultStaker) { + function testFuzz_recordBalanceUpdate_revert_nonWholeGweiAmount( + int256 sharesDelta + ) public deployPodForStaker(defaultStaker) { cheats.assume(sharesDelta % int256(GWEI_TO_WEI) != 0); cheats.prank(address(defaultPod)); - cheats.expectRevert("EigenPodManager.recordBeaconChainETHBalanceUpdate: sharesDelta must be a whole Gwei amount"); + cheats.expectRevert( + "EigenPodManager.recordBeaconChainETHBalanceUpdate: sharesDelta must be a whole Gwei amount" + ); eigenPodManager.recordBeaconChainETHBalanceUpdate(defaultStaker, sharesDelta); } @@ -434,7 +476,11 @@ contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is EigenPodMa eigenPodManager.recordBeaconChainETHBalanceUpdate(defaultStaker, scaledSharesDelta); // Check storage - assertEq(eigenPodManager.podOwnerShares(defaultStaker), scaledSharesBefore + scaledSharesDelta, "Shares not updated correctly"); + assertEq( + eigenPodManager.podOwnerShares(defaultStaker), + scaledSharesBefore + scaledSharesDelta, + "Shares not updated correctly" + ); } } @@ -442,24 +488,22 @@ contract EigenPodManagerUnitTests_ShareAdjustmentCalculationTests is EigenPodMan // Wrapper contract that exposes the internal `_calculateChangeInDelegatableShares` function EigenPodManagerWrapper public eigenPodManagerWrapper; - function setUp() virtual override public { + function setUp() public virtual override { super.setUp(); // Upgrade eigenPodManager to wrapper eigenPodManagerWrapper = new EigenPodManagerWrapper( - ethPOSMock, - eigenPodBeacon, - strategyManagerMock, - slasherMock, - delegationManagerMock + ethPOSMock, eigenPodBeacon, strategyManagerMock, slasherMock, delegationManagerMock + ); + eigenLayerProxyAdmin.upgrade( + TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper) ); - eigenLayerProxyAdmin.upgrade(TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } function testFuzz_shareAdjustment_negativeToNegative(int256 sharesBefore, int256 sharesAfter) public { cheats.assume(sharesBefore <= 0); cheats.assume(sharesAfter <= 0); - + int256 sharesDelta = eigenPodManagerWrapper.calculateChangeInDelegatableShares(sharesBefore, sharesAfter); assertEq(sharesDelta, 0, "Shares delta must be 0"); } @@ -467,7 +511,7 @@ contract EigenPodManagerUnitTests_ShareAdjustmentCalculationTests is EigenPodMan function testFuzz_shareAdjustment_negativeToPositive(int256 sharesBefore, int256 sharesAfter) public { cheats.assume(sharesBefore <= 0); cheats.assume(sharesAfter > 0); - + int256 sharesDelta = eigenPodManagerWrapper.calculateChangeInDelegatableShares(sharesBefore, sharesAfter); assertEq(sharesDelta, sharesAfter, "Shares delta must be equal to sharesAfter"); } @@ -475,7 +519,7 @@ contract EigenPodManagerUnitTests_ShareAdjustmentCalculationTests is EigenPodMan function testFuzz_shareAdjustment_positiveToNegative(int256 sharesBefore, int256 sharesAfter) public { cheats.assume(sharesBefore > 0); cheats.assume(sharesAfter <= 0); - + int256 sharesDelta = eigenPodManagerWrapper.calculateChangeInDelegatableShares(sharesBefore, sharesAfter); assertEq(sharesDelta, -sharesBefore, "Shares delta must be equal to the negative of sharesBefore"); } @@ -483,8 +527,12 @@ contract EigenPodManagerUnitTests_ShareAdjustmentCalculationTests is EigenPodMan function testFuzz_shareAdjustment_positiveToPositive(int256 sharesBefore, int256 sharesAfter) public { cheats.assume(sharesBefore > 0); cheats.assume(sharesAfter > 0); - + int256 sharesDelta = eigenPodManagerWrapper.calculateChangeInDelegatableShares(sharesBefore, sharesAfter); - assertEq(sharesDelta, sharesAfter - sharesBefore, "Shares delta must be equal to the difference between sharesAfter and sharesBefore"); + assertEq( + sharesDelta, + sharesAfter - sharesBefore, + "Shares delta must be equal to the difference between sharesAfter and sharesBefore" + ); } } diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index 6314a107c..50836431f 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -19,7 +19,6 @@ import "src/test/integration/mocks/EIP_4788_Oracle_Mock.t.sol"; import "src/test/utils/EigenPodUser.t.sol"; import "src/test/events/IEigenPodEvents.sol"; - contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, IEigenPodEvents { using Strings for *; using BytesLib for bytes; @@ -29,13 +28,13 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, EigenPod public eigenPod; EigenPod public podImplementation; IBeacon public eigenPodBeacon; - + // BeaconChain Mock Setup TimeMachine public timeMachine; ETHPOSDepositMock ethPOSDepositMock; BeaconChainMock public beaconChain; EIP_4788_Oracle_Mock constant EIP_4788_ORACLE = EIP_4788_Oracle_Mock(0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02); - + uint256 public numStakers; address defaultProofSubmitter = cheats.addr(uint256(0xDEADBEEF)); @@ -48,7 +47,7 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, bytes internal constant beaconProxyBytecode = hex"608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564"; - function setUp() public override virtual { + function setUp() public virtual override { // Setup EigenLayerUnitTestSetup.setUp(); @@ -60,56 +59,60 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, beaconChain = new BeaconChainMock(EigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL); // Deploy EigenPod - podImplementation = new EigenPod( - ethPOSDepositMock, - eigenPodManagerMock, - GENESIS_TIME_LOCAL - ); + podImplementation = new EigenPod(ethPOSDepositMock, eigenPodManagerMock, GENESIS_TIME_LOCAL); // Deploy Beacon eigenPodBeacon = new UpgradeableBeacon(address(podImplementation)); // Deploy Proxy same way as EigenPodManager does - eigenPod = EigenPod(payable( - Create2.deploy( - 0, - bytes32(uint256(uint160(address(this)))), - // set the beacon address to the eigenPodBeacon - abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) - ))); + eigenPod = EigenPod( + payable( + Create2.deploy( + 0, + bytes32(uint256(uint160(address(this)))), + // set the beacon address to the eigenPodBeacon + abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) + ) + ) + ); // Etch 4788 precompile cheats.etch(address(EIP_4788_ORACLE), type(EIP_4788_Oracle_Mock).runtimeCode); // Store the eigenPodBeacon address in the eigenPod beacon proxy - bytes32 beaconSlot = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; + bytes32 beaconSlot = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; cheats.store(address(eigenPod), beaconSlot, bytes32(uint256(uint160(address(eigenPodBeacon))))); // Initialize pod eigenPod.initialize(address(this)); - + // Set a proof submitter eigenPod.setProofSubmitter(defaultProofSubmitter); } - /******************************************************************************* - EIGENPOD Helpers - *******************************************************************************/ - + /** + * + * EIGENPOD Helpers + * + */ modifier timewarp() { - uint curState = timeMachine.warpToLast(); + uint256 curState = timeMachine.warpToLast(); _; timeMachine.warpToPresent(curState); } - function _seedPodWithETH(uint256 ethAmount) internal { + function _seedPodWithETH( + uint256 ethAmount + ) internal { cheats.deal(address(this), ethAmount); bool result; bytes memory data; (result, data) = address(eigenPod).call{value: ethAmount}(""); } - function _newEigenPodStaker(uint256 rand) internal returns (EigenPodUser, uint256) { + function _newEigenPodStaker( + uint256 rand + ) internal returns (EigenPodUser, uint256) { string memory stakerName; EigenPodUser staker; @@ -125,9 +128,11 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, } /// @dev Opposite of Endian.fromLittleEndianUint64 - function _toLittleEndianUint64(uint64 num) internal pure returns (bytes32) { + function _toLittleEndianUint64( + uint64 num + ) internal pure returns (bytes32) { uint256 lenum; - + // Rearrange the bytes from big-endian to little-endian format lenum |= uint256((num & 0xFF) << 56); lenum |= uint256((num & 0xFF00) << 40); @@ -137,53 +142,55 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, lenum |= uint256((num & 0xFF0000000000) >> 24); lenum |= uint256((num & 0xFF000000000000) >> 40); lenum |= uint256((num & 0xFF00000000000000) >> 56); - + // Shift the little-endian bytes to the end of the bytes32 value return bytes32(lenum << 192); } - /******************************************************************************* - verifyWithdrawalCredentials Assertions - *******************************************************************************/ - + /** + * + * verifyWithdrawalCredentials Assertions + * + */ function assert_Snap_Added_ActiveValidatorCount( EigenPodUser staker, - uint addedValidators, + uint256 addedValidators, string memory err ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(prevActiveValidatorCount + addedValidators, curActiveValidatorCount, err); } function assert_Snap_Removed_ActiveValidatorCount( EigenPodUser staker, - uint removedValidators, + uint256 removedValidators, string memory err ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(curActiveValidatorCount + removedValidators, prevActiveValidatorCount, err); } - function assert_Snap_Unchanged_ActiveValidatorCount( - EigenPodUser staker, - string memory err - ) internal { - uint curActiveValidatorCount = _getActiveValidatorCount(staker); - uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); + function assert_Snap_Unchanged_ActiveValidatorCount(EigenPodUser staker, string memory err) internal { + uint256 curActiveValidatorCount = _getActiveValidatorCount(staker); + uint256 prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); assertEq(curActiveValidatorCount, prevActiveValidatorCount, err); } - function _getActiveValidatorCount(EigenPodUser staker) internal view returns (uint) { + function _getActiveValidatorCount( + EigenPodUser staker + ) internal view returns (uint256) { EigenPod pod = staker.pod(); return pod.activeValidatorCount(); } - function _getPrevActiveValidatorCount(EigenPodUser staker) internal timewarp() returns (uint) { + function _getPrevActiveValidatorCount( + EigenPodUser staker + ) internal timewarp returns (uint256) { return _getActiveValidatorCount(staker); } @@ -197,7 +204,7 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, IEigenPod.VALIDATOR_STATUS[] memory curStatuses = _getValidatorStatuses(staker, pubkeyHashes); IEigenPod.VALIDATOR_STATUS[] memory prevStatuses = _getPrevValidatorStatuses(staker, pubkeyHashes); - for (uint i = 0; i < curStatuses.length; i++) { + for (uint256 i = 0; i < curStatuses.length; i++) { assertTrue(prevStatuses[i] == IEigenPod.VALIDATOR_STATUS.INACTIVE, err); assertTrue(curStatuses[i] == IEigenPod.VALIDATOR_STATUS.ACTIVE, err); } @@ -213,31 +220,38 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, IEigenPod.VALIDATOR_STATUS[] memory curStatuses = _getValidatorStatuses(staker, pubkeyHashes); IEigenPod.VALIDATOR_STATUS[] memory prevStatuses = _getPrevValidatorStatuses(staker, pubkeyHashes); - for (uint i = 0; i < curStatuses.length; i++) { + for (uint256 i = 0; i < curStatuses.length; i++) { assertTrue(prevStatuses[i] == IEigenPod.VALIDATOR_STATUS.ACTIVE, err); assertTrue(curStatuses[i] == IEigenPod.VALIDATOR_STATUS.WITHDRAWN, err); } } - function _getValidatorStatuses(EigenPodUser staker, bytes32[] memory pubkeyHashes) internal view returns (IEigenPod.VALIDATOR_STATUS[] memory) { + function _getValidatorStatuses( + EigenPodUser staker, + bytes32[] memory pubkeyHashes + ) internal view returns (IEigenPod.VALIDATOR_STATUS[] memory) { EigenPod pod = staker.pod(); IEigenPod.VALIDATOR_STATUS[] memory statuses = new IEigenPod.VALIDATOR_STATUS[](pubkeyHashes.length); - for (uint i = 0; i < statuses.length; i++) { + for (uint256 i = 0; i < statuses.length; i++) { statuses[i] = pod.validatorStatus(pubkeyHashes[i]); } return statuses; } - function _getPrevValidatorStatuses(EigenPodUser staker, bytes32[] memory pubkeyHashes) internal timewarp() returns (IEigenPod.VALIDATOR_STATUS[] memory) { + function _getPrevValidatorStatuses( + EigenPodUser staker, + bytes32[] memory pubkeyHashes + ) internal timewarp returns (IEigenPod.VALIDATOR_STATUS[] memory) { return _getValidatorStatuses(staker, pubkeyHashes); } - /******************************************************************************* - startCheckpoint Assertions - *******************************************************************************/ - + /** + * + * startCheckpoint Assertions + * + */ function check_StartCheckpoint_State( EigenPodUser staker ) internal { @@ -245,18 +259,12 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, assert_Snap_Created_Checkpoint(staker, "staker should have created a new checkpoint"); } - function assert_ProofsRemainingEqualsActive( - EigenPodUser staker, - string memory err - ) internal { + function assert_ProofsRemainingEqualsActive(EigenPodUser staker, string memory err) internal { EigenPod pod = staker.pod(); assertEq(pod.currentCheckpoint().proofsRemaining, pod.activeValidatorCount(), err); } - function assert_Snap_Created_Checkpoint( - EigenPodUser staker, - string memory err - ) internal { + function assert_Snap_Created_Checkpoint(EigenPodUser staker, string memory err) internal { uint64 curCheckpointTimestamp = _getCheckpointTimestamp(staker); uint64 prevCheckpointTimestamp = _getPrevCheckpointTimestamp(staker); @@ -264,18 +272,24 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, assertTrue(curCheckpointTimestamp != 0, err); } - function _getCheckpointTimestamp(EigenPodUser staker) internal view returns (uint64) { + function _getCheckpointTimestamp( + EigenPodUser staker + ) internal view returns (uint64) { EigenPod pod = staker.pod(); return pod.currentCheckpointTimestamp(); } - function _getPrevCheckpointTimestamp(EigenPodUser staker) internal timewarp() returns (uint64) { + function _getPrevCheckpointTimestamp( + EigenPodUser staker + ) internal timewarp returns (uint64) { return _getCheckpointTimestamp(staker); } - /******************************************************************************* - verifyCheckpointProofs - *******************************************************************************/ + /** + * + * verifyCheckpointProofs + * + */ /// @notice assumes positive rewards and that the checkpoint will be finalized function _expectEventsVerifyCheckpointProofs( @@ -286,24 +300,18 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, EigenPod pod = staker.pod(); int256 totalBalanceDeltaGWei = 0; uint64 checkpointTimestamp = pod.currentCheckpointTimestamp(); - for (uint i = 0; i < validators.length; i++) { + for (uint256 i = 0; i < validators.length; i++) { IEigenPod.ValidatorInfo memory info = pod.validatorPubkeyHashToInfo(proofs[i].pubkeyHash); uint64 prevBalanceGwei = info.restakedBalanceGwei; uint64 newBalanceGwei = BeaconChainProofs.getBalanceAtIndex(proofs[i].balanceRoot, validators[i]); - int128 balanceDeltaGwei = _calcBalanceDelta({ - newAmountGwei: newBalanceGwei, - previousAmountGwei: prevBalanceGwei - }); + int128 balanceDeltaGwei = + _calcBalanceDelta({newAmountGwei: newBalanceGwei, previousAmountGwei: prevBalanceGwei}); if (newBalanceGwei != prevBalanceGwei) { cheats.expectEmit(true, true, true, true, address(pod)); - emit ValidatorBalanceUpdated( - validators[i], - checkpointTimestamp, - newBalanceGwei - ); + emit ValidatorBalanceUpdated(validators[i], checkpointTimestamp, newBalanceGwei); } - if (newBalanceGwei == 0 ) { + if (newBalanceGwei == 0) { cheats.expectEmit(true, true, true, true, address(pod)); emit ValidatorWithdrawn(checkpointTimestamp, validators[i]); } @@ -313,20 +321,19 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, totalBalanceDeltaGWei += balanceDeltaGwei; } - int256 totalShareDeltaWei = (int128(uint128(pod.currentCheckpoint().podBalanceGwei)) + totalBalanceDeltaGWei) * int256(1 gwei); + int256 totalShareDeltaWei = + (int128(uint128(pod.currentCheckpoint().podBalanceGwei)) + totalBalanceDeltaGWei) * int256(1 gwei); cheats.expectEmit(true, true, true, true, address(pod)); emit CheckpointFinalized(checkpointTimestamp, totalShareDeltaWei); } /// @dev Calculates the delta between two Gwei amounts and returns as an int256 function _calcBalanceDelta(uint64 newAmountGwei, uint64 previousAmountGwei) internal pure returns (int128) { - return - int128(uint128(newAmountGwei)) - int128(uint128(previousAmountGwei)); + return int128(uint128(newAmountGwei)) - int128(uint128(previousAmountGwei)); } } contract EigenPodUnitTests_Initialization is EigenPodUnitTests { - function test_constructor() public { EigenPod pod = new EigenPod(ethPOSDepositMock, eigenPodManagerMock, GENESIS_TIME_LOCAL); @@ -336,7 +343,7 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } function test_initialization() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); // Check podOwner and restaked @@ -348,7 +355,7 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } function test_initialize_revert_alreadyInitialized() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); cheats.expectRevert("Initializable: contract is already initialized"); @@ -364,8 +371,10 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { pod.initialize(address(0)); } - function test_setProofSubmitter_revert_notPodOwner(address invalidCaller) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + function test_setProofSubmitter_revert_notPodOwner( + address invalidCaller + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); cheats.assume(invalidCaller != address(staker)); @@ -374,8 +383,10 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { pod.setProofSubmitter(invalidCaller); } - function test_setProofSubmitter(address newProofSubmitter) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + function test_setProofSubmitter( + address newProofSubmitter + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); address prevProofSubmitter = pod.proofSubmitter(); @@ -389,18 +400,21 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { + /** + * + * stake() tests + * + */ - /******************************************************************************* - stake() tests - *******************************************************************************/ - // Beacon chain staking constnats bytes public constant pubkey = hex"88347ed1c492eedc97fc8c506a35d44d81f27a0c7a1c661b35913cfd15256c0cccbd34a83341f505c7de2983292f2cab"; bytes public signature; bytes32 public depositDataRoot; - function testFuzz_stake_revert_notEigenPodManager(address invalidCaller) public { + function testFuzz_stake_revert_notEigenPodManager( + address invalidCaller + ) public { cheats.assume(invalidCaller != address(eigenPodManagerMock)); cheats.deal(invalidCaller, 32 ether); @@ -409,8 +423,9 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { eigenPod.stake{value: 32 ether}(pubkey, signature, depositDataRoot); } - - function testFuzz_stake_revert_invalidValue(uint256 value) public { + function testFuzz_stake_revert_invalidValue( + uint256 value + ) public { cheats.assume(value != 32 ether); cheats.deal(address(eigenPodManagerMock), value); @@ -434,17 +449,18 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { assertEq(address(ethPOSDepositMock).balance, 32 ether, "Incorrect amount transferred"); } - /******************************************************************************* - withdrawRestakedBeaconChainETH() tests - *******************************************************************************/ - + /** + * + * withdrawRestakedBeaconChainETH() tests + * + */ function testFuzz_withdrawRestakedBeaconChainETH_revert_notEigenPodManager( address invalidCaller, address recipient, uint256 randAmount ) public filterFuzzedAddressInputs(invalidCaller) { // Setup EigenPod Staker - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); // ensure invalid caller causing revert @@ -459,7 +475,7 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { uint256 randAmount ) public { // Setup EigenPod Staker - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -480,7 +496,7 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { uint256 randAmountWei ) public { // Setup EigenPod Staker - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -499,12 +515,9 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { pod.withdrawRestakedBeaconChainETH(recipient, randAmountWei); } - function testFuzz_withdrawRestakedBeaconChainETH( - uint256 rand, - uint256 randAmountWei - ) public { + function testFuzz_withdrawRestakedBeaconChainETH(uint256 rand, uint256 randAmountWei) public { // Setup EigenPod Staker - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -526,12 +539,12 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { assertEq(address(recipient).balance, randAmountWei, "recipient should have received withdrawn balance"); assertEq( - address(pod).balance, - uint(withdrawableRestakedExecutionLayerGwei * 1 gwei) - randAmountWei, + address(pod).balance, + uint256(withdrawableRestakedExecutionLayerGwei * 1 gwei) - randAmountWei, "pod balance should have decreased by withdrawn eth" ); assertEq( - pod.withdrawableRestakedExecutionLayerGwei(), + pod.withdrawableRestakedExecutionLayerGwei(), withdrawableRestakedExecutionLayerGwei - uint64(randAmountWei / 1 gwei), "withdrawableRestakedExecutionLayerGwei should have decreased by amount withdrawn" ); @@ -539,13 +552,15 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { } contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { - - /******************************************************************************* - recoverTokens() tests - *******************************************************************************/ - - function testFuzz_recoverTokens_revert_notPodOwner(address invalidCaller) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + /** + * + * recoverTokens() tests + * + */ + function testFuzz_recoverTokens_revert_notPodOwner( + address invalidCaller + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); address podOwner = pod.podOwner(); @@ -554,14 +569,14 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { tokens[0] = IERC20(address(0x123)); uint256[] memory amounts = new uint256[](1); amounts[0] = 1; - + cheats.prank(invalidCaller); cheats.expectRevert("EigenPod.onlyEigenPodOwner: not podOwner"); pod.recoverTokens(tokens, amounts, podOwner); } - + function test_recoverTokens_revert_whenPaused() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); address podOwner = pod.podOwner(); @@ -569,7 +584,7 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { tokens[0] = IERC20(address(0x123)); uint256[] memory amounts = new uint256[](1); amounts[0] = 1; - + // pause recoverTokens cheats.prank(pauser); eigenPodManagerMock.pause(1 << PAUSED_NON_PROOF_WITHDRAWALS); @@ -580,7 +595,7 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { } function test_recoverTokens_revert_invalidLengths() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); address podOwner = pod.podOwner(); @@ -597,7 +612,7 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { } function test_recoverTokens() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); address podOwner = pod.podOwner(); @@ -621,14 +636,17 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { } contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, ProofParsing { - - /******************************************************************************* - verifyWithdrawalCredentials() tests - *******************************************************************************/ + /** + * + * verifyWithdrawalCredentials() tests + * + */ /// @notice revert when verify wc is not called by pod owner - function testFuzz_revert_callerIsNotPodOwnerOrProofSubmitter(address invalidCaller) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + function testFuzz_revert_callerIsNotPodOwnerOrProofSubmitter( + address invalidCaller + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); @@ -638,9 +656,7 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro cheats.assume(invalidCaller != podOwner && invalidCaller != proofSubmitter); cheats.prank(invalidCaller); - cheats.expectRevert( - "EigenPod.onlyOwnerOrProofSubmitter: caller is not pod owner or proof submitter" - ); + cheats.expectRevert("EigenPod.onlyOwnerOrProofSubmitter: caller is not pod owner or proof submitter"); pod.verifyWithdrawalCredentials({ beaconTimestamp: proofs.beaconTimestamp, @@ -653,7 +669,7 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro /// @notice test verify wc reverts when paused function test_revert_verifyWithdrawalCredentialsPaused() public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: 0 }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); (uint40[] memory validators,) = staker.startValidators(); cheats.prank(pauser); @@ -664,9 +680,11 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice beaconTimestamp must be after the current checkpoint - function testFuzz_revert_beaconTimestampInvalid(uint256 rand) public { + function testFuzz_revert_beaconTimestampInvalid( + uint256 rand + ) public { cheats.warp(10 days); - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); // Ensure we have more than one validator (_newEigenPodStaker allocates a nonzero amt of eth) cheats.deal(address(staker), address(staker).balance + 32 ether); (uint40[] memory validators,) = staker.startValidators(); @@ -684,8 +702,10 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice Check for revert on input array mismatch lengths - function testFuzz_revert_inputArrayLengthsMismatch(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_inputArrayLengthsMismatch( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); @@ -726,8 +746,10 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice Check beaconStateRootProof reverts on invalid length or invalid proof - function testFuzz_revert_beaconStateRootProofInvalid(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_beaconStateRootProofInvalid( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); @@ -738,7 +760,6 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro proof: proofWithInvalidLength }); - cheats.startPrank(address(staker)); cheats.expectRevert("BeaconChainProofs.verifyStateRoot: Proof has incorrect length"); pod.verifyWithdrawalCredentials({ @@ -767,8 +788,10 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro /// @notice attempt to verify validator credentials in both ACTIVE and WITHDRAWN states /// check reverts - function testFuzz_revert_validatorsWithdrawn(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_validatorsWithdrawn( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -794,25 +817,25 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro /// @notice attempt to verify validator credentials after they have exited /// check reverts - function testFuzz_revert_validatorsExited(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_validatorsExited( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); - + // Exit validators from beacon chain and withdraw to pod staker.exitValidators(validators); beaconChain.advanceEpoch(); // now that validators are exited, ensure we can't verify them - cheats.expectRevert( - "EigenPod._verifyWithdrawalCredentials: validator must not be exiting" - ); + cheats.expectRevert("EigenPod._verifyWithdrawalCredentials: validator must not be exiting"); staker.verifyWithdrawalCredentials(validators); } /// @notice modify withdrawal credentials to cause a revert function testFuzz_revert_invalidWithdrawalAddress(uint256 rand, bytes32 invalidWithdrawalCredentials) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); - (uint40[] memory validators, ) = staker.startValidators(); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); + (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); @@ -833,15 +856,17 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice modify validator field length to cause a revert - function testFuzz_revert_invalidValidatorFields(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); - (uint40[] memory validators, ) = staker.startValidators(); + function testFuzz_revert_invalidValidatorFields( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); + (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); // change validator field length to invalid value bytes32[] memory invalidValidatorFields = new bytes32[](BeaconChainProofs.VALIDATOR_FIELDS_LENGTH + 1); - for (uint i = 0; i < BeaconChainProofs.VALIDATOR_FIELDS_LENGTH; i++) { + for (uint256 i = 0; i < BeaconChainProofs.VALIDATOR_FIELDS_LENGTH; i++) { invalidValidatorFields[i] = proofs.validatorFields[0][i]; } proofs.validatorFields[0] = invalidValidatorFields; @@ -859,14 +884,16 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice modify validator activation epoch to cause a revert - function testFuzz_revert_activationEpochNotSet(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); - (uint40[] memory validators, ) = staker.startValidators(); + function testFuzz_revert_activationEpochNotSet( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); + (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); - - proofs.validatorFields[0][BeaconChainProofs.VALIDATOR_ACTIVATION_EPOCH_INDEX] - = _toLittleEndianUint64(BeaconChainProofs.FAR_FUTURE_EPOCH); + + proofs.validatorFields[0][BeaconChainProofs.VALIDATOR_ACTIVATION_EPOCH_INDEX] = + _toLittleEndianUint64(BeaconChainProofs.FAR_FUTURE_EPOCH); cheats.startPrank(address(staker)); cheats.expectRevert("EigenPod._verifyWithdrawalCredentials: validator must be in the process of activating"); @@ -881,9 +908,11 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice modify validator proof length to cause a revert - function testFuzz_revert_invalidValidatorProofLength(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); - (uint40[] memory validators, ) = staker.startValidators(); + function testFuzz_revert_invalidValidatorProofLength( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); + (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); @@ -904,8 +933,8 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro /// @notice modify validator pubkey to cause a revert function testFuzz_revert_invalidValidatorProof(uint256 rand, bytes32 randPubkey) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); - (uint40[] memory validators, ) = staker.startValidators(); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); + (uint40[] memory validators,) = staker.startValidators(); EigenPod pod = staker.pod(); CredentialProofs memory proofs = beaconChain.getCredentialProofs(validators); @@ -926,10 +955,12 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } /// @notice fuzz test a eigenPod with multiple validators. Using timemachine to assert values over time - function testFuzz_verifyWithdrawalCredentials(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_verifyWithdrawalCredentials( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); - (uint40[] memory validators, ) = staker.startValidators(); + (uint40[] memory validators,) = staker.startValidators(); // Complete a quick empty checkpoint so we have a nonzero value for `lastCheckpointedAt` staker.startCheckpoint(); beaconChain.advanceEpoch_NoRewards(); @@ -941,9 +972,7 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro emit ValidatorRestaked(validators[i]); cheats.expectEmit(true, true, true, true, address(pod)); emit ValidatorBalanceUpdated( - validators[i], - pod.lastCheckpointTimestamp(), - beaconChain.effectiveBalance(validators[i]) + validators[i], pod.lastCheckpointTimestamp(), beaconChain.effectiveBalance(validators[i]) ); } // staker.verifyWithdrawalCredentials(validators); @@ -956,33 +985,42 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro validatorFieldsProofs: proofs.validatorFieldsProofs, validatorFields: proofs.validatorFields }); - assert_Snap_Added_ActiveValidatorCount(staker, validators.length, "staker should have increased active validator count"); + assert_Snap_Added_ActiveValidatorCount( + staker, validators.length, "staker should have increased active validator count" + ); assert_Snap_Added_ActiveValidators(staker, validators, "validators should each be active"); // Check ValidatorInfo values for each validator - for (uint i = 0; i < validators.length; i++) { + for (uint256 i = 0; i < validators.length; i++) { bytes32 pubkeyHash = beaconChain.pubkeyHash(validators[i]); bytes memory pubkey = beaconChain.pubkey(validators[i]); IEigenPod.ValidatorInfo memory info = pod.validatorPubkeyHashToInfo(pubkeyHash); IEigenPod.ValidatorInfo memory pkInfo = pod.validatorPubkeyToInfo(pubkey); - assertTrue(pod.validatorStatus(pubkey) == IEigenPod.VALIDATOR_STATUS.ACTIVE, "validator status should be active"); + assertTrue( + pod.validatorStatus(pubkey) == IEigenPod.VALIDATOR_STATUS.ACTIVE, "validator status should be active" + ); assertEq(keccak256(abi.encode(info)), keccak256(abi.encode(pkInfo)), "validator info should be identical"); assertEq(info.validatorIndex, validators[i], "should have assigned correct validator index"); - assertEq(info.restakedBalanceGwei, beaconChain.effectiveBalance(validators[i]), "should have restaked full effective balance"); + assertEq( + info.restakedBalanceGwei, + beaconChain.effectiveBalance(validators[i]), + "should have restaked full effective balance" + ); assertEq(info.lastCheckpointedAt, pod.lastCheckpointTimestamp(), "should have recorded correct update time"); } } } contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { - - /******************************************************************************* - startCheckpoint() tests - *******************************************************************************/ + /** + * + * startCheckpoint() tests + * + */ /// @notice revert when startCheckpoint is not called by pod owner function testFuzz_revert_callerIsNotPodOwnerOrProofSubmitter(uint256 rand, address invalidCaller) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -992,15 +1030,15 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { cheats.assume(invalidCaller != podOwner && invalidCaller != proofSubmitter); cheats.prank(invalidCaller); - cheats.expectRevert( - "EigenPod.onlyOwnerOrProofSubmitter: caller is not pod owner or proof submitter" - ); - pod.startCheckpoint({ revertIfNoBalance: false }); + cheats.expectRevert("EigenPod.onlyOwnerOrProofSubmitter: caller is not pod owner or proof submitter"); + pod.startCheckpoint({revertIfNoBalance: false}); } /// @notice test startCheckpoint reverts when paused - function testFuzz_revert_startCheckpointPaused(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_startCheckpointPaused( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); staker.startValidators(); @@ -1012,8 +1050,10 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { } /// @notice startCheckpoint should revert if another checkpoint already in progress - function testFuzz_revert_checkpointAlreadyStarted(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_checkpointAlreadyStarted( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -1023,8 +1063,10 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { } /// @notice startCheckpoint should revert if a checkpoint has already been completed this block - function testFuzz_revert_checkpointTwicePerBlock(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_checkpointTwicePerBlock( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -1036,8 +1078,10 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { } /// @notice if no rewards and revertIfNoBalance is set, startCheckpoint should revert - function testFuzz_revert_revertIfNoBalanceIsSet(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_revertIfNoBalanceIsSet( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -1046,189 +1090,181 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { cheats.prank(pod.podOwner()); cheats.expectRevert("EigenPod._startCheckpoint: no balance available to checkpoint"); - pod.startCheckpoint({ revertIfNoBalance: true }); + pod.startCheckpoint({revertIfNoBalance: true}); } /// @notice fuzz test an eigenpod with multiple validators and starting a checkpoint - function testFuzz_startCheckpoint(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_startCheckpoint( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); cheats.expectEmit(true, true, true, true, address(staker.pod())); - emit CheckpointCreated(uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length); + emit CheckpointCreated( + uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length + ); staker.startCheckpoint(); check_StartCheckpoint_State(staker); - assertEq(pod.currentCheckpoint().proofsRemaining, uint24(validators.length), "should have one proof remaining pre verified validator"); + assertEq( + pod.currentCheckpoint().proofsRemaining, + uint24(validators.length), + "should have one proof remaining pre verified validator" + ); } /// @notice fuzz test an eigenpod with multiple validators and starting a checkpoint - function testFuzz_startCheckpoint_AsProofSubmitter(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_startCheckpoint_AsProofSubmitter( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); cheats.expectEmit(true, true, true, true, address(staker.pod())); - emit CheckpointCreated(uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length); + emit CheckpointCreated( + uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length + ); cheats.prank(pod.proofSubmitter()); pod.startCheckpoint(false); check_StartCheckpoint_State(staker); - assertEq(pod.currentCheckpoint().proofsRemaining, uint24(validators.length), "should have one proof remaining pre verified validator"); + assertEq( + pod.currentCheckpoint().proofsRemaining, + uint24(validators.length), + "should have one proof remaining pre verified validator" + ); } } contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { - - /******************************************************************************* - verifyCheckpointProofs() tests - *******************************************************************************/ + /** + * + * verifyCheckpointProofs() tests + * + */ /// @notice test verifyCheckpointProofs reverts when paused - function testFuzz_revert_verifyCheckpointProofsPaused(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_verifyCheckpointProofsPaused( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); cheats.prank(pauser); eigenPodManagerMock.pause(2 ** PAUSED_EIGENPODS_VERIFY_CHECKPOINT_PROOFS); cheats.expectRevert("EigenPod.onlyWhenNotPaused: index is paused in EigenPodManager"); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice verifyCheckpointProofs should revert if checkpoint not in progress - function testFuzz_revert_checkpointNotStarted(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_checkpointNotStarted( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); - cheats.expectRevert( - "EigenPod.verifyCheckpointProofs: must have active checkpoint to perform checkpoint proof" - ); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); + cheats.expectRevert("EigenPod.verifyCheckpointProofs: must have active checkpoint to perform checkpoint proof"); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice invalid proof length should revert - function testFuzz_revert_verifyBalanceContainerInvalidLengths(uint256 rand) public { + function testFuzz_revert_verifyBalanceContainerInvalidLengths( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); beaconChain.advanceEpoch(); staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // change the length of balanceContainerProof to cause a revert proofs.balanceContainerProof.proof = new bytes(proofs.balanceContainerProof.proof.length + 1); cheats.expectRevert("BeaconChainProofs.verifyBalanceContainer: Proof has incorrect length"); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice change one of the bytes in the balanceContainer proof to cause a revert - function testFuzz_revert_verifyBalanceContainerInvalidProof(uint256 rand) public { + function testFuzz_revert_verifyBalanceContainerInvalidProof( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); beaconChain.advanceEpoch(); staker.startCheckpoint(); - - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // randomly change one of the bytes in the proof to make the proof invalid bytes1 randValue = bytes1(keccak256(abi.encodePacked(proofs.balanceContainerProof.proof[0]))); proofs.balanceContainerProof.proof[0] = randValue; cheats.expectRevert("BeaconChainProofs.verifyBalanceContainer: invalid balance container proof"); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice invalid balance proof length should revert - function testFuzz_revert_verifyValidatorBalanceInvalidLength(uint256 rand) public { + function testFuzz_revert_verifyValidatorBalanceInvalidLength( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); beaconChain.advanceEpoch(); staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // change the length of balance proof to cause a revert proofs.balanceProofs[0].proof = new bytes(proofs.balanceProofs[0].proof.length + 1); cheats.expectRevert("BeaconChainProofs.verifyValidatorBalance: Proof has incorrect length"); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice change one of the bytes in one of the balance proofs to cause a revert - function testFuzz_revert_verifyValidatorBalanceInvalidProof(uint256 rand) public { + function testFuzz_revert_verifyValidatorBalanceInvalidProof( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); beaconChain.advanceEpoch(); staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // randomly change one of the bytes in the first proof to make the proof invalid bytes1 randValue = bytes1(keccak256(abi.encodePacked(proofs.balanceProofs[0].proof[0]))); proofs.balanceProofs[0].proof[0] = randValue; cheats.expectRevert("BeaconChainProofs.verifyValidatorBalance: Invalid merkle proof"); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } /// @notice test that verifyCheckpointProofs skips proofs submitted for non-ACTIVE validators - function testFuzz_verifyCheckpointProofs_skipIfNotActive(uint256 rand) public { + function testFuzz_verifyCheckpointProofs_skipIfNotActive( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); // Ensure we have more than one validator (_newEigenPodStaker allocates a nonzero amt of eth) cheats.deal(address(staker), address(staker).balance + 32 ether); EigenPod pod = staker.pod(); @@ -1244,20 +1280,19 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - exitedValidator, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = + beaconChain.getCheckpointProofs(exitedValidator, pod.currentCheckpointTimestamp()); // verify checkpoint proof for one exited validator // manually create a snapshot here for Snap checks timeMachine.createSnapshot(); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); assertEq(0, pod.withdrawableRestakedExecutionLayerGwei(), "should not have updated withdrawable balance"); - assertEq(pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should have decreased proofs remaining by 1"); + assertEq( + pod.currentCheckpoint().proofsRemaining, + validators.length - 1, + "should have decreased proofs remaining by 1" + ); assert_Snap_Removed_ActiveValidatorCount(staker, 1, "should have removed one validator from active set"); assert_Snap_Removed_ActiveValidators(staker, exitedValidator, "should have set validator status to WITHDRAWN"); @@ -1265,40 +1300,35 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { // the call should succeed, but nothing should happen // manually create a snapshot here for Snap checks timeMachine.createSnapshot(); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); assertEq(0, pod.withdrawableRestakedExecutionLayerGwei(), "should not have updated withdrawable balance"); - assertEq(pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should not have decreased proofs remaining"); + assertEq( + pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should not have decreased proofs remaining" + ); assert_Snap_Unchanged_ActiveValidatorCount(staker, "should have the same active validator count"); // finally, finish the checkpoint by submitting all proofs - proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // manually create a snapshot here for Snap checks timeMachine.createSnapshot(); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); - assert_Snap_Unchanged_ActiveValidatorCount(staker, "should have the same active validator count after completing checkpoint"); - assertEq(exitedBalanceGwei, pod.withdrawableRestakedExecutionLayerGwei(), "exited balance should now be withdrawable"); + assert_Snap_Unchanged_ActiveValidatorCount( + staker, "should have the same active validator count after completing checkpoint" + ); assertEq( - pod.currentCheckpointTimestamp(), - 0, - "checkpoint should be complete" + exitedBalanceGwei, pod.withdrawableRestakedExecutionLayerGwei(), "exited balance should now be withdrawable" ); + assertEq(pod.currentCheckpointTimestamp(), 0, "checkpoint should be complete"); } /// @notice test that verifyCheckpointProofs skips duplicate checkpoint proofs - function testFuzz_verifyCheckpointProofs_skipIfAlreadyProven(uint256 rand) public { + function testFuzz_verifyCheckpointProofs_skipIfAlreadyProven( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); // Ensure we have more than one validator (_newEigenPodStaker allocates a nonzero amt of eth) cheats.deal(address(staker), address(staker).balance + 32 ether); EigenPod pod = staker.pod(); @@ -1313,55 +1343,49 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - singleValidator, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = + beaconChain.getCheckpointProofs(singleValidator, pod.currentCheckpointTimestamp()); // verify checkpoint proof for one validator - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); - assertEq(pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should have decreased proofs remaining by 1"); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); + assertEq( + pod.currentCheckpoint().proofsRemaining, + validators.length - 1, + "should have decreased proofs remaining by 1" + ); // attempt to submit the same proof and ensure that checkpoint did not progress // the call should succeed, but nothing should happen - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); - assertEq(pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should not have decreased proofs remaining"); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); + assertEq( + pod.currentCheckpoint().proofsRemaining, validators.length - 1, "should not have decreased proofs remaining" + ); // finally, finish the checkpoint by submitting all proofs - proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); - assertEq( - pod.currentCheckpointTimestamp(), - 0, - "checkpoint should be complete" - ); + assertEq(pod.currentCheckpointTimestamp(), 0, "checkpoint should be complete"); // Check ValidatorInfo values for each validator - for (uint i = 0; i < validators.length; i++) { + for (uint256 i = 0; i < validators.length; i++) { bytes32 pubkeyHash = beaconChain.pubkeyHash(validators[i]); IEigenPod.ValidatorInfo memory info = pod.validatorPubkeyHashToInfo(pubkeyHash); - assertEq(info.restakedBalanceGwei, beaconChain.currentBalance(validators[i]), "should have restaked full current balance"); + assertEq( + info.restakedBalanceGwei, + beaconChain.currentBalance(validators[i]), + "should have restaked full current balance" + ); assertEq(info.lastCheckpointedAt, pod.lastCheckpointTimestamp(), "should have recorded correct update time"); } } /// @notice test that verifyCheckpointProofs sets validators to WITHDRAWN if they are exited - function testFuzz_verifyCheckpointProofs_validatorExits(uint256 rand) public { + function testFuzz_verifyCheckpointProofs_validatorExits( + uint256 rand + ) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -1372,27 +1396,19 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // Verify checkpoint proofs emit the expected values _expectEventsVerifyCheckpointProofs(staker, validators, proofs.balanceProofs); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); + assertEq(pod.currentCheckpointTimestamp(), 0, "checkpoint should be complete"); + assertEq( - pod.currentCheckpointTimestamp(), - 0, - "checkpoint should be complete" + pod.withdrawableRestakedExecutionLayerGwei(), exitedBalanceGwei, "exited balance should be withdrawable" ); - assertEq(pod.withdrawableRestakedExecutionLayerGwei(), exitedBalanceGwei, "exited balance should be withdrawable"); - // Check ValidatorInfo values for each validator - for (uint i = 0; i < validators.length; i++) { + for (uint256 i = 0; i < validators.length; i++) { bytes32 pubkeyHash = beaconChain.pubkeyHash(validators[i]); IEigenPod.ValidatorInfo memory info = pod.validatorPubkeyHashToInfo(pubkeyHash); @@ -1405,7 +1421,7 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { /// @notice fuzz test an eigenPod with multiple validators and verifyCheckpointProofs function testFuzz_verifyCheckpointProofs(uint256 rand, bool epochRewards) public { // Setup verifyCheckpointProofs - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); staker.verifyWithdrawalCredentials(validators); @@ -1416,30 +1432,22 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { } staker.startCheckpoint(); - CheckpointProofs memory proofs = beaconChain.getCheckpointProofs( - validators, - pod.currentCheckpointTimestamp() - ); + CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); // Verify checkpoint proofs emit the expected values _expectEventsVerifyCheckpointProofs(staker, validators, proofs.balanceProofs); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); - assertEq( - pod.currentCheckpointTimestamp(), - 0, - "checkpoint should be complete" - ); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); + assertEq(pod.currentCheckpointTimestamp(), 0, "checkpoint should be complete"); } } /// @notice TODO contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { /// @notice test verifyStaleBalance reverts when paused - function testFuzz_revert_verifyStaleBalancePaused(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_verifyStaleBalancePaused( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validators[0]); @@ -1455,8 +1463,10 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { } /// @notice test verifyStaleBalance reverts when paused via the PAUSED_START_CHECKPOINT flag - function testFuzz_revert_verifyStaleBalancePausedViaStartCheckpoint(uint256 rand) public { - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + function testFuzz_revert_verifyStaleBalancePausedViaStartCheckpoint( + uint256 rand + ) public { + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validators[0]); @@ -1472,9 +1482,11 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { } /// @notice verifyStaleBalance should revert if validator balance too stale - function testFuzz_revert_validatorBalanceNotStale(uint256 rand) public { + function testFuzz_revert_validatorBalanceNotStale( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1497,9 +1509,11 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { /// @notice checks staleness condition when a pod has never completed a checkpoint before /// The only value that will result in a revert here is `beaconTimestamp == 0` - function testFuzz_revert_validatorBalanceNotStale_NeverCheckpointed(uint256 rand) public { + function testFuzz_revert_validatorBalanceNotStale_NeverCheckpointed( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1509,17 +1523,15 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { // proof for given beaconTimestamp is not yet stale, this should revert StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validator); cheats.expectRevert("EigenPod.verifyStaleBalance: proof is older than last checkpoint"); - pod.verifyStaleBalance({ - beaconTimestamp: 0, - stateRootProof: proofs.stateRootProof, - proof: proofs.validatorProof - }); + pod.verifyStaleBalance({beaconTimestamp: 0, stateRootProof: proofs.stateRootProof, proof: proofs.validatorProof}); } /// @notice verifyStaleBalance should revert if validator status is not ACTIVE - function testFuzz_revert_validatorStatusNotActive(uint256 rand) public { + function testFuzz_revert_validatorStatusNotActive( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1538,9 +1550,11 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { } /// @notice verifyStaleBalance should revert if validator is not slashed - function testFuzz_revert_validatorNotSlashed(uint256 rand) public { + function testFuzz_revert_validatorNotSlashed( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1559,10 +1573,12 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { }); } - /// @notice verifyStaleBalance should revert with invalid beaconStateRoot proof length - function testFuzz_revert_beaconStateRootProofInvalidLength(uint256 rand) public { + /// @notice verifyStaleBalance should revert with invalid beaconStateRoot proof length + function testFuzz_revert_beaconStateRootProofInvalidLength( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1589,9 +1605,11 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { } /// @notice verifyStaleBalance should revert with invalid beaconStateRoot proof - function testFuzz_revert_beaconStateRootProofInvalid(uint256 rand) public { + function testFuzz_revert_beaconStateRootProofInvalid( + uint256 rand + ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1621,7 +1639,7 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { uint256 rand ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1662,12 +1680,9 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { } /// @notice verifyStaleBalance should revert with invalid validatorContainer proof - function testFuzz_revert_validatorContainerProofInvalid( - uint256 rand, - bytes32 randWithdrawalCredentials - ) public { + function testFuzz_revert_validatorContainerProofInvalid(uint256 rand, bytes32 randWithdrawalCredentials) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1694,7 +1709,7 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { uint256 rand ) public { // setup eigenpod staker and validators - (EigenPodUser staker,) = _newEigenPodStaker({ rand: rand }); + (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); EigenPod pod = staker.pod(); (uint40[] memory validators,) = staker.startValidators(); uint40 validator = validators[0]; @@ -1706,7 +1721,9 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validator); cheats.expectEmit(true, true, true, true, address(staker.pod())); - emit CheckpointCreated(uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length); + emit CheckpointCreated( + uint64(block.timestamp), EIP_4788_ORACLE.timestampToBlockRoot(block.timestamp), validators.length + ); pod.verifyStaleBalance({ beaconTimestamp: proofs.beaconTimestamp, stateRootProof: proofs.stateRootProof, @@ -1725,16 +1742,12 @@ contract EigenPodHarnessSetup is EigenPodUnitTests { EigenPodUnitTests.setUp(); // Deploy EP Harness - eigenPodHarnessImplementation = new EigenPodHarness( - ethPOSDepositMock, - eigenPodManagerMock, - GENESIS_TIME_LOCAL - ); + eigenPodHarnessImplementation = new EigenPodHarness(ethPOSDepositMock, eigenPodManagerMock, GENESIS_TIME_LOCAL); // Upgrade eigenPod to harness UpgradeableBeacon(address(eigenPodBeacon)).upgradeTo(address(eigenPodHarnessImplementation)); eigenPodHarness = EigenPodHarness(payable(eigenPod)); - } + } } /// @notice No unit tests as of now but would be good to add specific unit tests using proofs from our proofGen library @@ -1750,9 +1763,13 @@ contract EigenPodUnitTests_proofParsingTests is EigenPodHarnessSetup, ProofParsi bytes validatorFieldsProof; bytes32[] validatorFields; - function _assertWithdrawalCredentialsSet(uint256 restakedBalanceGwei) internal { + function _assertWithdrawalCredentialsSet( + uint256 restakedBalanceGwei + ) internal { IEigenPod.ValidatorInfo memory validatorInfo = eigenPodHarness.validatorPubkeyHashToInfo(validatorFields[0]); - assertEq(uint8(validatorInfo.status), uint8(IEigenPod.VALIDATOR_STATUS.ACTIVE), "Validator status should be active"); + assertEq( + uint8(validatorInfo.status), uint8(IEigenPod.VALIDATOR_STATUS.ACTIVE), "Validator status should be active" + ); assertEq(validatorInfo.validatorIndex, validatorIndex, "Validator index incorrectly set"); assertEq(validatorInfo.lastCheckpointedAt, oracleTimestamp, "Last checkpointed at timestamp incorrectly set"); assertEq(validatorInfo.restakedBalanceGwei, restakedBalanceGwei, "Restaked balance gwei not set correctly"); @@ -1785,10 +1802,7 @@ contract EigenPodUnitTests_proofParsingTests is EigenPodHarnessSetup, ProofParsi oracleTimestamp = uint64(block.timestamp); eigenPodHarness.verifyWithdrawalCredentials( - beaconStateRoot, - validatorIndex, - validatorFieldsProof, - validatorFields + beaconStateRoot, validatorIndex, validatorFieldsProof, validatorFields ); _; } diff --git a/src/test/unit/PausableUnit.t.sol b/src/test/unit/PausableUnit.t.sol index c8f03aa92..2ca935738 100644 --- a/src/test/unit/PausableUnit.t.sol +++ b/src/test/unit/PausableUnit.t.sol @@ -7,7 +7,6 @@ import "../../contracts/permissions/PauserRegistry.sol"; import "../harnesses/PausableHarness.sol"; contract PausableUnitTests is Test { - Vm cheats = Vm(HEVM_ADDRESS); PauserRegistry public pauserRegistry; @@ -25,7 +24,7 @@ contract PausableUnitTests is Test { /// @notice Emitted when the pause is lifted by `account`, and changed to `newPausedStatus`. event Unpaused(address indexed account, uint256 newPausedStatus); - function setUp() virtual public { + function setUp() public virtual { address[] memory pausers = new address[](1); pausers[0] = pauser; pauserRegistry = new PauserRegistry(pausers, unpauser); @@ -38,7 +37,9 @@ contract PausableUnitTests is Test { pausable.initializePauser(PauserRegistry(_pauserRegistry), _initPausedStatus); } - function testCannotInitializeWithZeroAddress(uint256 _initPausedStatus) public { + function testCannotInitializeWithZeroAddress( + uint256 _initPausedStatus + ) public { address _pauserRegistry = address(0); pausable = new PausableHarness(); cheats.expectRevert(bytes("Pausable._initializePauser: _initializePauser() can only be called once")); @@ -75,7 +76,9 @@ contract PausableUnitTests is Test { cheats.stopPrank(); } - function testPauseAll(uint256 previousPausedStatus) public { + function testPauseAll( + uint256 previousPausedStatus + ) public { cheats.startPrank(pauser); cheats.expectEmit(true, true, true, true, address(pausable)); emit Paused(pauser, previousPausedStatus); @@ -93,7 +96,9 @@ contract PausableUnitTests is Test { require(pausable.paused() == type(uint256).max, "newPausedStatus not set correctly"); } - function testPauseAll_RevertsWhenCalledByNotPauser(address notPauser) public { + function testPauseAll_RevertsWhenCalledByNotPauser( + address notPauser + ) public { cheats.assume(notPauser != pauser); cheats.startPrank(notPauser); @@ -156,7 +161,6 @@ contract PausableUnitTests is Test { cheats.stopPrank(); } - function testUnpause_RevertsWhenTryingToPause(uint256 previousPausedStatus, uint256 newPausedStatus) public { // filter to only fuzzed inputs which would (improperly) flip any bits to '1'. cheats.assume(~previousPausedStatus & ~newPausedStatus != ~previousPausedStatus); @@ -172,5 +176,4 @@ contract PausableUnitTests is Test { pausable.unpause(newPausedStatus); cheats.stopPrank(); } - } diff --git a/src/test/unit/PauserRegistryUnit.t.sol b/src/test/unit/PauserRegistryUnit.t.sol index 802c228e8..da0ada46c 100644 --- a/src/test/unit/PauserRegistryUnit.t.sol +++ b/src/test/unit/PauserRegistryUnit.t.sol @@ -6,7 +6,6 @@ import "forge-std/Test.sol"; import "../../contracts/permissions/PauserRegistry.sol"; contract PauserRegistryUnitTests is Test { - Vm cheats = Vm(HEVM_ADDRESS); PauserRegistry public pauserRegistry; @@ -20,13 +19,15 @@ contract PauserRegistryUnitTests is Test { event UnpauserChanged(address previousUnpauser, address newUnpauser); - function setUp() virtual public { + function setUp() public virtual { address[] memory pausers = new address[](1); pausers[0] = pauser; pauserRegistry = new PauserRegistry(pausers, unpauser); } - function testSetIsPauserTrue(address newPauser) public { + function testSetIsPauserTrue( + address newPauser + ) public { cheats.assume(newPauser != address(0)); cheats.startPrank(pauserRegistry.unpauser()); @@ -48,7 +49,9 @@ contract PauserRegistryUnitTests is Test { require(!pauserRegistry.isPauser(pauser), "pauser not set correctly"); } - function testSetUnpauser(address newUnpauser) public { + function testSetUnpauser( + address newUnpauser + ) public { cheats.assume(newUnpauser != address(0)); cheats.startPrank(pauserRegistry.unpauser()); diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index 0e3d32df2..cb88e07c1 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -53,7 +53,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin /// @notice Upper bound start range is ~1 month into the future, multiple of CALCULATION_INTERVAL_SECONDS uint32 MAX_FUTURE_LENGTH = 28 days; /// @notice absolute min timestamp that a rewards can start at - uint32 GENESIS_REWARDS_TIMESTAMP = 1712188800; + uint32 GENESIS_REWARDS_TIMESTAMP = 1_712_188_800; /// @notice Delay in timestamp before a posted root can be claimed against uint32 activationDelay = 7 days; @@ -204,7 +204,11 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin return timestamp1 > timestamp2 ? timestamp1 : timestamp2; } - function _assertRewardsClaimedEvents(bytes32 root, IRewardsCoordinator.RewardsMerkleClaim memory claim, address recipient) internal { + function _assertRewardsClaimedEvents( + bytes32 root, + IRewardsCoordinator.RewardsMerkleClaim memory claim, + address recipient + ) internal { address earner = claim.earnerLeaf.earner; address claimer = rewardsCoordinator.claimerFor(earner); if (claimer == address(0)) { @@ -218,12 +222,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsClaimed( - root, - earner, - claimer, - recipient, - token, - claim.tokenLeaves[i].cumulativeEarnings - claimedAmount + root, earner, claimer, recipient, token, claim.tokenLeaves[i].cumulativeEarnings - claimedAmount ); } } @@ -269,7 +268,9 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin } /// @dev Sort to ensure that the array is in ascending order for strategies - function _sortArrayAsc(IStrategy[] memory arr) internal pure returns (IStrategy[] memory) { + function _sortArrayAsc( + IStrategy[] memory arr + ) internal pure returns (IStrategy[] memory) { uint256 l = arr.length; for (uint256 i = 0; i < l; i++) { for (uint256 j = i + 1; j < l; j++) { @@ -294,7 +295,9 @@ contract RewardsCoordinatorUnitTests_initializeAndSetters is RewardsCoordinatorU cheats.stopPrank(); } - function testFuzz_setActivationDelay(uint32 activationDelay) public { + function testFuzz_setActivationDelay( + uint32 activationDelay + ) public { cheats.startPrank(rewardsCoordinator.owner()); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit ActivationDelaySet(rewardsCoordinator.activationDelay(), activationDelay); @@ -313,7 +316,9 @@ contract RewardsCoordinatorUnitTests_initializeAndSetters is RewardsCoordinatorU rewardsCoordinator.setActivationDelay(activationDelay); } - function testFuzz_setGlobalOperatorCommission(uint16 globalCommissionBips) public { + function testFuzz_setGlobalOperatorCommission( + uint16 globalCommissionBips + ) public { cheats.startPrank(rewardsCoordinator.owner()); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit GlobalCommissionBipsSet(rewardsCoordinator.globalOperatorCommissionBips(), globalCommissionBips); @@ -336,7 +341,9 @@ contract RewardsCoordinatorUnitTests_initializeAndSetters is RewardsCoordinatorU rewardsCoordinator.setGlobalOperatorCommission(globalCommissionBips); } - function testFuzz_setRewardsUpdater(address newRewardsUpdater) public { + function testFuzz_setRewardsUpdater( + address newRewardsUpdater + ) public { cheats.startPrank(rewardsCoordinator.owner()); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsUpdaterSet(rewardsCoordinator.rewardsUpdater(), newRewardsUpdater); @@ -360,11 +367,7 @@ contract RewardsCoordinatorUnitTests_initializeAndSetters is RewardsCoordinatorU cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsForAllSubmitterSet(submitter, rewardsCoordinator.isRewardsForAllSubmitter(submitter), newValue); rewardsCoordinator.setRewardsForAllSubmitter(submitter, newValue); - assertEq( - newValue, - rewardsCoordinator.isRewardsForAllSubmitter(submitter), - "isRewardsForAllSubmitter not set" - ); + assertEq(newValue, rewardsCoordinator.isRewardsForAllSubmitter(submitter), "isRewardsForAllSubmitter not set"); cheats.stopPrank(); } @@ -392,8 +395,10 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi } // Revert from reentrancy - function test_Revert_WhenReentrancy(uint256 amount) public { - amount = bound(amount, 1, 1e38-1); + function test_Revert_WhenReentrancy( + uint256 amount + ) public { + amount = bound(amount, 1, 1e38 - 1); Reenterer reenterer = new Reenterer(); reenterer.prepareReturnData(abi.encode(amount)); @@ -403,7 +408,8 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi _deployMockRewardTokens(address(this), 1); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: IERC20(address(reenterer)), @@ -412,7 +418,8 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration: 0 }); - bytes memory calldataToUse = abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); + bytes memory calldataToUse = + abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); reenterer.prepare(targetToUse, msgValueToUse, calldataToUse, bytes("ReentrancyGuard: reentrant call")); cheats.expectRevert(); @@ -436,15 +443,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); IRewardsCoordinator.StrategyAndMultiplier[] memory emptyStratsAndMultipliers; rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: emptyStratsAndMultipliers, @@ -474,15 +481,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -510,17 +517,17 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); - IRewardsCoordinator.StrategyAndMultiplier[] - memory dupStratsAndMultipliers = new IRewardsCoordinator.StrategyAndMultiplier[](2); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.StrategyAndMultiplier[] memory dupStratsAndMultipliers = + new IRewardsCoordinator.StrategyAndMultiplier[](2); dupStratsAndMultipliers[0] = defaultStrategyAndMultipliers[0]; dupStratsAndMultipliers[1] = defaultStrategyAndMultipliers[0]; rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ @@ -555,15 +562,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = bound(duration, MAX_REWARDS_DURATION + 1, type(uint32).max); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -595,15 +602,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi cheats.assume(duration % CALCULATION_INTERVAL_SECONDS != 0); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -649,7 +656,8 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -687,7 +695,8 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -719,15 +728,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); defaultStrategyAndMultipliers[0].strategy = IStrategy(address(999)); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, @@ -766,15 +775,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -797,7 +806,10 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi rewardsCoordinator.createAVSRewardsSubmission(rewardsSubmissions); cheats.stopPrank(); - assertTrue(rewardsCoordinator.isAVSRewardsSubmissionHash(avs, rewardsSubmissionHash), "rewards submission hash not submitted"); + assertTrue( + rewardsCoordinator.isAVSRewardsSubmissionHash(avs, rewardsSubmissionHash), + "rewards submission hash not submitted" + ); assertEq(currSubmissionNonce + 1, rewardsCoordinator.submissionNonce(avs), "submission nonce not incremented"); assertEq( avsBalanceBefore - amount, @@ -826,16 +838,15 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi cheats.assume(param.avs != address(0)); cheats.prank(rewardsCoordinator.owner()); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](numSubmissions); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](numSubmissions); bytes32[] memory rewardsSubmissionHashes = new bytes32[](numSubmissions); uint256 startSubmissionNonce = rewardsCoordinator.submissionNonce(param.avs); _deployMockRewardTokens(param.avs, numSubmissions); uint256[] memory avsBalancesBefore = _getBalanceForTokens(rewardTokens, param.avs); - uint256[] memory rewardsCoordinatorBalancesBefore = _getBalanceForTokens( - rewardTokens, - address(rewardsCoordinator) - ); + uint256[] memory rewardsCoordinatorBalancesBefore = + _getBalanceForTokens(rewardTokens, address(rewardsCoordinator)); uint256[] memory amounts = new uint256[](numSubmissions); // Create multiple rewards submissions and their expected event @@ -847,9 +858,8 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi param.duration = param.duration - (param.duration % CALCULATION_INTERVAL_SECONDS); param.startTimestamp = bound( param.startTimestamp + i, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); param.startTimestamp = param.startTimestamp - (param.startTimestamp % CALCULATION_INTERVAL_SECONDS); @@ -865,9 +875,12 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi rewardsSubmissions[i] = rewardsSubmission; // 3. expected event emitted for this rewardsSubmission - rewardsSubmissionHashes[i] = keccak256(abi.encode(param.avs, startSubmissionNonce + i, rewardsSubmissions[i])); + rewardsSubmissionHashes[i] = + keccak256(abi.encode(param.avs, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); - emit AVSRewardsSubmissionCreated(param.avs, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i]); + emit AVSRewardsSubmissionCreated( + param.avs, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i] + ); } // 4. call createAVSRewardsSubmission() @@ -912,7 +925,9 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo } // Revert from reentrancy - function test_Revert_WhenReentrancy(uint256 amount) public { + function test_Revert_WhenReentrancy( + uint256 amount + ) public { Reenterer reenterer = new Reenterer(); reenterer.prepareReturnData(abi.encode(amount)); @@ -922,7 +937,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo _deployMockRewardTokens(address(this), 1); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: IERC20(address(reenterer)), @@ -931,7 +947,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo duration: 0 }); - bytes memory calldataToUse = abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); + bytes memory calldataToUse = + abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); reenterer.prepare(targetToUse, msgValueToUse, calldataToUse, bytes("ReentrancyGuard: reentrant call")); cheats.prank(rewardsForAllSubmitter); @@ -956,30 +973,30 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo * - rewards submission hash being set in storage * - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator */ - function testFuzz_createRewardsForAllSubmission_SingleSubmission(uint256 startTimestamp, uint256 duration, uint256 amount) public { + function testFuzz_createRewardsForAllSubmission_SingleSubmission( + uint256 startTimestamp, + uint256 duration, + uint256 amount + ) public { cheats.prank(rewardsCoordinator.owner()); // 1. Bound fuzz inputs to valid ranges and amounts - IERC20 rewardToken = new ERC20PresetFixedSupply( - "dog wif hat", - "MOCK1", - mockTokenInitialSupply, - rewardsForAllSubmitter - ); + IERC20 rewardToken = + new ERC20PresetFixedSupply("dog wif hat", "MOCK1", mockTokenInitialSupply, rewardsForAllSubmitter); amount = bound(amount, 1, mockTokenInitialSupply); duration = bound(duration, 0, MAX_REWARDS_DURATION); duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -995,10 +1012,13 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo cheats.startPrank(rewardsForAllSubmitter); rewardToken.approve(address(rewardsCoordinator), amount); uint256 currSubmissionNonce = rewardsCoordinator.submissionNonce(rewardsForAllSubmitter); - bytes32 rewardsSubmissionHash = keccak256(abi.encode(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissions[0])); + bytes32 rewardsSubmissionHash = + keccak256(abi.encode(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); - emit RewardsSubmissionForAllCreated(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissionHash, rewardsSubmissions[0]); + emit RewardsSubmissionForAllCreated( + rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissionHash, rewardsSubmissions[0] + ); rewardsCoordinator.createRewardsForAllSubmission(rewardsSubmissions); cheats.stopPrank(); @@ -1030,20 +1050,22 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo * - rewards submission hash being set in storage * - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator */ - function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint256 numSubmissions) public { + function testFuzz_createRewardsForAllSubmission_MultipleSubmissions( + FuzzAVSRewardsSubmission memory param, + uint256 numSubmissions + ) public { cheats.assume(2 <= numSubmissions && numSubmissions <= 10); cheats.prank(rewardsCoordinator.owner()); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](numSubmissions); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](numSubmissions); bytes32[] memory rewardsSubmissionHashes = new bytes32[](numSubmissions); uint256 startSubmissionNonce = rewardsCoordinator.submissionNonce(rewardsForAllSubmitter); _deployMockRewardTokens(rewardsForAllSubmitter, numSubmissions); uint256[] memory submitterBalancesBefore = _getBalanceForTokens(rewardTokens, rewardsForAllSubmitter); - uint256[] memory rewardsCoordinatorBalancesBefore = _getBalanceForTokens( - rewardTokens, - address(rewardsCoordinator) - ); + uint256[] memory rewardsCoordinatorBalancesBefore = + _getBalanceForTokens(rewardTokens, address(rewardsCoordinator)); uint256[] memory amounts = new uint256[](numSubmissions); // Create multiple rewards submissions and their expected event @@ -1055,9 +1077,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo param.duration = param.duration - (param.duration % CALCULATION_INTERVAL_SECONDS); param.startTimestamp = bound( param.startTimestamp + i, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); param.startTimestamp = param.startTimestamp - (param.startTimestamp % CALCULATION_INTERVAL_SECONDS); @@ -1073,13 +1094,11 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo rewardsSubmissions[i] = rewardsSubmission; // 3. expected event emitted for this rewardsSubmission - rewardsSubmissionHashes[i] = keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); + rewardsSubmissionHashes[i] = + keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsSubmissionForAllCreated( - rewardsForAllSubmitter, - startSubmissionNonce + i, - rewardsSubmissionHashes[i], - rewardsSubmissions[i] + rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i] ); } @@ -1125,7 +1144,9 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi } // Revert from reentrancy - function test_Revert_WhenReentrancy(uint256 amount) public { + function test_Revert_WhenReentrancy( + uint256 amount + ) public { Reenterer reenterer = new Reenterer(); reenterer.prepareReturnData(abi.encode(amount)); @@ -1135,7 +1156,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi _deployMockRewardTokens(address(this), 1); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: IERC20(address(reenterer)), @@ -1144,7 +1166,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi duration: 0 }); - bytes memory calldataToUse = abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); + bytes memory calldataToUse = + abi.encodeWithSelector(RewardsCoordinator.createAVSRewardsSubmission.selector, rewardsSubmissions); reenterer.prepare(targetToUse, msgValueToUse, calldataToUse, bytes("ReentrancyGuard: reentrant call")); cheats.prank(rewardsForAllSubmitter); @@ -1169,30 +1192,30 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi * - rewards submission hash being set in storage * - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator */ - function testFuzz_createRewardsForAllSubmission_SingleSubmission(uint256 startTimestamp, uint256 duration, uint256 amount) public { + function testFuzz_createRewardsForAllSubmission_SingleSubmission( + uint256 startTimestamp, + uint256 duration, + uint256 amount + ) public { cheats.prank(rewardsCoordinator.owner()); // 1. Bound fuzz inputs to valid ranges and amounts - IERC20 rewardToken = new ERC20PresetFixedSupply( - "dog wif hat", - "MOCK1", - mockTokenInitialSupply, - rewardsForAllSubmitter - ); + IERC20 rewardToken = + new ERC20PresetFixedSupply("dog wif hat", "MOCK1", mockTokenInitialSupply, rewardsForAllSubmitter); amount = bound(amount, 1, mockTokenInitialSupply); duration = bound(duration, 0, MAX_REWARDS_DURATION); duration = duration - (duration % CALCULATION_INTERVAL_SECONDS); startTimestamp = bound( startTimestamp, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS); // 2. Create rewards submission input param - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](1); rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({ strategiesAndMultipliers: defaultStrategyAndMultipliers, token: rewardToken, @@ -1208,10 +1231,13 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi cheats.startPrank(rewardsForAllSubmitter); rewardToken.approve(address(rewardsCoordinator), amount); uint256 currSubmissionNonce = rewardsCoordinator.submissionNonce(rewardsForAllSubmitter); - bytes32 rewardsSubmissionHash = keccak256(abi.encode(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissions[0])); + bytes32 rewardsSubmissionHash = + keccak256(abi.encode(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); - emit RewardsSubmissionForAllEarnersCreated(rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissionHash, rewardsSubmissions[0]); + emit RewardsSubmissionForAllEarnersCreated( + rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissionHash, rewardsSubmissions[0] + ); rewardsCoordinator.createRewardsForAllEarners(rewardsSubmissions); cheats.stopPrank(); @@ -1243,20 +1269,22 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi * - rewards submission hash being set in storage * - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator */ - function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint256 numSubmissions) public { + function testFuzz_createRewardsForAllSubmission_MultipleSubmissions( + FuzzAVSRewardsSubmission memory param, + uint256 numSubmissions + ) public { cheats.assume(2 <= numSubmissions && numSubmissions <= 10); cheats.prank(rewardsCoordinator.owner()); - IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](numSubmissions); + IRewardsCoordinator.RewardsSubmission[] memory rewardsSubmissions = + new IRewardsCoordinator.RewardsSubmission[](numSubmissions); bytes32[] memory rewardsSubmissionHashes = new bytes32[](numSubmissions); uint256 startSubmissionNonce = rewardsCoordinator.submissionNonce(rewardsForAllSubmitter); _deployMockRewardTokens(rewardsForAllSubmitter, numSubmissions); uint256[] memory submitterBalancesBefore = _getBalanceForTokens(rewardTokens, rewardsForAllSubmitter); - uint256[] memory rewardsCoordinatorBalancesBefore = _getBalanceForTokens( - rewardTokens, - address(rewardsCoordinator) - ); + uint256[] memory rewardsCoordinatorBalancesBefore = + _getBalanceForTokens(rewardTokens, address(rewardsCoordinator)); uint256[] memory amounts = new uint256[](numSubmissions); // Create multiple rewards submissions and their expected event @@ -1268,9 +1296,8 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi param.duration = param.duration - (param.duration % CALCULATION_INTERVAL_SECONDS); param.startTimestamp = bound( param.startTimestamp + i, - uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + - CALCULATION_INTERVAL_SECONDS - - 1, + uint256(_maxTimestamp(GENESIS_REWARDS_TIMESTAMP, uint32(block.timestamp) - MAX_RETROACTIVE_LENGTH)) + + CALCULATION_INTERVAL_SECONDS - 1, block.timestamp + uint256(MAX_FUTURE_LENGTH) ); param.startTimestamp = param.startTimestamp - (param.startTimestamp % CALCULATION_INTERVAL_SECONDS); @@ -1286,13 +1313,11 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi rewardsSubmissions[i] = rewardsSubmission; // 3. expected event emitted for this rewardsSubmission - rewardsSubmissionHashes[i] = keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); + rewardsSubmissionHashes[i] = + keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsSubmissionForAllEarnersCreated( - rewardsForAllSubmitter, - startSubmissionNonce + i, - rewardsSubmissionHashes[i], - rewardsSubmissions[i] + rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i] ); } @@ -1309,7 +1334,9 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi for (uint256 i = 0; i < numSubmissions; ++i) { assertTrue( - rewardsCoordinator.isRewardsSubmissionForAllEarnersHash(rewardsForAllSubmitter, rewardsSubmissionHashes[i]), + rewardsCoordinator.isRewardsSubmissionForAllEarnersHash( + rewardsForAllSubmitter, rewardsSubmissionHashes[i] + ), "rewards submission hash not submitted" ); assertEq( @@ -1360,12 +1387,11 @@ contract RewardsCoordinatorUnitTests_submitRoot is RewardsCoordinatorUnitTests { cheats.prank(rewardsUpdater); rewardsCoordinator.submitRoot(root, rewardsCalculationEndTimestamp); - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(expectedRootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(expectedRootIndex); assertEq( - expectedRootIndex, - rewardsCoordinator.getDistributionRootsLength() - 1, - "root not added to roots array" + expectedRootIndex, rewardsCoordinator.getDistributionRootsLength() - 1, "root not added to roots array" ); assertEq( root, @@ -1460,7 +1486,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1509,7 +1536,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[0]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1560,7 +1588,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 1. Claim against first root { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1592,7 +1621,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests claim = claims[1]; { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1624,7 +1654,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests claim = claims[2]; { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1672,10 +1703,11 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests cheats.startPrank(rewardsUpdater); rewardsCoordinator.submitRoot(merkleRoot, 1); uint32 rootIndex = 0; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); rewardsCoordinator.disableRoot(rootIndex); cheats.stopPrank(); - + cheats.warp(distributionRoot.activatedAt); cheats.startPrank(claimer); @@ -1709,7 +1741,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 1. Claim against first root { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1740,7 +1773,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 2. Claim against first root again, expect a revert { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1748,9 +1782,7 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests cheats.startPrank(claimer); assertTrue(rewardsCoordinator.checkClaim(claim), "RewardsCoordinator.checkClaim: claim not valid"); - cheats.expectRevert( - "RewardsCoordinator.processClaim: cumulativeEarnings must be gt than cumulativeClaimed" - ); + cheats.expectRevert("RewardsCoordinator.processClaim: cumulativeEarnings must be gt than cumulativeClaimed"); rewardsCoordinator.processClaim(claim, claimer); cheats.stopPrank(); @@ -1778,7 +1810,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Modify Earnings @@ -1819,7 +1852,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Modify Earner @@ -1858,18 +1892,16 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); assertTrue(rewardsCoordinator.checkClaim(claim), "RewardsCoordinator.checkClaim: claim not valid"); // Set cumulativeClaimed to be max uint256, should revert when attempting to claim - stdstore - .target(address(rewardsCoordinator)) - .sig("cumulativeClaimed(address,address)") - .with_key(claim.earnerLeaf.earner) - .with_key(address(claim.tokenLeaves[0].token)) - .checked_write(type(uint256).max); + stdstore.target(address(rewardsCoordinator)).sig("cumulativeClaimed(address,address)").with_key( + claim.earnerLeaf.earner + ).with_key(address(claim.tokenLeaves[0].token)).checked_write(type(uint256).max); cheats.startPrank(claimer); cheats.expectRevert("RewardsCoordinator.processClaim: cumulativeEarnings must be gt than cumulativeClaimed"); rewardsCoordinator.processClaim(claim, claimer); @@ -1899,7 +1931,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); assertTrue(rewardsCoordinator.checkClaim(claim), "RewardsCoordinator.checkClaim: claim not valid"); @@ -1937,7 +1970,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IRewardsCoordinator.RewardsMerkleClaim memory claim = claims[2]; uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); assertTrue(rewardsCoordinator.checkClaim(claim), "RewardsCoordinator.checkClaim: claim not valid"); @@ -1977,7 +2011,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 1. Claim against first root where earner tree is full tree and earner and token index is last index of that tree height { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -1992,9 +2027,7 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // +1 since earnerIndex is 0-indexed // Here the earnerIndex is 7 in a full binary tree and the number of bytes32 hash proofs is 3 assertEq( - claim.earnerIndex + 1, - (1 << ((claim.earnerTreeProof.length / 32))), - "EarnerIndex not set to max value" + claim.earnerIndex + 1, (1 << ((claim.earnerTreeProof.length / 32))), "EarnerIndex not set to max value" ); // +1 since tokenIndex is 0-indexed // Here the tokenIndex is also 7 in a full binary tree and the number of bytes32 hash proofs is 3 @@ -2042,7 +2075,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 1. Claim against first root where earner tree is full tree and earner and token index is last index of that tree height { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -2055,16 +2089,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests uint256[] memory tokenBalancesBefore = _getClaimTokenBalances(claimer, claim); // Single tokenLeaf in earner's subtree, should be 0 index - assertEq( - claim.tokenIndices[0], - 0, - "TokenIndex should be 0" - ); - assertEq( - claim.tokenTreeProofs[0].length, - 0, - "TokenTreeProof should be empty" - ); + assertEq(claim.tokenIndices[0], 0, "TokenIndex should be 0"); + assertEq(claim.tokenTreeProofs[0].length, 0, "TokenTreeProof should be empty"); _assertRewardsClaimedEvents(distributionRoot.root, claim, claimer); rewardsCoordinator.processClaim(claim, claimer); @@ -2107,7 +2133,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests // 1. Claim against first root where earner tree is full tree and earner and token index is last index of that tree height { uint32 rootIndex = claim.rootIndex; - IRewardsCoordinator.DistributionRoot memory distributionRoot = rewardsCoordinator.getDistributionRootAtIndex(rootIndex); + IRewardsCoordinator.DistributionRoot memory distributionRoot = + rewardsCoordinator.getDistributionRootAtIndex(rootIndex); cheats.warp(distributionRoot.activatedAt); // Claim against root and check balances before/after, and check it matches the difference between @@ -2120,16 +2147,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests uint256[] memory tokenBalancesBefore = _getClaimTokenBalances(claimer, claim); // Earner Leaf in merkle tree, should be 0 index - assertEq( - claim.earnerIndex, - 0, - "EarnerIndex should be 0" - ); - assertEq( - claim.earnerTreeProof.length, - 0, - "EarnerTreeProof should be empty" - ); + assertEq(claim.earnerIndex, 0, "EarnerIndex should be 0"); + assertEq(claim.earnerTreeProof.length, 0, "EarnerTreeProof should be empty"); _assertRewardsClaimedEvents(distributionRoot.root, claim, claimer); rewardsCoordinator.processClaim(claim, claimer); @@ -2155,7 +2174,9 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests } /// @notice parse proofs from json file and submitRoot() - function _parseProofData(string memory filePath) internal returns (IRewardsCoordinator.RewardsMerkleClaim memory) { + function _parseProofData( + string memory filePath + ) internal returns (IRewardsCoordinator.RewardsMerkleClaim memory) { cheats.readFile(filePath); string memory claimProofData = cheats.readFile(filePath); @@ -2170,9 +2191,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests uint256 numTokenLeaves = stdJson.readUint(claimProofData, ".TokenLeavesNum"); uint256 numTokenTreeProofs = stdJson.readUint(claimProofData, ".TokenTreeProofsNum"); - IRewardsCoordinator.TokenTreeMerkleLeaf[] memory tokenLeaves = new IRewardsCoordinator.TokenTreeMerkleLeaf[]( - numTokenLeaves - ); + IRewardsCoordinator.TokenTreeMerkleLeaf[] memory tokenLeaves = + new IRewardsCoordinator.TokenTreeMerkleLeaf[](numTokenLeaves); uint32[] memory tokenIndices = new uint32[](numTokenLeaves); for (uint256 i = 0; i < numTokenLeaves; ++i) { string memory tokenKey = string.concat(".TokenLeaves[", cheats.toString(i), "].Token"); @@ -2181,10 +2201,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests IERC20 token = IERC20(stdJson.readAddress(claimProofData, tokenKey)); uint256 cumulativeEarnings = stdJson.readUint(claimProofData, amountKey); - tokenLeaves[i] = IRewardsCoordinator.TokenTreeMerkleLeaf({ - token: token, - cumulativeEarnings: cumulativeEarnings - }); + tokenLeaves[i] = + IRewardsCoordinator.TokenTreeMerkleLeaf({token: token, cumulativeEarnings: cumulativeEarnings}); tokenIndices[i] = uint32(stdJson.readUint(claimProofData, leafIndicesKey)); /// DeployCode ERC20 to Token Address @@ -2230,15 +2248,24 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests return claims; } - function _parseAllProofsMaxEarnerAndLeafIndices() internal virtual returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) { + function _parseAllProofsMaxEarnerAndLeafIndices() + internal + virtual + returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) + { IRewardsCoordinator.RewardsMerkleClaim[] memory claims = new IRewardsCoordinator.RewardsMerkleClaim[](1); - claims[0] = _parseProofData("src/test/test-data/rewardsCoordinator/processClaimProofs_MaxEarnerAndLeafIndices.json"); + claims[0] = + _parseProofData("src/test/test-data/rewardsCoordinator/processClaimProofs_MaxEarnerAndLeafIndices.json"); return claims; } - function _parseAllProofsSingleTokenLeaf() internal virtual returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) { + function _parseAllProofsSingleTokenLeaf() + internal + virtual + returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) + { IRewardsCoordinator.RewardsMerkleClaim[] memory claims = new IRewardsCoordinator.RewardsMerkleClaim[](1); claims[0] = _parseProofData("src/test/test-data/rewardsCoordinator/processClaimProofs_SingleTokenLeaf.json"); @@ -2246,7 +2273,11 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests return claims; } - function _parseAllProofsSingleEarnerLeaf() internal virtual returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) { + function _parseAllProofsSingleEarnerLeaf() + internal + virtual + returns (IRewardsCoordinator.RewardsMerkleClaim[] memory) + { IRewardsCoordinator.RewardsMerkleClaim[] memory claims = new IRewardsCoordinator.RewardsMerkleClaim[](1); claims[0] = _parseProofData("src/test/test-data/rewardsCoordinator/processClaimProofs_SingleEarnerLeaf.json"); diff --git a/src/test/unit/StrategyBaseTVLLimitsUnit.sol b/src/test/unit/StrategyBaseTVLLimitsUnit.sol index 6a2b1d8f9..2a43914fe 100644 --- a/src/test/unit/StrategyBaseTVLLimitsUnit.sol +++ b/src/test/unit/StrategyBaseTVLLimitsUnit.sol @@ -19,7 +19,7 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { /// @notice Emitted when `maxTotalDeposits` value is updated from `previousValue` to `newValue` event MaxTotalDepositsUpdated(uint256 previousValue, uint256 newValue); - function setUp() virtual public override { + function setUp() public virtual override { // copy setup for StrategyBaseUnitTests StrategyBaseUnitTests.setUp(); @@ -30,7 +30,13 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { new TransparentUpgradeableProxy( address(strategyBaseTVLLimitsImplementation), address(proxyAdmin), - abi.encodeWithSelector(StrategyBaseTVLLimits.initialize.selector, maxPerDeposit, maxTotalDeposits, underlyingToken, pauserRegistry) + abi.encodeWithSelector( + StrategyBaseTVLLimits.initialize.selector, + maxPerDeposit, + maxTotalDeposits, + underlyingToken, + pauserRegistry + ) ) ) ); @@ -52,7 +58,11 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { assertEq(_maxDeposits, maxTotalDepositsFuzzedInput); } - function testSetTVLLimitsFailsWhenNotCalledByUnpauser(uint256 maxPerDepositFuzzedInput, uint256 maxTotalDepositsFuzzedInput, address notUnpauser) public { + function testSetTVLLimitsFailsWhenNotCalledByUnpauser( + uint256 maxPerDepositFuzzedInput, + uint256 maxTotalDepositsFuzzedInput, + address notUnpauser + ) public { cheats.assume(notUnpauser != address(proxyAdmin)); cheats.assume(notUnpauser != unpauser); cheats.startPrank(notUnpauser); @@ -61,7 +71,10 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { cheats.stopPrank(); } - function testSetInvalidMaxPerDepositAndMaxDeposits(uint256 maxPerDepositFuzzedInput, uint256 maxTotalDepositsFuzzedInput) public { + function testSetInvalidMaxPerDepositAndMaxDeposits( + uint256 maxPerDepositFuzzedInput, + uint256 maxTotalDepositsFuzzedInput + ) public { cheats.assume(maxTotalDepositsFuzzedInput < maxPerDepositFuzzedInput); cheats.startPrank(unpauser); cheats.expectRevert(bytes("StrategyBaseTVLLimits._setTVLLimits: maxPerDeposit exceeds maxTotalDeposits")); @@ -69,7 +82,11 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { cheats.stopPrank(); } - function testDepositMoreThanMaxPerDeposit(uint256 maxPerDepositFuzzedInput, uint256 maxTotalDepositsFuzzedInput, uint256 amount) public { + function testDepositMoreThanMaxPerDeposit( + uint256 maxPerDepositFuzzedInput, + uint256 maxTotalDepositsFuzzedInput, + uint256 amount + ) public { cheats.assume(amount > maxPerDepositFuzzedInput); _setTVLLimits(maxPerDepositFuzzedInput, maxTotalDepositsFuzzedInput); @@ -103,7 +120,9 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { cheats.stopPrank(); } - function testDepositValidAmount(uint256 depositAmount) public { + function testDepositValidAmount( + uint256 depositAmount + ) public { maxTotalDeposits = 1e12; maxPerDeposit = 3e11; cheats.assume(depositAmount > 0); @@ -119,10 +138,15 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { strategyWithTVLLimits.deposit(underlyingToken, depositAmount); cheats.stopPrank(); - require(strategyWithTVLLimits.totalShares() == depositAmount + sharesBefore, "total shares not updated correctly"); + require( + strategyWithTVLLimits.totalShares() == depositAmount + sharesBefore, "total shares not updated correctly" + ); } - function testDepositTVLLimit_ThenChangeTVLLimit(uint256 maxTotalDepositsFuzzedInput, uint256 newMaxTotalDepositsFuzzedInput) public { + function testDepositTVLLimit_ThenChangeTVLLimit( + uint256 maxTotalDepositsFuzzedInput, + uint256 newMaxTotalDepositsFuzzedInput + ) public { cheats.assume(maxTotalDepositsFuzzedInput > 0); cheats.assume(newMaxTotalDepositsFuzzedInput > maxTotalDepositsFuzzedInput); cheats.assume(newMaxTotalDepositsFuzzedInput < initialSupply); @@ -138,26 +162,35 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { strategyWithTVLLimits.deposit(underlyingToken, maxTotalDepositsFuzzedInput); cheats.stopPrank(); - require(strategyWithTVLLimits.totalShares() == maxTotalDepositsFuzzedInput + sharesBefore, "total shares not updated correctly"); + require( + strategyWithTVLLimits.totalShares() == maxTotalDepositsFuzzedInput + sharesBefore, + "total shares not updated correctly" + ); cheats.startPrank(unpauser); strategyWithTVLLimits.setTVLLimits(newMaxTotalDepositsFuzzedInput, newMaxTotalDepositsFuzzedInput); cheats.stopPrank(); - underlyingToken.transfer(address(strategyWithTVLLimits), newMaxTotalDepositsFuzzedInput - maxTotalDepositsFuzzedInput); + underlyingToken.transfer( + address(strategyWithTVLLimits), newMaxTotalDepositsFuzzedInput - maxTotalDepositsFuzzedInput + ); sharesBefore = strategyWithTVLLimits.totalShares(); - cheats.startPrank(address(strategyManager)); + cheats.startPrank(address(strategyManager)); strategyWithTVLLimits.deposit(underlyingToken, newMaxTotalDepositsFuzzedInput - maxTotalDepositsFuzzedInput); cheats.stopPrank(); - require(strategyWithTVLLimits.totalShares() == newMaxTotalDepositsFuzzedInput, "total shares not updated correctly"); + require( + strategyWithTVLLimits.totalShares() == newMaxTotalDepositsFuzzedInput, "total shares not updated correctly" + ); } /// @notice General-purpose test, re-useable, handles whether the deposit should revert or not and returns 'true' if it did revert. - function testDeposit_WithTVLLimits(uint256 maxPerDepositFuzzedInput, uint256 maxTotalDepositsFuzzedInput, uint256 depositAmount) - public returns (bool depositReverted) - { + function testDeposit_WithTVLLimits( + uint256 maxPerDepositFuzzedInput, + uint256 maxTotalDepositsFuzzedInput, + uint256 depositAmount + ) public returns (bool depositReverted) { cheats.assume(maxPerDepositFuzzedInput < maxTotalDepositsFuzzedInput); // need to filter this to make sure the deposit amounts can actually be transferred cheats.assume(depositAmount <= initialSupply); @@ -216,7 +249,10 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { strategyWithTVLLimits.deposit(underlyingToken, depositAmount); cheats.stopPrank(); - require(strategyWithTVLLimits.totalShares() == expectedSharesOut + totalSharesBefore, "total shares not updated correctly"); + require( + strategyWithTVLLimits.totalShares() == expectedSharesOut + totalSharesBefore, + "total shares not updated correctly" + ); // return 'false' since the call to `deposit` succeeded return false; @@ -237,49 +273,82 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { } /// OVERRIDING EXISTING TESTS TO FILTER INPUTS THAT WOULD FAIL DUE TO DEPOSIT-LIMITING - modifier filterToValidDepositAmounts(uint256 amountToDeposit) { + modifier filterToValidDepositAmounts( + uint256 amountToDeposit + ) { (uint256 _maxPerDeposit, uint256 _maxTotalDeposits) = strategyWithTVLLimits.getTVLLimits(); cheats.assume(amountToDeposit <= _maxPerDeposit && amountToDeposit <= _maxTotalDeposits); _; } - function testCanWithdrawDownToSmallShares(uint256 amountToDeposit, uint32 sharesToLeave) public virtual override filterToValidDepositAmounts(amountToDeposit) { + function testCanWithdrawDownToSmallShares( + uint256 amountToDeposit, + uint32 sharesToLeave + ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testCanWithdrawDownToSmallShares(amountToDeposit, sharesToLeave); } - function testDepositWithNonzeroPriorBalanceAndNonzeroPriorShares(uint256 priorTotalShares, uint256 amountToDeposit - ) public virtual override filterToValidDepositAmounts(priorTotalShares) filterToValidDepositAmounts(amountToDeposit) { + function testDepositWithNonzeroPriorBalanceAndNonzeroPriorShares( + uint256 priorTotalShares, + uint256 amountToDeposit + ) + public + virtual + override + filterToValidDepositAmounts(priorTotalShares) + filterToValidDepositAmounts(amountToDeposit) + { StrategyBaseUnitTests.testDepositWithNonzeroPriorBalanceAndNonzeroPriorShares(priorTotalShares, amountToDeposit); } - function testDepositWithZeroPriorBalanceAndZeroPriorShares(uint256 amountToDeposit) public virtual override filterToValidDepositAmounts(amountToDeposit) { + function testDepositWithZeroPriorBalanceAndZeroPriorShares( + uint256 amountToDeposit + ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); } - function testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares(uint256 amountToDeposit, uint256 amountToTransfer, uint96 amountSharesToQuery + function testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares( + uint256 amountToDeposit, + uint256 amountToTransfer, + uint96 amountSharesToQuery ) public virtual override filterToValidDepositAmounts(amountToDeposit) { - StrategyBaseUnitTests.testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares(amountToDeposit, amountToTransfer, amountSharesToQuery); + StrategyBaseUnitTests.testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares( + amountToDeposit, amountToTransfer, amountSharesToQuery + ); } - function testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares(uint256 amountToDeposit, uint256 amountToTransfer, uint96 amountUnderlyingToQuery + function testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares( + uint256 amountToDeposit, + uint256 amountToTransfer, + uint96 amountUnderlyingToQuery ) public virtual override filterToValidDepositAmounts(amountToDeposit) { - StrategyBaseUnitTests.testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares(amountToDeposit, amountToTransfer, amountUnderlyingToQuery); + StrategyBaseUnitTests.testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares( + amountToDeposit, amountToTransfer, amountUnderlyingToQuery + ); } - function testWithdrawFailsWhenSharesGreaterThanTotalShares(uint256 amountToDeposit, uint256 sharesToWithdraw + function testWithdrawFailsWhenSharesGreaterThanTotalShares( + uint256 amountToDeposit, + uint256 sharesToWithdraw ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testWithdrawFailsWhenSharesGreaterThanTotalShares(amountToDeposit, sharesToWithdraw); } - function testWithdrawFailsWhenWithdrawalsPaused(uint256 amountToDeposit) public virtual override filterToValidDepositAmounts(amountToDeposit) { + function testWithdrawFailsWhenWithdrawalsPaused( + uint256 amountToDeposit + ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testWithdrawFailsWhenWithdrawalsPaused(amountToDeposit); } - function testWithdrawWithPriorTotalSharesAndAmountSharesEqual(uint256 amountToDeposit) public virtual override filterToValidDepositAmounts(amountToDeposit) { + function testWithdrawWithPriorTotalSharesAndAmountSharesEqual( + uint256 amountToDeposit + ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testWithdrawWithPriorTotalSharesAndAmountSharesEqual(amountToDeposit); } - function testWithdrawWithPriorTotalSharesAndAmountSharesNotEqual(uint96 amountToDeposit, uint96 sharesToWithdraw + function testWithdrawWithPriorTotalSharesAndAmountSharesNotEqual( + uint96 amountToDeposit, + uint96 sharesToWithdraw ) public virtual override filterToValidDepositAmounts(amountToDeposit) { StrategyBaseUnitTests.testWithdrawWithPriorTotalSharesAndAmountSharesNotEqual(amountToDeposit, sharesToWithdraw); } diff --git a/src/test/unit/StrategyBaseUnit.t.sol b/src/test/unit/StrategyBaseUnit.t.sol index a8c8e47f0..293d84d8b 100644 --- a/src/test/unit/StrategyBaseUnit.t.sol +++ b/src/test/unit/StrategyBaseUnit.t.sol @@ -35,7 +35,7 @@ contract StrategyBaseUnitTests is Test { * incurring reasonably small losses to depositors */ uint256 internal constant SHARES_OFFSET = 1e3; - /** + /** * @notice virtual balance used as part of the mitigation of the common 'share inflation' attack vector * Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still * incurring reasonably small losses to depositors @@ -44,13 +44,13 @@ contract StrategyBaseUnitTests is Test { event ExchangeRateEmitted(uint256 rate); - function setUp() virtual public { + function setUp() public virtual { proxyAdmin = new ProxyAdmin(); address[] memory pausers = new address[](1); pausers[0] = pauser; pauserRegistry = new PauserRegistry(pausers, unpauser); - + strategyManager = new StrategyManagerMock(); underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", initialSupply, initialOwner); @@ -82,7 +82,9 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - function testDepositWithZeroPriorBalanceAndZeroPriorShares(uint256 amountToDeposit) public virtual { + function testDepositWithZeroPriorBalanceAndZeroPriorShares( + uint256 amountToDeposit + ) public virtual { // sanity check / filter cheats.assume(amountToDeposit <= underlyingToken.balanceOf(address(this))); cheats.assume(amountToDeposit >= 1); @@ -103,7 +105,10 @@ contract StrategyBaseUnitTests is Test { require(strategy.sharesToUnderlying(1e18) == 1e18); } - function testDepositWithNonzeroPriorBalanceAndNonzeroPriorShares(uint256 priorTotalShares, uint256 amountToDeposit) public virtual { + function testDepositWithNonzeroPriorBalanceAndNonzeroPriorShares( + uint256 priorTotalShares, + uint256 amountToDeposit + ) public virtual { cheats.assume(priorTotalShares >= 1 && amountToDeposit > 0); testDepositWithZeroPriorBalanceAndZeroPriorShares(priorTotalShares); @@ -140,8 +145,9 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - - function testDepositFailsWhenCallingFromNotStrategyManager(address caller) public { + function testDepositFailsWhenCallingFromNotStrategyManager( + address caller + ) public { cheats.assume(caller != address(strategy.strategyManager()) && caller != address(proxyAdmin)); uint256 amountToDeposit = 1e18; @@ -153,7 +159,9 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - function testDepositFailsWhenNotUsingUnderlyingToken(address notUnderlyingToken) public { + function testDepositFailsWhenNotUsingUnderlyingToken( + address notUnderlyingToken + ) public { cheats.assume(notUnderlyingToken != address(underlyingToken)); uint256 amountToDeposit = 1e18; @@ -184,14 +192,15 @@ contract StrategyBaseUnitTests is Test { uint256 amountToDeposit = 1e39; underlyingToken.transfer(address(strategy), amountToDeposit); - // Deposit cheats.prank(address(strategyManager)); cheats.expectRevert(bytes("StrategyBase.deposit: totalShares exceeds `MAX_TOTAL_SHARES`")); strategy.deposit(underlyingToken, amountToDeposit); } - function testWithdrawWithPriorTotalSharesAndAmountSharesEqual(uint256 amountToDeposit) public virtual { + function testWithdrawWithPriorTotalSharesAndAmountSharesEqual( + uint256 amountToDeposit + ) public virtual { cheats.assume(amountToDeposit >= 1); testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); @@ -210,10 +219,16 @@ contract StrategyBaseUnitTests is Test { uint256 totalSharesAfter = strategy.totalShares(); require(totalSharesAfter == 0, "shares did not decrease appropriately"); - require(tokenBalanceAfter - tokenBalanceBefore == strategyBalanceBefore, "tokenBalanceAfter - tokenBalanceBefore != strategyBalanceBefore"); + require( + tokenBalanceAfter - tokenBalanceBefore == strategyBalanceBefore, + "tokenBalanceAfter - tokenBalanceBefore != strategyBalanceBefore" + ); } - function testWithdrawWithPriorTotalSharesAndAmountSharesNotEqual(uint96 amountToDeposit, uint96 sharesToWithdraw) public virtual { + function testWithdrawWithPriorTotalSharesAndAmountSharesNotEqual( + uint96 amountToDeposit, + uint96 sharesToWithdraw + ) public virtual { cheats.assume(amountToDeposit >= 1); testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); @@ -222,7 +237,6 @@ contract StrategyBaseUnitTests is Test { uint256 strategyBalanceBefore = underlyingToken.balanceOf(address(strategy)); uint256 tokenBalanceBefore = underlyingToken.balanceOf(address(this)); - cheats.startPrank(address(strategyManager)); strategy.withdraw(address(this), underlyingToken, sharesToWithdraw); cheats.stopPrank(); @@ -231,12 +245,16 @@ contract StrategyBaseUnitTests is Test { uint256 totalSharesAfter = strategy.totalShares(); require(totalSharesBefore - totalSharesAfter == sharesToWithdraw, "shares did not decrease appropriately"); - require(tokenBalanceAfter - tokenBalanceBefore == (strategyBalanceBefore * sharesToWithdraw) / totalSharesBefore, - "token balance did not increase appropriately"); + require( + tokenBalanceAfter - tokenBalanceBefore == (strategyBalanceBefore * sharesToWithdraw) / totalSharesBefore, + "token balance did not increase appropriately" + ); } - function testWithdrawZeroAmount(uint256 amountToDeposit) public { - cheats.assume(amountToDeposit >= 1); + function testWithdrawZeroAmount( + uint256 amountToDeposit + ) public { + cheats.assume(amountToDeposit >= 1); testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); uint256 amountToWithdraw = 0; @@ -251,7 +269,9 @@ contract StrategyBaseUnitTests is Test { require(tokenBalanceBefore == underlyingToken.balanceOf(address(this)), "token balance changed"); } - function testWithdrawFailsWhenWithdrawalsPaused(uint256 amountToDeposit) public virtual { + function testWithdrawFailsWhenWithdrawalsPaused( + uint256 amountToDeposit + ) public virtual { cheats.assume(amountToDeposit >= 1); testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); @@ -268,7 +288,9 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - function testWithdrawalFailsWhenCallingFromNotStrategyManager(address caller) public { + function testWithdrawalFailsWhenCallingFromNotStrategyManager( + address caller + ) public { cheats.assume(caller != address(strategy.strategyManager()) && caller != address(proxyAdmin)); uint256 amountToDeposit = 1e18; @@ -282,7 +304,9 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - function testWithdrawalFailsWhenNotUsingUnderlyingToken(address notUnderlyingToken) public { + function testWithdrawalFailsWhenNotUsingUnderlyingToken( + address notUnderlyingToken + ) public { cheats.assume(notUnderlyingToken != address(underlyingToken)); uint256 amountToWithdraw = 1e18; @@ -293,7 +317,10 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - function testWithdrawFailsWhenSharesGreaterThanTotalShares(uint256 amountToDeposit, uint256 sharesToWithdraw) public virtual { + function testWithdrawFailsWhenSharesGreaterThanTotalShares( + uint256 amountToDeposit, + uint256 sharesToWithdraw + ) public virtual { cheats.assume(amountToDeposit >= 1); testDepositWithZeroPriorBalanceAndZeroPriorShares(amountToDeposit); @@ -334,7 +361,9 @@ contract StrategyBaseUnitTests is Test { } // uint240 input to prevent overflow - function testIntegrityOfSharesToUnderlyingWithZeroTotalShares(uint240 amountSharesToQuery) public { + function testIntegrityOfSharesToUnderlyingWithZeroTotalShares( + uint240 amountSharesToQuery + ) public { uint256 underlyingFromShares = strategy.sharesToUnderlying(amountSharesToQuery); require(underlyingFromShares == amountSharesToQuery, "underlyingFromShares != amountSharesToQuery"); @@ -349,9 +378,11 @@ contract StrategyBaseUnitTests is Test { cheats.stopPrank(); } - // amountSharesToQuery input is uint96 to prevent overflow - function testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares(uint256 amountToDeposit, uint256 amountToTransfer, uint96 amountSharesToQuery + function testIntegrityOfSharesToUnderlyingWithNonzeroTotalShares( + uint256 amountToDeposit, + uint256 amountToTransfer, + uint96 amountSharesToQuery ) public virtual { // sanity check / filter cheats.assume(amountToDeposit <= underlyingToken.balanceOf(address(this))); @@ -374,7 +405,10 @@ contract StrategyBaseUnitTests is Test { } // amountUnderlyingToQuery input is uint96 to prevent overflow - function testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares(uint256 amountToDeposit, uint256 amountToTransfer, uint96 amountUnderlyingToQuery + function testIntegrityOfUnderlyingToSharesWithNonzeroTotalShares( + uint256 amountToDeposit, + uint256 amountToTransfer, + uint96 amountUnderlyingToQuery ) public virtual { // sanity check / filter cheats.assume(amountToDeposit <= underlyingToken.balanceOf(address(this))); @@ -386,7 +420,8 @@ contract StrategyBaseUnitTests is Test { underlyingToken.transfer(address(strategy), amountToTransfer); uint256 strategyBalance = underlyingToken.balanceOf(address(strategy)); - uint256 expectedValueOut = ((strategy.totalShares() + SHARES_OFFSET) * amountUnderlyingToQuery) / (strategyBalance + BALANCE_OFFSET); + uint256 expectedValueOut = + ((strategy.totalShares() + SHARES_OFFSET) * amountUnderlyingToQuery) / (strategyBalance + BALANCE_OFFSET); uint256 sharesFromUnderlying = strategy.underlyingToShares(amountUnderlyingToQuery); require(sharesFromUnderlying == expectedValueOut, "sharesFromUnderlying != expectedValueOut"); diff --git a/src/test/unit/StrategyFactoryUnit.t.sol b/src/test/unit/StrategyFactoryUnit.t.sol index d8bd92858..f62942169 100644 --- a/src/test/unit/StrategyFactoryUnit.t.sol +++ b/src/test/unit/StrategyFactoryUnit.t.sol @@ -25,7 +25,7 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { uint256 initialSupply = 1e36; address initialOwner = address(this); address beaconProxyOwner = address(this); - address notOwner = address(7777777); + address notOwner = address(7_777_777); uint256 initialPausedStatus = 0; @@ -37,7 +37,7 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { event TokenBlacklisted(IERC20 token); - function setUp() virtual override public { + function setUp() public virtual override { EigenLayerUnitTestSetup.setUp(); address[] memory pausers = new address[](1); @@ -58,7 +58,8 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { new TransparentUpgradeableProxy( address(strategyFactoryImplementation), address(eigenLayerProxyAdmin), - abi.encodeWithSelector(StrategyFactory.initialize.selector, + abi.encodeWithSelector( + StrategyFactory.initialize.selector, initialOwner, pauserRegistry, initialPausedStatus, @@ -91,8 +92,14 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { "constructor / initializer incorrect, pauserRegistry set wrong" ); assertEq(strategyFactory.owner(), initialOwner, "constructor / initializer incorrect, owner set wrong"); - assertEq(strategyFactory.paused(), initialPausedStatus, "constructor / initializer incorrect, paused status set wrong"); - assertEq(strategyBeacon.owner(), beaconProxyOwner, "constructor / initializer incorrect, beaconProxyOwner set wrong"); + assertEq( + strategyFactory.paused(), + initialPausedStatus, + "constructor / initializer incorrect, paused status set wrong" + ); + assertEq( + strategyBeacon.owner(), beaconProxyOwner, "constructor / initializer incorrect, beaconProxyOwner set wrong" + ); } function test_initialize_revert_reinitialization() public { @@ -110,13 +117,22 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { // StrategySetForToken(underlyingToken, newStrategy); StrategyBase newStrategy = StrategyBase(address(strategyFactory.deployNewStrategy(underlyingToken))); - require(strategyFactory.deployedStrategies(underlyingToken) == newStrategy, "deployedStrategies mapping not set correctly"); + require( + strategyFactory.deployedStrategies(underlyingToken) == newStrategy, + "deployedStrategies mapping not set correctly" + ); require(newStrategy.strategyManager() == strategyManagerMock, "strategyManager not set correctly"); - require(strategyBeacon.implementation() == address(strategyImplementation), "strategyImplementation not set correctly"); + require( + strategyBeacon.implementation() == address(strategyImplementation), + "strategyImplementation not set correctly" + ); require(newStrategy.pauserRegistry() == pauserRegistry, "pauserRegistry not set correctly"); require(newStrategy.underlyingToken() == underlyingToken, "underlyingToken not set correctly"); require(strategyManagerMock.strategyIsWhitelistedForDeposit(newStrategy), "underlyingToken is not whitelisted"); - require(!strategyManagerMock.thirdPartyTransfersForbidden(newStrategy), "newStrategy has 3rd party transfers forbidden"); + require( + !strategyManagerMock.thirdPartyTransfersForbidden(newStrategy), + "newStrategy has 3rd party transfers forbidden" + ); } function test_deployNewStrategy_revert_StrategyAlreadyExists() public { @@ -125,7 +141,9 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { strategyFactory.deployNewStrategy(underlyingToken); } - function test_blacklistTokens(IERC20 token) public { + function test_blacklistTokens( + IERC20 token + ) public { IERC20[] memory tokens = new IERC20[](1); tokens[0] = token; @@ -149,10 +167,10 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { vm.prank(strategyFactory.owner()); cheats.expectEmit(true, false, false, false, address(strategyFactory)); emit TokenBlacklisted(underlyingToken); - cheats.expectCall(address(strategyManagerMock), abi.encodeWithSelector( - strategyManagerMock.removeStrategiesFromDepositWhitelist.selector, - toRemove - )); + cheats.expectCall( + address(strategyManagerMock), + abi.encodeWithSelector(strategyManagerMock.removeStrategiesFromDepositWhitelist.selector, toRemove) + ); strategyFactory.blacklistTokens(tokens); } @@ -165,7 +183,10 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { strategyFactory.whitelistStrategies(strategiesToWhitelist, thirdPartyTransfersForbiddenValues); assertTrue(strategyManagerMock.strategyIsWhitelistedForDeposit(strategy), "Strategy not whitelisted"); - require(strategyManagerMock.thirdPartyTransfersForbidden(strategy), "3rd party transfers forbidden not set correctly"); + require( + strategyManagerMock.thirdPartyTransfersForbidden(strategy), + "3rd party transfers forbidden not set correctly" + ); } function test_whitelistStrategies_revert_notOwner() public { @@ -206,10 +227,12 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { strategiesToRemove[0] = IStrategy(_deployStrategy()); strategyFactory.removeStrategiesFromWhitelist(strategiesToRemove); - assertFalse(strategyManagerMock.strategyIsWhitelistedForDeposit(strategiesToRemove[0]), "Strategy not removed from whitelist"); + assertFalse( + strategyManagerMock.strategyIsWhitelistedForDeposit(strategiesToRemove[0]), + "Strategy not removed from whitelist" + ); } - function _deployStrategy() internal returns (StrategyBase) { return StrategyBase( address( @@ -221,4 +244,4 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { ) ); } -} \ No newline at end of file +} diff --git a/src/test/unit/StrategyManagerUnit.t.sol b/src/test/unit/StrategyManagerUnit.t.sol index 189c495cd..23f9b874f 100644 --- a/src/test/unit/StrategyManagerUnit.t.sol +++ b/src/test/unit/StrategyManagerUnit.t.sol @@ -32,7 +32,7 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv Reenterer public reenterer; address initialOwner = address(this); - uint256 public privateKey = 111111; + uint256 public privateKey = 111_111; address constant dummyAdmin = address(uint160(uint256(keccak256("DummyAdmin")))); function setUp() public override { @@ -154,7 +154,9 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv { bytes32 structHash = keccak256( - abi.encode(strategyManager.DEPOSIT_TYPEHASH(), staker, dummyStrat, dummyToken, amount, nonceBefore, expiry) + abi.encode( + strategyManager.DEPOSIT_TYPEHASH(), staker, dummyStrat, dummyToken, amount, nonceBefore, expiry + ) ); bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", strategyManager.domainSeparator(), structHash)); @@ -181,14 +183,8 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv cheats.expectEmit(true, true, true, true, address(strategyManager)); emit Deposit(staker, dummyToken, dummyStrat, expectedShares); } - uint256 shares = strategyManager.depositIntoStrategyWithSignature( - dummyStrat, - dummyToken, - amount, - staker, - expiry, - signature - ); + uint256 shares = + strategyManager.depositIntoStrategyWithSignature(dummyStrat, dummyToken, amount, staker, expiry, signature); uint256 sharesAfter = strategyManager.stakerStrategyShares(staker, dummyStrat); uint256 nonceAfter = strategyManager.nonces(staker); @@ -217,7 +213,9 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv /** * @notice Deploys numberOfStrategiesToAdd new strategies and adds them to the whitelist */ - function _addStrategiesToWhitelist(uint8 numberOfStrategiesToAdd) internal returns (IStrategy[] memory) { + function _addStrategiesToWhitelist( + uint8 numberOfStrategiesToAdd + ) internal returns (IStrategy[] memory) { IStrategy[] memory strategyArray = new IStrategy[](numberOfStrategiesToAdd); bool[] memory thirdPartyTransfersForbiddenValues = new bool[](numberOfStrategiesToAdd); // loop that deploys a new strategy and adds it to the array @@ -251,9 +249,7 @@ contract StrategyManagerUnitTests_initialize is StrategyManagerUnitTests { function test_InitializedStorageProperly() public { assertEq(strategyManager.owner(), initialOwner, "strategyManager.owner() != initialOwner"); assertEq( - strategyManager.strategyWhitelister(), - initialOwner, - "strategyManager.strategyWhitelister() != initialOwner" + strategyManager.strategyWhitelister(), initialOwner, "strategyManager.strategyWhitelister() != initialOwner" ); assertEq( address(strategyManager.pauserRegistry()), @@ -355,12 +351,8 @@ contract StrategyManagerUnitTests_depositIntoStrategy is StrategyManagerUnitTest address targetToUse = address(strategyManager); uint256 msgValueToUse = 0; - bytes memory calldataToUse = abi.encodeWithSelector( - StrategyManager.depositIntoStrategy.selector, - address(reenterer), - dummyToken, - amount - ); + bytes memory calldataToUse = + abi.encodeWithSelector(StrategyManager.depositIntoStrategy.selector, address(reenterer), dummyToken, amount); reenterer.prepare(targetToUse, msgValueToUse, calldataToUse, bytes("ReentrancyGuard: reentrant call")); strategyManager.depositIntoStrategy(IStrategy(address(reenterer)), dummyToken, amount); @@ -559,7 +551,9 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa } // tries depositing using a signature and an EIP 1271 compliant wallet, *but* providing a bad signature - function testFuzz_Revert_WithContractWallet_BadSignature(uint256 amount) public { + function testFuzz_Revert_WithContractWallet_BadSignature( + uint256 amount + ) public { // min shares must be minted on strategy cheats.assume(amount >= 1); @@ -639,7 +633,9 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa { bytes32 structHash = keccak256( - abi.encode(strategyManager.DEPOSIT_TYPEHASH(), staker, dummyStrat, revertToken, amount, nonceBefore, expiry) + abi.encode( + strategyManager.DEPOSIT_TYPEHASH(), staker, dummyStrat, revertToken, amount, nonceBefore, expiry + ) ); bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", strategyManager.domainSeparator(), structHash)); @@ -694,7 +690,6 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa IStrategy[] memory _strategy = new IStrategy[](1); bool[] memory _thirdPartyTransfersForbiddenValues = new bool[](1); - _strategy[0] = IStrategy(address(reenterer)); for (uint256 i = 0; i < _strategy.length; ++i) { cheats.expectEmit(true, true, true, true, address(strategyManager)); @@ -730,10 +725,7 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa address targetToUse = address(strategyManager); uint256 msgValueToUse = 0; bytes memory calldataToUse = abi.encodeWithSelector( - StrategyManager.depositIntoStrategy.selector, - address(reenterer), - dummyToken, - amount + StrategyManager.depositIntoStrategy.selector, address(reenterer), dummyToken, amount ); reenterer.prepare(targetToUse, msgValueToUse, calldataToUse, bytes("ReentrancyGuard: reentrant call")); } @@ -782,11 +774,11 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa address staker = cheats.addr(privateKey); uint256 amount = 1e18; - string - memory expectedRevertMessage = "StrategyManager.onlyStrategiesWhitelistedForDeposit: strategy not whitelisted"; + string memory expectedRevertMessage = + "StrategyManager.onlyStrategiesWhitelistedForDeposit: strategy not whitelisted"; _depositIntoStrategyWithSignature(staker, amount, type(uint256).max, expectedRevertMessage); } - + function testFuzz_Revert_WhenThirdPartyTransfersForbidden(uint256 amount, uint256 expiry) public { // min shares must be minted on strategy cheats.assume(amount >= 1); @@ -796,7 +788,8 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa address staker = cheats.addr(privateKey); // not expecting a revert, so input an empty string - string memory expectedRevertMessage = "StrategyManager.depositIntoStrategyWithSignature: third transfers disabled"; + string memory expectedRevertMessage = + "StrategyManager.depositIntoStrategyWithSignature: third transfers disabled"; _depositIntoStrategyWithSignature(staker, amount, expiry, expectedRevertMessage); } } @@ -939,10 +932,7 @@ contract StrategyManagerUnitTests_removeShares is StrategyManagerUnitTests { "stakerStrategyListLengthAfter != stakerStrategyListLengthBefore - 1" ); assertEq(sharesAfter, 0, "sharesAfter != 0"); - assertFalse( - _isDepositedStrategy(staker, removeStrategy), - "strategy should not be part of staker strategy list" - ); + assertFalse(_isDepositedStrategy(staker, removeStrategy), "strategy should not be part of staker strategy list"); } /** @@ -978,19 +968,15 @@ contract StrategyManagerUnitTests_removeShares is StrategyManagerUnitTests { if (sharesAmounts[i] == depositAmounts[i]) { ++numPoppedStrategies; assertFalse( - _isDepositedStrategy(staker, strategies[i]), - "strategy should not be part of staker strategy list" + _isDepositedStrategy(staker, strategies[i]), "strategy should not be part of staker strategy list" ); assertEq(sharesAfter[i], 0, "sharesAfter != 0"); } else { assertTrue( - _isDepositedStrategy(staker, strategies[i]), - "strategy should be part of staker strategy list" + _isDepositedStrategy(staker, strategies[i]), "strategy should be part of staker strategy list" ); assertEq( - sharesAfter[i], - sharesBefore[i] - sharesAmounts[i], - "sharesAfter != sharesBefore - sharesAmounts" + sharesAfter[i], sharesBefore[i] - sharesAmounts[i], "sharesAfter != sharesBefore - sharesAmounts" ); } } @@ -1009,12 +995,16 @@ contract StrategyManagerUnitTests_addShares is StrategyManagerUnitTests { invalidDelegationManager.addShares(strategyManager, address(this), dummyToken, dummyStrat, 1); } - function testFuzz_Revert_StakerZeroAddress(uint256 amount) external { + function testFuzz_Revert_StakerZeroAddress( + uint256 amount + ) external { cheats.expectRevert("StrategyManager._addShares: staker cannot be zero address"); delegationManagerMock.addShares(strategyManager, address(0), dummyToken, dummyStrat, amount); } - function testFuzz_Revert_ZeroShares(address staker) external filterFuzzedAddressInputs(staker) { + function testFuzz_Revert_ZeroShares( + address staker + ) external filterFuzzedAddressInputs(staker) { cheats.assume(staker != address(0)); cheats.expectRevert("StrategyManager._addShares: shares should not be zero!"); delegationManagerMock.addShares(strategyManager, staker, dummyToken, dummyStrat, 0); @@ -1169,7 +1159,9 @@ contract StrategyManagerUnitTests_setStrategyWhitelister is StrategyManagerUnitT ); } - function testFuzz_Revert_WhenCalledByNotOwner(address notOwner) external filterFuzzedAddressInputs(notOwner) { + function testFuzz_Revert_WhenCalledByNotOwner( + address notOwner + ) external filterFuzzedAddressInputs(notOwner) { cheats.assume(notOwner != strategyManager.owner()); address newWhitelister = address(this); cheats.prank(notOwner); @@ -1226,7 +1218,9 @@ contract StrategyManagerUnitTests_addStrategiesToDepositWhitelist is StrategyMan assertTrue(strategyManager.strategyIsWhitelistedForDeposit(strategy), "strategy should still be whitelisted"); } - function testFuzz_AddStrategiesToDepositWhitelist(uint8 numberOfStrategiesToAdd) external { + function testFuzz_AddStrategiesToDepositWhitelist( + uint8 numberOfStrategiesToAdd + ) external { // sanity filtering on fuzzed input cheats.assume(numberOfStrategiesToAdd <= 16); _addStrategiesToWhitelist(numberOfStrategiesToAdd); @@ -1260,8 +1254,7 @@ contract StrategyManagerUnitTests_removeStrategiesFromDepositWhitelist is Strate uint256 numLogsAfter = cheats.getRecordedLogs().length; assertEq(numLogsBefore, numLogsAfter, "event emitted when strategy already not whitelisted"); assertFalse( - strategyManager.strategyIsWhitelistedForDeposit(strategy), - "strategy still should not be whitelisted" + strategyManager.strategyIsWhitelistedForDeposit(strategy), "strategy still should not be whitelisted" ); } @@ -1285,8 +1278,7 @@ contract StrategyManagerUnitTests_removeStrategiesFromDepositWhitelist is Strate emit StrategyRemovedFromDepositWhitelist(strategy); strategyManager.removeStrategiesFromDepositWhitelist(strategyArray); assertFalse( - strategyManager.strategyIsWhitelistedForDeposit(strategy), - "strategy should no longer be whitelisted" + strategyManager.strategyIsWhitelistedForDeposit(strategy), "strategy should no longer be whitelisted" ); } diff --git a/src/test/utils/BeaconChainProofsWrapper.sol b/src/test/utils/BeaconChainProofsWrapper.sol index d093848d4..94eb90444 100644 --- a/src/test/utils/BeaconChainProofsWrapper.sol +++ b/src/test/utils/BeaconChainProofsWrapper.sol @@ -5,11 +5,7 @@ import "src/contracts/libraries/BeaconChainProofs.sol"; /// @notice This contract is used to test offchain proof generation contract BeaconChainProofsWrapper { - - function verifyStateRoot( - bytes32 beaconBlockRoot, - BeaconChainProofs.StateRootProof calldata proof - ) external view { + function verifyStateRoot(bytes32 beaconBlockRoot, BeaconChainProofs.StateRootProof calldata proof) external view { BeaconChainProofs.verifyStateRoot(beaconBlockRoot, proof); } @@ -36,6 +32,4 @@ contract BeaconChainProofsWrapper { ) external view { BeaconChainProofs.verifyValidatorBalance(balanceContainerRoot, validatorIndex, proof); } - - -} \ No newline at end of file +} diff --git a/src/test/utils/EigenLayerUnitTestBase.sol b/src/test/utils/EigenLayerUnitTestBase.sol index 9a776e9bf..d7c841fea 100644 --- a/src/test/utils/EigenLayerUnitTestBase.sol +++ b/src/test/utils/EigenLayerUnitTestBase.sol @@ -18,7 +18,9 @@ abstract contract EigenLayerUnitTestBase is Test { address public constant unpauser = address(556); // Helper Functions/Modifiers - modifier filterFuzzedAddressInputs(address fuzzedAddress) { + modifier filterFuzzedAddressInputs( + address fuzzedAddress + ) { cheats.assume(!addressIsExcludedFromFuzzedInputs[fuzzedAddress]); _; } diff --git a/src/test/utils/EigenPodUser.t.sol b/src/test/utils/EigenPodUser.t.sol index 8e62b26ef..68857ff23 100644 --- a/src/test/utils/EigenPodUser.t.sol +++ b/src/test/utils/EigenPodUser.t.sol @@ -23,14 +23,12 @@ interface IUserDeployer { } contract EigenPodUser is PrintUtils { - Vm cheats = Vm(HEVM_ADDRESS); TimeMachine timeMachine; BeaconChainMock beaconChain; IBeacon public eigenPodBeacon; - string _NAME; // User's EigenPod and each of their validator indices within that pod @@ -39,24 +37,29 @@ contract EigenPodUser is PrintUtils { IStrategy constant BEACONCHAIN_ETH_STRAT = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); IERC20 constant NATIVE_ETH = IERC20(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); - uint constant GWEI_TO_WEI = 1e9; + uint256 constant GWEI_TO_WEI = 1e9; bytes internal constant beaconProxyBytecode = hex"608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564"; - constructor(string memory name) { + constructor( + string memory name + ) { IUserDeployer deployer = IUserDeployer(msg.sender); timeMachine = deployer.timeMachine(); beaconChain = deployer.beaconChain(); eigenPodBeacon = deployer.eigenPodBeacon(); - pod = EigenPod(payable( - Create2.deploy( - 0, - bytes32(uint256(uint160(address(this)))), - // set the beacon address to the eigenPodBeacon - abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) - ))); + pod = EigenPod( + payable( + Create2.deploy( + 0, + bytes32(uint256(uint160(address(this)))), + // set the beacon address to the eigenPodBeacon + abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) + ) + ) + ); pod.initialize(address(this)); _NAME = name; @@ -73,9 +76,11 @@ contract EigenPodUser is PrintUtils { return _NAME; } - /******************************************************************************* - BEACON CHAIN METHODS - *******************************************************************************/ + /** + * + * BEACON CHAIN METHODS + * + */ /// @dev Uses any ETH held by the User to start validators on the beacon chain /// @return A list of created validator indices @@ -83,45 +88,50 @@ contract EigenPodUser is PrintUtils { /// Note: If the user does not have enough ETH to start a validator, this method reverts /// Note: This method also advances one epoch forward on the beacon chain, so that /// withdrawal credential proofs are generated for each validator. - function startValidators() public createSnapshot virtual returns (uint40[] memory, uint) { + function startValidators() public virtual createSnapshot returns (uint40[] memory, uint256) { _logM("startValidators"); return _startValidators(); } - function exitValidators(uint40[] memory _validators) public createSnapshot virtual returns (uint64 exitedBalanceGwei) { + function exitValidators( + uint40[] memory _validators + ) public virtual createSnapshot returns (uint64 exitedBalanceGwei) { _logM("exitValidators"); return _exitValidators(_validators); } - /******************************************************************************* - EIGENPOD METHODS - *******************************************************************************/ - + /** + * + * EIGENPOD METHODS + * + */ function verifyWithdrawalCredentials( uint40[] memory _validators - ) public createSnapshot virtual { + ) public virtual createSnapshot { _logM("verifyWithdrawalCredentials"); _verifyWithdrawalCredentials(_validators); } - function startCheckpoint() public createSnapshot virtual { + function startCheckpoint() public virtual createSnapshot { _logM("startCheckpoint"); _startCheckpoint(); } - function completeCheckpoint() public createSnapshot virtual { + function completeCheckpoint() public virtual createSnapshot { _logM("completeCheckpoint"); _completeCheckpoint(); } - /******************************************************************************* - INTERNAL METHODS - *******************************************************************************/ + /** + * + * INTERNAL METHODS + * + */ /// @dev Uses any ETH held by the User to start validators on the beacon chain /// @return A list of created validator indices @@ -129,18 +139,18 @@ contract EigenPodUser is PrintUtils { /// Note: If the user does not have enough ETH to start a validator, this method reverts /// Note: This method also advances one epoch forward on the beacon chain, so that /// withdrawal credential proofs are generated for each validator. - function _startValidators() internal returns (uint40[] memory, uint) { - uint balanceWei = address(this).balance; + function _startValidators() internal returns (uint40[] memory, uint256) { + uint256 balanceWei = address(this).balance; // Number of full validators: balance / 32 ETH - uint numValidators = balanceWei / 32 ether; + uint256 numValidators = balanceWei / 32 ether; balanceWei -= (numValidators * 32 ether); // If we still have at least 1 ETH left over, we can create another (non-full) validator // Note that in the mock beacon chain this validator will generate rewards like any other. // The main point is to ensure pods are able to handle validators that have less than 32 ETH - uint lastValidatorBalance; - uint totalValidators = numValidators; + uint256 lastValidatorBalance; + uint256 totalValidators = numValidators; if (balanceWei >= 1 ether) { lastValidatorBalance = balanceWei - (balanceWei % 1 gwei); balanceWei -= lastValidatorBalance; @@ -149,16 +159,14 @@ contract EigenPodUser is PrintUtils { require(totalValidators != 0, "startValidators: not enough ETH to start a validator"); uint40[] memory newValidators = new uint40[](totalValidators); - uint totalBeaconBalance = address(this).balance - balanceWei; + uint256 totalBeaconBalance = address(this).balance - balanceWei; _log("- creating new validators", newValidators.length); _log("- depositing balance to beacon chain (wei)", totalBeaconBalance); // Create each of the full validators - for (uint i = 0; i < numValidators; i++) { - uint40 validatorIndex = beaconChain.newValidator{ - value: 32 ether - }(_podWithdrawalCredentials()); + for (uint256 i = 0; i < numValidators; i++) { + uint40 validatorIndex = beaconChain.newValidator{value: 32 ether}(_podWithdrawalCredentials()); newValidators[i] = validatorIndex; validators.push(validatorIndex); @@ -166,9 +174,7 @@ contract EigenPodUser is PrintUtils { // If we had a remainder, create the final, non-full validator if (totalValidators == numValidators + 1) { - uint40 validatorIndex = beaconChain.newValidator{ - value: lastValidatorBalance - }(_podWithdrawalCredentials()); + uint40 validatorIndex = beaconChain.newValidator{value: lastValidatorBalance}(_podWithdrawalCredentials()); newValidators[newValidators.length - 1] = validatorIndex; validators.push(validatorIndex); @@ -180,10 +186,12 @@ contract EigenPodUser is PrintUtils { return (newValidators, totalBeaconBalance); } - function _exitValidators(uint40[] memory _validators) internal returns (uint64 exitedBalanceGwei) { + function _exitValidators( + uint40[] memory _validators + ) internal returns (uint64 exitedBalanceGwei) { _log("- exiting num validators", _validators.length); - for (uint i = 0; i < _validators.length; i++) { + for (uint256 i = 0; i < _validators.length; i++) { exitedBalanceGwei += beaconChain.exitValidator(_validators[i]); } @@ -208,13 +216,12 @@ contract EigenPodUser is PrintUtils { CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, checkpointTimestamp); _log("- submitting num checkpoint proofs", proofs.balanceProofs.length); - pod.verifyCheckpointProofs({ - balanceContainerProof: proofs.balanceContainerProof, - proofs: proofs.balanceProofs - }); + pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } - function _verifyWithdrawalCredentials(uint40[] memory _validators) internal { + function _verifyWithdrawalCredentials( + uint40[] memory _validators + ) internal { CredentialProofs memory proofs = beaconChain.getCredentialProofs(_validators); pod.verifyWithdrawalCredentials({ @@ -233,9 +240,9 @@ contract EigenPodUser is PrintUtils { function getActiveValidators() public view returns (uint40[] memory) { uint40[] memory activeValidators = new uint40[](validators.length); - uint numActive; - uint pos; - for(uint i = 0; i < validators.length; i++) { + uint256 numActive; + uint256 pos; + for (uint256 i = 0; i < validators.length; i++) { if (beaconChain.isActive(validators[i])) { activeValidators[pos] = validators[i]; numActive++; @@ -244,8 +251,10 @@ contract EigenPodUser is PrintUtils { } // Manually update length - assembly { mstore(activeValidators, numActive) } + assembly { + mstore(activeValidators, numActive) + } return activeValidators; } -} \ No newline at end of file +} diff --git a/src/test/utils/Operators.sol b/src/test/utils/Operators.sol index 7c5faabd6..9e7a5892d 100644 --- a/src/test/utils/Operators.sol +++ b/src/test/utils/Operators.sol @@ -12,19 +12,25 @@ contract Operators is Test { operatorConfigJson = vm.readFile("./src/test/test-data/operators.json"); } - function operatorPrefix(uint256 index) public pure returns(string memory) { + function operatorPrefix( + uint256 index + ) public pure returns (string memory) { return string.concat(".operators[", string.concat(vm.toString(index), "].")); } - function getNumOperators() public returns(uint256) { + function getNumOperators() public returns (uint256) { return stdJson.readUint(operatorConfigJson, ".numOperators"); } - function getOperatorAddress(uint256 index) public returns(address) { + function getOperatorAddress( + uint256 index + ) public returns (address) { return stdJson.readAddress(operatorConfigJson, string.concat(operatorPrefix(index), "Address")); } - function getOperatorSecretKey(uint256 index) public returns(uint256) { + function getOperatorSecretKey( + uint256 index + ) public returns (uint256) { return readUint(operatorConfigJson, index, "SecretKey"); } @@ -32,17 +38,22 @@ contract Operators is Test { return stringToUint(stdJson.readString(json, string.concat(operatorPrefix(index), key))); } - function stringToUint(string memory s) public pure returns (uint256) { + function stringToUint( + string memory s + ) public pure returns (uint256) { bytes memory b = bytes(s); uint256 result = 0; for (uint256 i = 0; i < b.length; i++) { if (uint256(uint8(b[i])) >= 48 && uint256(uint8(b[i])) <= 57) { - result = result * 10 + (uint256(uint8(b[i])) - 48); + result = result * 10 + (uint256(uint8(b[i])) - 48); } } return result; } - function setOperatorJsonFilePath(string memory filepath) public { + + function setOperatorJsonFilePath( + string memory filepath + ) public { operatorConfigJson = vm.readFile(filepath); } } diff --git a/src/test/utils/Owners.sol b/src/test/utils/Owners.sol index 9c32971ab..38ee9bfe3 100644 --- a/src/test/utils/Owners.sol +++ b/src/test/utils/Owners.sol @@ -13,35 +13,40 @@ contract Owners is Test { ownersConfigJson = vm.readFile("./src/test/test-data/owners.json"); } - function ownerPrefix(uint256 index) public pure returns(string memory) { + function ownerPrefix( + uint256 index + ) public pure returns (string memory) { return string.concat(".owners[", string.concat(vm.toString(index), "].")); } - function getNumOperators() public returns(uint256) { + function getNumOperators() public returns (uint256) { return stdJson.readUint(ownersConfigJson, ".numOwners"); } - function getOwnerAddress(uint256 index) public returns(address) { + function getOwnerAddress( + uint256 index + ) public returns (address) { return stdJson.readAddress(ownersConfigJson, string.concat(ownerPrefix(index), "Address")); } - function getOwnerAddresses() public returns(address[] memory) { + function getOwnerAddresses() public returns (address[] memory) { for (uint256 i = 0; i < getNumOperators(); i++) { addresses.push(getOwnerAddress(i)); } - return addresses; + return addresses; } - function getReputedOwnerAddresses() public returns(address[] memory) { + function getReputedOwnerAddresses() public returns (address[] memory) { resetOwnersConfigJson("reputedOwners.json"); for (uint256 i = 0; i < getNumOperators(); i++) { addresses.push(getOwnerAddress(i)); } - return addresses; + return addresses; } - function resetOwnersConfigJson(string memory newConfig) public { + function resetOwnersConfigJson( + string memory newConfig + ) public { ownersConfigJson = vm.readFile(newConfig); } - } diff --git a/src/test/utils/ProofParsing.sol b/src/test/utils/ProofParsing.sol index e3607e07b..ee507a6b6 100644 --- a/src/test/utils/ProofParsing.sol +++ b/src/test/utils/ProofParsing.sol @@ -22,177 +22,178 @@ contract ProofParsing is Test { bytes32 slotRoot; bytes32 executionPayloadRoot; - function setJSON(string memory path) public { + function setJSON( + string memory path + ) public { proofConfigJson = vm.readFile(path); } - function getSlot() public returns(uint256) { + function getSlot() public returns (uint256) { return stdJson.readUint(proofConfigJson, ".slot"); } - function getValidatorIndex() public returns(uint256) { + function getValidatorIndex() public returns (uint256) { return stdJson.readUint(proofConfigJson, ".validatorIndex"); } - function getValidatorPubkeyHash() public returns(bytes32) { + function getValidatorPubkeyHash() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".ValidatorFields[0]"); } - function getWithdrawalIndex() public returns(uint256) { + function getWithdrawalIndex() public returns (uint256) { return stdJson.readUint(proofConfigJson, ".withdrawalIndex"); } - function getBlockRootIndex() public returns(uint256) { + function getBlockRootIndex() public returns (uint256) { return stdJson.readUint(proofConfigJson, ".blockHeaderRootIndex"); } - function getHistoricalSummaryIndex() public returns(uint256) { + function getHistoricalSummaryIndex() public returns (uint256) { return stdJson.readUint(proofConfigJson, ".historicalSummaryIndex"); } - function getBeaconStateRoot() public returns(bytes32) { + function getBeaconStateRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".beaconStateRoot"); } - function getBlockRoot() public returns(bytes32) { + function getBlockRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".blockHeaderRoot"); } - function getSlotRoot() public returns(bytes32) { + function getSlotRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".slotRoot"); } - function getTimestampRoot() public returns(bytes32) { + function getTimestampRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".timestampRoot"); } - function getExecutionPayloadRoot() public returns(bytes32) { + function getExecutionPayloadRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".executionPayloadRoot"); } - function getLatestBlockRoot() public returns(bytes32) { + function getLatestBlockRoot() public returns (bytes32) { return stdJson.readBytes32(proofConfigJson, ".latestBlockHeaderRoot"); } - function getExecutionPayloadProof () public returns(bytes32[7] memory) { - for (uint i = 0; i < 7; i++) { + + function getExecutionPayloadProof() public returns (bytes32[7] memory) { + for (uint256 i = 0; i < 7; i++) { prefix = string.concat(".ExecutionPayloadProof[", string.concat(vm.toString(i), "]")); - executionPayloadProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + executionPayloadProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return executionPayloadProof; } - function getTimestampProofDeneb() public returns(bytes32[5] memory) { - for (uint i = 0; i < 5; i++) { + function getTimestampProofDeneb() public returns (bytes32[5] memory) { + for (uint256 i = 0; i < 5; i++) { prefix = string.concat(".TimestampProof[", string.concat(vm.toString(i), "]")); - timestampProofsCapella[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + timestampProofsCapella[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return timestampProofsCapella; } - function getTimestampProofCapella() public returns(bytes32[4] memory) { - for (uint i = 0; i < 4; i++) { + function getTimestampProofCapella() public returns (bytes32[4] memory) { + for (uint256 i = 0; i < 4; i++) { prefix = string.concat(".TimestampProof[", string.concat(vm.toString(i), "]")); - timestampProofsDeneb[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + timestampProofsDeneb[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return timestampProofsDeneb; } - - - function getBlockHeaderProof() public returns(bytes32[18] memory) { - for (uint i = 0; i < 18; i++) { + function getBlockHeaderProof() public returns (bytes32[18] memory) { + for (uint256 i = 0; i < 18; i++) { prefix = string.concat(".BlockHeaderProof[", string.concat(vm.toString(i), "]")); - blockHeaderProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + blockHeaderProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return blockHeaderProof; } - function getSlotProof() public returns(bytes32[3] memory) { - for (uint i = 0; i < 3; i++) { + function getSlotProof() public returns (bytes32[3] memory) { + for (uint256 i = 0; i < 3; i++) { prefix = string.concat(".SlotProof[", string.concat(vm.toString(i), "]")); - slotProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + slotProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return slotProof; } - function getStateRootProof() public returns(bytes memory) { + function getStateRootProof() public returns (bytes memory) { bytes32[] memory stateRootProof = new bytes32[](3); - for (uint i = 0; i < 3; i++) { + for (uint256 i = 0; i < 3; i++) { prefix = string.concat(".StateRootAgainstLatestBlockHeaderProof[", string.concat(vm.toString(i), "]")); - stateRootProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + stateRootProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return abi.encodePacked(stateRootProof); } - function getWithdrawalProofDeneb() public returns(bytes32[10] memory) { - for (uint i = 0; i < 10; i++) { + function getWithdrawalProofDeneb() public returns (bytes32[10] memory) { + for (uint256 i = 0; i < 10; i++) { prefix = string.concat(".WithdrawalProof[", string.concat(vm.toString(i), "]")); - withdrawalProofDeneb[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + withdrawalProofDeneb[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return withdrawalProofDeneb; } - function getWithdrawalProofCapella() public returns(bytes32[9] memory) { - for (uint i = 0; i < 9; i++) { + function getWithdrawalProofCapella() public returns (bytes32[9] memory) { + for (uint256 i = 0; i < 9; i++) { prefix = string.concat(".WithdrawalProof[", string.concat(vm.toString(i), "]")); - withdrawalProofCapella[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + withdrawalProofCapella[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return withdrawalProofCapella; } - function getValidatorProof() public returns(bytes32[46] memory) { - for (uint i = 0; i < 46; i++) { + function getValidatorProof() public returns (bytes32[46] memory) { + for (uint256 i = 0; i < 46; i++) { prefix = string.concat(".ValidatorProof[", string.concat(vm.toString(i), "]")); - validatorProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + validatorProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return validatorProof; } - function getHistoricalSummaryProof() public returns(bytes32[44] memory) { - for (uint i = 0; i < 44; i++) { + function getHistoricalSummaryProof() public returns (bytes32[44] memory) { + for (uint256 i = 0; i < 44; i++) { prefix = string.concat(".HistoricalSummaryProof[", string.concat(vm.toString(i), "]")); - historicalSummaryProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + historicalSummaryProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return historicalSummaryProof; } - - function getWithdrawalFields() public returns(bytes32[] memory) { + + function getWithdrawalFields() public returns (bytes32[] memory) { bytes32[] memory withdrawalFields = new bytes32[](4); - for (uint i = 0; i < 4; i++) { + for (uint256 i = 0; i < 4; i++) { prefix = string.concat(".WithdrawalFields[", string.concat(vm.toString(i), "]")); - withdrawalFields[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + withdrawalFields[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } - return withdrawalFields; + return withdrawalFields; } - function getValidatorFields() public returns(bytes32[] memory) { + function getValidatorFields() public returns (bytes32[] memory) { bytes32[] memory validatorFields = new bytes32[](8); - for (uint i = 0; i < 8; i++) { + for (uint256 i = 0; i < 8; i++) { prefix = string.concat(".ValidatorFields[", string.concat(vm.toString(i), "]")); - validatorFields[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + validatorFields[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return validatorFields; } - function getBalanceUpdateProof() public returns(bytes memory) { + function getBalanceUpdateProof() public returns (bytes memory) { // Balance update proofs are the same as withdrawal credential proofs return getWithdrawalCredentialProof(); } - function getWithdrawalCredentialProof() public returns(bytes memory) { + function getWithdrawalCredentialProof() public returns (bytes memory) { bytes32[] memory withdrawalCredentialProof = new bytes32[](46); - for (uint i = 0; i < 46; i++) { + for (uint256 i = 0; i < 46; i++) { prefix = string.concat(".WithdrawalCredentialProof[", string.concat(vm.toString(i), "]")); - withdrawalCredentialProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + withdrawalCredentialProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return abi.encodePacked(withdrawalCredentialProof); } - function getValidatorFieldsProof() public returns(bytes32[] memory) { + function getValidatorFieldsProof() public returns (bytes32[] memory) { bytes32[] memory validatorFieldsProof = new bytes32[](46); - for (uint i = 0; i < 46; i++) { + for (uint256 i = 0; i < 46; i++) { prefix = string.concat(".ValidatorFieldsProof[", string.concat(vm.toString(i), "]")); - validatorFieldsProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); + validatorFieldsProof[i] = (stdJson.readBytes32(proofConfigJson, prefix)); } return validatorFieldsProof; } diff --git a/src/test/utils/Utils.sol b/src/test/utils/Utils.sol index 10c5653eb..f12520b48 100644 --- a/src/test/utils/Utils.sol +++ b/src/test/utils/Utils.sol @@ -6,17 +6,14 @@ import "src/contracts/strategies/StrategyBase.sol"; contract Utils { address constant dummyAdmin = address(uint160(uint256(keccak256("DummyAdmin")))); - function deployNewStrategy(IERC20 token, IStrategyManager strategyManager, IPauserRegistry pauserRegistry, address admin) public returns (StrategyBase) { + function deployNewStrategy( + IERC20 token, + IStrategyManager strategyManager, + IPauserRegistry pauserRegistry, + address admin + ) public returns (StrategyBase) { StrategyBase newStrategy = new StrategyBase(strategyManager); - newStrategy = StrategyBase( - address( - new TransparentUpgradeableProxy( - address(newStrategy), - address(admin), - "" - ) - ) - ); + newStrategy = StrategyBase(address(new TransparentUpgradeableProxy(address(newStrategy), address(admin), ""))); newStrategy.initialize(token, pauserRegistry); return newStrategy; }