Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x77FbA179C79De5B7653F68b5039Af940AdA60ce0
Balance 0 ETH
Nonce 1
Code Size 13036 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

13036 bytes
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80636fcfff4511610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146103a7578063e7a324dc146103ba578063f1127ed8146103c2578063fca3b5aa146103e3576101cf565b8063a9059cbb1461035b578063b4b5ea571461036e578063c3cda52014610381578063d505accf14610394576101cf565b8063782d6fe1116100de578063782d6fe11461030d57806379cc67901461032d5780637ecebe001461034057806395d89b4114610353576101cf565b80636fcfff45146102df57806370a08231146102f257806376c71ca114610305576101cf565b806330b36cef1161017157806342966c681161014b57806342966c6814610291578063587cde1e146102a45780635c11d62f146102b75780635c19a95c146102cc576101cf565b806330b36cef1461025f578063313ce5671461026757806340c10f191461027c576101cf565b806318160ddd116101ad57806318160ddd1461022757806320606b701461023c57806323b872dd1461024457806330adf81f14610257576101cf565b806306fdde03146101d457806307546172146101f2578063095ea7b314610207575b600080fd5b6101dc6103f6565b6040516101e991906128db565b60405180910390f35b6101fa61042f565b6040516101e991906127be565b61021a610215366004612575565b61044b565b6040516101e99190612806565b61022f61055c565b6040516101e99190612811565b61022f610562565b61021a6102523660046124c9565b610579565b61022f61071b565b61022f610727565b61026f61072d565b6040516101e99190612f23565b61028f61028a366004612575565b610732565b005b61028f61029f366004612637565b610a33565b6101fa6102b236600461247a565b610a67565b6102bf610a8f565b6040516101e99190612eee565b61028f6102da36600461247a565b610a97565b6102bf6102ed36600461247a565b610aa4565b61022f61030036600461247a565b610abc565b61026f610af2565b61032061031b366004612575565b610af7565b6040516101e99190612f31565b61028f61033b366004612575565b610dd9565b61022f61034e36600461247a565b610f11565b6101dc610f23565b61021a610369366004612575565b610f5c565b61032061037c36600461247a565b610f98565b61028f61038f36600461259f565b611047565b61028f6103a2366004612509565b6112cc565b61022f6103b5366004612495565b6116ed565b61022f611733565b6103d56103d03660046125f8565b61173f565b6040516101e9929190612eff565b61028f6103f136600461247a565b61177a565b6040518060400160405280601581526020017f416d706c65666f72746820476f7665726e616e6365000000000000000000000081525081565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561048957506bffffffffffffffffffffffff6104ae565b6104ab8360405180606001604052806026815260200161303f60269139611866565b90505b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff891680855292529182902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610548908590612f31565b60405180910390a360019150505b92915050565b60005481565b60405161056e906126fa565b604051809103902081565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602090815260408083203380855290835281842054825160608101909352602680845291936bffffffffffffffffffffffff9091169285926105e3928892919061303f90830139611866565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561062f57506bffffffffffffffffffffffff82811614155b1561070357600061065983836040518060600160405280603e8152602001613001603e91396118b8565b73ffffffffffffffffffffffffffffffffffffffff8981166000818152600360209081526040808320948a16808452949091529081902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff86161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906106f9908590612f31565b60405180910390a3505b61070e87878361191b565b5060019695505050505050565b60405161056e90612685565b60025481565b601281565b60015473ffffffffffffffffffffffffffffffffffffffff16331461078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612b2e565b60405180910390fd5b6002544210156107c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612d43565b73ffffffffffffffffffffffffffffffffffffffff8216610815576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612da0565b610823426301e13380611b87565b600281905550600061084d826040518060600160405280602381526020016131eb60239139611866565b9050610869610862600054600260ff16611bc6565b6064611c1a565b816bffffffffffffffffffffffff1611156108b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612b8b565b60006108d66000546040518060600160405280602b8152602001613265602b9139611866565b90506108fb81836040518060600160405280602c8152602001612f8c602c9139611c66565b6bffffffffffffffffffffffff908116600090815573ffffffffffffffffffffffffffffffffffffffff861681526004602090815260409182902054825160608101909352602680845261095f949190911692869290919061323f90830139611c66565b73ffffffffffffffffffffffffffffffffffffffff851660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff959095169490941790935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109f3908690612f31565b60405180910390a373ffffffffffffffffffffffffffffffffffffffff808516600090815260056020526040812054610a2d921684611cc1565b50505050565b6000610a578260405180606001604052806026815260200161306560269139611866565b9050610a633382611f08565b5050565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6301e1338081565b610aa133826120d0565b50565b60076020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff166000908152600460205260409020546bffffffffffffffffffffffff1690565b600281565b6000438210610b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612bc2565b73ffffffffffffffffffffffffffffffffffffffff831660009081526007602052604090205463ffffffff1680610b6d576000915050610556565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260066020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610c455773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052205464010000000090046bffffffffffffffffffffffff169050610556565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260066020908152604080832083805290915290205463ffffffff16831015610c8d576000915050610556565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610d8157600282820363ffffffff16048103610cdd61242e565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260066020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046bffffffffffffffffffffffff169181019190915290871415610d5c576020015194506105569350505050565b805163ffffffff16871115610d7357819350610d7a565b6001820392505b5050610cb3565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260066020908152604080832063ffffffff909416835292905220546bffffffffffffffffffffffff6401000000009091041691505092915050565b6000610dfd826040518060600160405280602a8152602001613198602a9139611866565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020908152604080832033845282528083205481516060810190925260298083529495509293610e64936bffffffffffffffffffffffff16928692919061311f908301396118b8565b73ffffffffffffffffffffffffffffffffffffffff851660008181526003602090815260408083203380855292529182902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff86161790559051929350917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610eff908590612f31565b60405180910390a3610a2d8483611f08565b60086020526000908152604090205481565b6040518060400160405280600581526020017f464f52544800000000000000000000000000000000000000000000000000000081525081565b600080610f818360405180606001604052806027815260200161329060279139611866565b9050610f8e33858361191b565b5060019392505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604081205463ffffffff1680610fd0576000611040565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff850163ffffffff16845290915290205464010000000090046bffffffffffffffffffffffff165b9392505050565b6000604051611055906126fa565b60408051918290038220828201909152601582527f416d706c65666f72746820476f7665726e616e636500000000000000000000006020909201919091527f8074a57fc3df0f85e9fde9508c19e931785a115c70c33d274f41a392070a74fc6110bc61217e565b306040516020016110d0949392919061288c565b60405160208183030381529060405280519060200120905060006040516110f69061276f565b604051908190038120611111918a908a908a9060200161285b565b6040516020818303038152906040528051906020012090506000828260405160200161113e92919061264f565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161117b94939291906128bd565b6020604051602081039080840390855afa15801561119d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612a3d565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600860205260409020805460018101909155891461127b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107839061294c565b874211156112b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612e91565b6112bf818b6120d0565b505050505b505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86141561130957506bffffffffffffffffffffffff61132e565b61132b86604051806060016040528060258152602001612fdc60259139611866565b90505b600060405161133c906126fa565b60408051918290038220828201909152601582527f416d706c65666f72746820476f7665726e616e636500000000000000000000006020909201919091527f8074a57fc3df0f85e9fde9508c19e931785a115c70c33d274f41a392070a74fc6113a361217e565b306040516020016113b7949392919061288c565b60405160208183030381529060405280519060200120905060006040516113dd90612685565b6040805191829003822073ffffffffffffffffffffffffffffffffffffffff8d1660009081526008602090815292902080546001810190915561142c9391928e928e928e9290918e910161281a565b6040516020818303038152906040528051906020012090506000828260405160200161145992919061264f565b60405160208183030381529060405280519060200120905060006001828989896040516000815260200160405260405161149694939291906128bd565b6020604051602081039080840390855afa1580156114b8573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612d0e565b8b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611595576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612e5a565b884211156115cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612c1f565b84600360008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925876040516116d79190612f31565b60405180910390a3505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526003602090815260408083209390941682529190915220546bffffffffffffffffffffffff1690565b60405161056e9061276f565b600660209081526000928352604080842090915290825290205463ffffffff81169064010000000090046bffffffffffffffffffffffff1682565b60015473ffffffffffffffffffffffffffffffffffffffff1633146117cb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610783906129a9565b6001546040517f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f6916118179173ffffffffffffffffffffffffffffffffffffffff9091169084906127df565b60405180910390a1600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000816c0100000000000000000000000084106118b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906128db565b509192915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff1611158290611913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906128db565b505050900390565b73ffffffffffffffffffffffffffffffffffffffff8316611968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612ad1565b73ffffffffffffffffffffffffffffffffffffffff82166119b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612dfd565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020908152604091829020548251606081019093526037808452611a12936bffffffffffffffffffffffff90921692859291906130c0908301396118b8565b73ffffffffffffffffffffffffffffffffffffffff848116600090815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff968716179055928616825290829020548251606081019093526031808452611aa4949190911692859290919061320e90830139611c66565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152600460205260409081902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff95909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611b3b908590612f31565b60405180910390a373ffffffffffffffffffffffffffffffffffffffff808416600090815260056020526040808220548584168352912054611b8292918216911683611cc1565b505050565b600082820183811015611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612a06565b600082611bd557506000610556565b82820282848281611be257fe5b0414611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612c54565b6000808211611c55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612a9a565b818381611c5e57fe5b049392505050565b6000838301826bffffffffffffffffffffffff8087169083161015611cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906128db565b50949350505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d0b57506000816bffffffffffffffffffffffff16115b15611b825773ffffffffffffffffffffffffffffffffffffffff831615611e0e5773ffffffffffffffffffffffffffffffffffffffff831660009081526007602052604081205463ffffffff169081611d65576000611dd5565b73ffffffffffffffffffffffffffffffffffffffff851660009081526006602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860163ffffffff16845290915290205464010000000090046bffffffffffffffffffffffff165b90506000611dfc82856040518060600160405280602981526020016131c2602991396118b8565b9050611e0a86848484612182565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611b825773ffffffffffffffffffffffffffffffffffffffff821660009081526007602052604081205463ffffffff169081611e63576000611ed3565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860163ffffffff16845290915290205464010000000090046bffffffffffffffffffffffff165b90506000611efa82856040518060600160405280602881526020016130f760289139611c66565b90506112c485848484612182565b73ffffffffffffffffffffffffffffffffffffffff8216611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078390612cb1565b6000611f7b60005460405180606001604052806028815260200161317060289139611866565b9050611fa08183604051806060016040528060288152602001613148602891396118b8565b6bffffffffffffffffffffffff908116600090815573ffffffffffffffffffffffffffffffffffffffff85168152600460209081526040918290205482516060810190935260248084526120049491909116928692909190612fb8908301396118b8565b73ffffffffffffffffffffffffffffffffffffffff841660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff959095169490941790935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612095908690612f31565b60405180910390a373ffffffffffffffffffffffffffffffffffffffff808416600090815260056020526040812054611b8292169084611cc1565b73ffffffffffffffffffffffffffffffffffffffff808316600081815260056020818152604080842080546004845282862054949093528787167fffffffffffffffffffffffff000000000000000000000000000000000000000084168117909155905191909516946bffffffffffffffffffffffff9092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610a2d828483611cc1565b4690565b60006121a64360405180606001604052806035815260200161308b603591396123ec565b905060008463ffffffff1611801561221a575073ffffffffffffffffffffffffffffffffffffffff8516600090815260066020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b156122b95773ffffffffffffffffffffffffffffffffffffffff851660009081526006602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff880163ffffffff168452909152902080547fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff166401000000006bffffffffffffffffffffffff851602179055612395565b60408051808201825263ffffffff80841682526bffffffffffffffffffffffff808616602080850191825273ffffffffffffffffffffffffffffffffffffffff8b166000818152600683528781208c871682528352878120965187549451909516640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff9587167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000958616179590951694909417909555938252600790935292909220805460018801909316929091169190911790555b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516123dd929190612f4a565b60405180910390a25050505050565b60008164010000000084106118b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906128db565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461055657600080fd5b803560ff8116811461055657600080fd5b60006020828403121561248b578081fd5b6110408383612445565b600080604083850312156124a7578081fd5b6124b18484612445565b91506124c08460208501612445565b90509250929050565b6000806000606084860312156124dd578081fd5b83356124e881612f69565b925060208401356124f881612f69565b929592945050506040919091013590565b600080600080600080600060e0888a031215612523578283fd5b61252d8989612445565b965061253c8960208a01612445565b955060408801359450606088013593506125598960808a01612469565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612587578182fd5b6125918484612445565b946020939093013593505050565b60008060008060008060c087890312156125b7578182fd5b6125c18888612445565b955060208701359450604087013593506125de8860608901612469565b92506080870135915060a087013590509295509295509295565b6000806040838503121561260a578182fd5b6126148484612445565b9150602083013563ffffffff8116811461262c578182fd5b809150509250929050565b600060208284031215612648578081fd5b5035919050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b7f5065726d69742861646472657373206f776e65722c616464726573732073706581527f6e6465722c75696e743235362076616c75652c75696e74323536206e6f6e636560208201527f2c75696e7432353620646561646c696e65290000000000000000000000000000604082015260520190565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430190565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b901515815260200190565b90815260200190565b95865273ffffffffffffffffffffffffffffffffffffffff94851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845273ffffffffffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b9384526020840192909252604083015273ffffffffffffffffffffffffffffffffffffffff16606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015612907578581018301518582016040015282016128eb565b818111156129185783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60208082526023908201527f466f7274683a3a64656c656761746542795369673a20696e76616c6964206e6f60408201527f6e63650000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252603f908201527f466f7274683a3a7365744d696e7465723a206f6e6c7920746865206d696e746560408201527f722063616e206368616e676520746865206d696e746572206164647265737300606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526027908201527f466f7274683a3a64656c656761746542795369673a20696e76616c696420736960408201527f676e617475726500000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252603d908201527f466f7274683a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e736665722066726f6d20746865207a65726f2061646472657373000000606082015260800190565b60208082526025908201527f466f7274683a3a6d696e743a206f6e6c7920746865206d696e7465722063616e60408201527f206d696e74000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f466f7274683a3a6d696e743a206578636565646564206d696e74206361700000604082015260600190565b60208082526028908201527f466f7274683a3a6765745072696f72566f7465733a206e6f742079657420646560408201527f7465726d696e6564000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f466f7274683a3a7065726d69743a207369676e61747572652065787069726564604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f466f7274683a3a5f6275726e3a206275726e2066726f6d20746865207a65726f60408201527f2061646472657373000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f466f7274683a3a7065726d69743a20696e76616c6964207369676e6174757265604082015260600190565b60208082526024908201527f466f7274683a3a6d696e743a206d696e74696e67206e6f7420616c6c6f77656460408201527f2079657400000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f466f7274683a3a6d696e743a2063616e6e6f74207472616e7366657220746f2060408201527f746865207a65726f206164647265737300000000000000000000000000000000606082015260800190565b6020808252603b908201527f466f7274683a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e7366657220746f20746865207a65726f20616464726573730000000000606082015260800190565b6020808252601b908201527f466f7274683a3a7065726d69743a20756e617574686f72697a65640000000000604082015260600190565b60208082526027908201527f466f7274683a3a64656c656761746542795369673a207369676e61747572652060408201527f6578706972656400000000000000000000000000000000000000000000000000606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b60ff91909116815260200190565b6bffffffffffffffffffffffff91909116815260200190565b6bffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff81168114610aa157600080fdfe466f7274683a3a6d696e743a206e657720746f74616c537570706c7920657863656564732039362062697473466f7274683a3a5f6275726e3a20616d6f756e7420657863656564732062616c616e6365466f7274683a3a7065726d69743a20616d6f756e7420657863656564732039362062697473466f7274683a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365466f7274683a3a617070726f76653a20616d6f756e7420657863656564732039362062697473466f7274683a3a6275726e3a20726177416d6f756e7420657863656564732039362062697473466f7274683a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473466f7274683a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365466f7274683a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773466f7274683a3a6275726e46726f6d3a20616d6f756e74206578636565647320616c6c6f77616e6365466f7274683a3a5f6275726e3a20616d6f756e74206578636565647320746f74616c537570706c79466f7274683a3a5f6275726e3a206f6c6420737570706c7920657863656564732039362062697473466f7274683a3a6275726e46726f6d3a20726177416d6f756e7420657863656564732039362062697473466f7274683a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773466f7274683a3a6d696e743a20616d6f756e7420657863656564732039362062697473466f7274683a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773466f7274683a3a6d696e743a207472616e7366657220616d6f756e74206f766572666c6f7773466f7274683a3a6d696e74206f6c6420746f74616c537570706c7920657863656564732039362062697473466f7274683a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473a2646970667358221220376a63168431a84cde2cf43ad7ea14e0ca7fe5764590ce9816da322a9f7a32ae64736f6c634300060b0033

Verified Source Code Partial Match

Compiler: v0.6.11+commit.5ef660b1 EVM: istanbul Optimization: Yes (999999 runs)
Forth.sol 441 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;

import "./SafeMath.sol";

contract Forth {
    /// @notice EIP-20 token name for this token
    string public constant name = "Ampleforth Governance";

    /// @notice EIP-20 token symbol for this token
    string public constant symbol = "FORTH";

    /// @notice EIP-20 token decimals for this token
    uint8 public constant decimals = 18;

    /// @notice Total number of tokens in circulation
    uint public totalSupply = 15_000_000e18; // 15 million Forth

    /// @notice Address which may mint new tokens
    address public minter;

    /// @notice The timestamp after which minting may occur
    uint public mintingAllowedAfter;

    /// @notice Minimum time between mints
    uint32 public constant minimumTimeBetweenMints = 1 days * 365;

    /// @notice Cap on the percentage of totalSupply that can be minted at each mint
    uint8 public constant mintCap = 2;

    /// @dev Allowance amounts on behalf of others
    mapping (address => mapping (address => uint96)) internal allowances;

    /// @dev Official record of token balances for each account
    mapping (address => uint96) internal balances;

    /// @notice A record of each accounts delegate
    mapping (address => address) public delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice The EIP-712 typehash for the permit struct used by the contract
    bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

    /// @notice An event thats emitted when the minter address is changed
    event MinterChanged(address minter, address newMinter);

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /// @notice The standard EIP-20 transfer event
    event Transfer(address indexed from, address indexed to, uint256 amount);

    /// @notice The standard EIP-20 approval event
    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /**
     * @notice Construct a new Forth token
     * @param account The initial account to grant all the tokens
     * @param minter_ The account with minting ability
     * @param mintingAllowedAfter_ The timestamp after which minting may occur
     */
    constructor(address account, address minter_, uint mintingAllowedAfter_) public {
        require(mintingAllowedAfter_ >= block.timestamp, "Forth::constructor: minting can only begin after deployment");

        balances[account] = uint96(totalSupply);
        emit Transfer(address(0), account, totalSupply);
        minter = minter_;
        emit MinterChanged(address(0), minter);
        mintingAllowedAfter = mintingAllowedAfter_;
    }

    /**
     * @notice Change the minter address
     * @param minter_ The address of the new minter
     */
    function setMinter(address minter_) external {
        require(msg.sender == minter, "Forth::setMinter: only the minter can change the minter address");
        emit MinterChanged(minter, minter_);
        minter = minter_;
    }

    /**
     * @notice Mint new tokens
     * @param dst The address of the destination account
     * @param rawAmount The number of tokens to be minted
     */
    function mint(address dst, uint rawAmount) external {
        require(msg.sender == minter, "Forth::mint: only the minter can mint");
        require(block.timestamp >= mintingAllowedAfter, "Forth::mint: minting not allowed yet");
        require(dst != address(0), "Forth::mint: cannot transfer to the zero address");

        // record the mint
        mintingAllowedAfter = SafeMath.add(block.timestamp, minimumTimeBetweenMints);

        // mint the amount
        uint96 amount = safe96(rawAmount, "Forth::mint: amount exceeds 96 bits");
        require(amount <= SafeMath.div(SafeMath.mul(totalSupply, mintCap), 100), "Forth::mint: exceeded mint cap");
        uint96 supply = safe96(totalSupply, "Forth::mint old totalSupply exceeds 96 bits");
        totalSupply = add96(supply, amount, "Forth::mint: new totalSupply exceeds 96 bits");

        // transfer the amount to the recipient
        balances[dst] = add96(balances[dst], amount, "Forth::mint: transfer amount overflows");
        emit Transfer(address(0), dst, amount);

        // move delegates
        _moveDelegates(address(0), delegates[dst], amount);
    }

    /**
     * @notice Destroys `amount` tokens from the caller
     * @param rawAmount The number of tokens to burn
     */
    function burn(uint256 rawAmount) external {
        uint96 amount = safe96(rawAmount, "Forth::burn: rawAmount exceeds 96 bits");
        _burn(msg.sender, amount);
    }

    /**
     * @notice Destroys `amount` tokens from `account`, deducting from the caller's allowance
     * @param account The address of the account to burn from
     * @param rawAmount The number of tokens to burn
     */
    function burnFrom(address account, uint256 rawAmount) external {
        uint96 amount = safe96(rawAmount, "Forth::burnFrom: rawAmount exceeds 96 bits");

        uint96 decreasedAllowance =
            sub96(allowances[account][msg.sender], amount, "Forth::burnFrom: amount exceeds allowance");
        allowances[account][msg.sender] = decreasedAllowance;
        emit Approval(account, msg.sender, decreasedAllowance);

        _burn(account, amount);
    }

    /**
     * @notice Destroys `amount` tokens from `account`, reducing the total supply
     * @param account The address of the account to burn from
     * @param amount The number of tokens to burn
     */
    function _burn(address account, uint96 amount) internal {
        require(account != address(0), "Forth::_burn: burn from the zero address");

        uint96 supply = safe96(totalSupply, "Forth::_burn: old supply exceeds 96 bits");
        totalSupply = sub96(supply, amount, "Forth::_burn: amount exceeds totalSupply");

        balances[account] = sub96(balances[account], amount, "Forth::_burn: amount exceeds balance");
        emit Transfer(account, address(0), amount);

        // move delegates
        _moveDelegates(delegates[account], address(0), amount);
    }

    /**
     * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`
     * @param account The address of the account holding the funds
     * @param spender The address of the account spending the funds
     * @return The number of tokens approved
     */
    function allowance(address account, address spender) external view returns (uint) {
        return allowances[account][spender];
    }

    /**
     * @notice Approve `spender` to transfer up to `amount` from `src`
     * @dev This will overwrite the approval amount for `spender`
     *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
     * @param spender The address of the account which may transfer tokens
     * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)
     * @return Whether or not the approval succeeded
     */
    function approve(address spender, uint rawAmount) external returns (bool) {
        uint96 amount;
        if (rawAmount == type(uint).max) {
            amount = type(uint96).max;
        } else {
            amount = safe96(rawAmount, "Forth::approve: amount exceeds 96 bits");
        }

        allowances[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);
        return true;
    }

    /**
     * @notice Triggers an approval from owner to spends
     * @param owner The address to approve from
     * @param spender The address to be approved
     * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)
     * @param deadline The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function permit(address owner, address spender, uint rawAmount, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        uint96 amount;
        if (rawAmount == type(uint).max) {
            amount = type(uint96).max;
        } else {
            amount = safe96(rawAmount, "Forth::permit: amount exceeds 96 bits");
        }

        bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this)));
        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, rawAmount, nonces[owner]++, deadline));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "Forth::permit: invalid signature");
        require(signatory == owner, "Forth::permit: unauthorized");
        require(now <= deadline, "Forth::permit: signature expired");

        allowances[owner][spender] = amount;

        emit Approval(owner, spender, amount);
    }

    /**
     * @notice Get the number of tokens held by the `account`
     * @param account The address of the account to get the balance of
     * @return The number of tokens held
     */
    function balanceOf(address account) external view returns (uint) {
        return balances[account];
    }

    /**
     * @notice Transfer `amount` tokens from `msg.sender` to `dst`
     * @param dst The address of the destination account
     * @param rawAmount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transfer(address dst, uint rawAmount) external returns (bool) {
        uint96 amount = safe96(rawAmount, "Forth::transfer: amount exceeds 96 bits");
        _transferTokens(msg.sender, dst, amount);
        return true;
    }

    /**
     * @notice Transfer `amount` tokens from `src` to `dst`
     * @param src The address of the source account
     * @param dst The address of the destination account
     * @param rawAmount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transferFrom(address src, address dst, uint rawAmount) external returns (bool) {
        address spender = msg.sender;
        uint96 spenderAllowance = allowances[src][spender];
        uint96 amount = safe96(rawAmount, "Forth::approve: amount exceeds 96 bits");

        if (spender != src && spenderAllowance != type(uint96).max) {
            uint96 newAllowance = sub96(spenderAllowance, amount, "Forth::transferFrom: transfer amount exceeds spender allowance");
            allowances[src][spender] = newAllowance;

            emit Approval(src, spender, newAllowance);
        }

        _transferTokens(src, dst, amount);
        return true;
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public {
        bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this)));
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "Forth::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "Forth::delegateBySig: invalid nonce");
        require(now <= expiry, "Forth::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint96) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {
        require(blockNumber < block.number, "Forth::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = delegates[delegator];
        uint96 delegatorBalance = balances[delegator];
        delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _transferTokens(address src, address dst, uint96 amount) internal {
        require(src != address(0), "Forth::_transferTokens: cannot transfer from the zero address");
        require(dst != address(0), "Forth::_transferTokens: cannot transfer to the zero address");

        balances[src] = sub96(balances[src], amount, "Forth::_transferTokens: transfer amount exceeds balance");
        balances[dst] = add96(balances[dst], amount, "Forth::_transferTokens: transfer amount overflows");
        emit Transfer(src, dst, amount);

        _moveDelegates(delegates[src], delegates[dst], amount);
    }

    function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint96 srcRepNew = sub96(srcRepOld, amount, "Forth::_moveVotes: vote amount underflows");
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint96 dstRepNew = add96(dstRepOld, amount, "Forth::_moveVotes: vote amount overflows");
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {
      uint32 blockNumber = safe32(block.number, "Forth::_writeCheckpoint: block number exceeds 32 bits");

      if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
          checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
      } else {
          checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
          numCheckpoints[delegatee] = nCheckpoints + 1;
      }

      emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {
        require(n < 2**96, errorMessage);
        return uint96(n);
    }

    function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {
        uint96 c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function getChainId() internal pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }
}
SafeMath.sol 214 lines
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

Read Contract

DELEGATION_TYPEHASH 0xe7a324dc → bytes32
DOMAIN_TYPEHASH 0x20606b70 → bytes32
PERMIT_TYPEHASH 0x30adf81f → bytes32
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
checkpoints 0xf1127ed8 → uint32, uint96
decimals 0x313ce567 → uint8
delegates 0x587cde1e → address
getCurrentVotes 0xb4b5ea57 → uint96
getPriorVotes 0x782d6fe1 → uint96
minimumTimeBetweenMints 0x5c11d62f → uint32
mintCap 0x76c71ca1 → uint8
minter 0x07546172 → address
mintingAllowedAfter 0x30b36cef → uint256
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
numCheckpoints 0x6fcfff45 → uint32
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 10 functions

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

approve 0x095ea7b3
address spender
uint256 rawAmount
returns: bool
burn 0x42966c68
uint256 rawAmount
burnFrom 0x79cc6790
address account
uint256 rawAmount
delegate 0x5c19a95c
address delegatee
delegateBySig 0xc3cda520
address delegatee
uint256 nonce
uint256 expiry
uint8 v
bytes32 r
bytes32 s
mint 0x40c10f19
address dst
uint256 rawAmount
permit 0xd505accf
address owner
address spender
uint256 rawAmount
uint256 deadline
uint8 v
bytes32 r
bytes32 s
setMinter 0xfca3b5aa
address minter_
transfer 0xa9059cbb
address dst
uint256 rawAmount
returns: bool
transferFrom 0x23b872dd
address src
address dst
uint256 rawAmount
returns: bool

Recent Transactions

No transactions found for this address