Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x095797FD4297fb79883cC912a5Ba6313B15c445d
Balance 0 ETH
Nonce 1
Code Size 16798 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16798 bytes
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80637e5cd5c111610104578063a9059cbb116100a2578063e797ec1b11610071578063e797ec1b1461056f578063e7e117861461058d578063edf07bb5146105bd578063f2fde38b146105db576101da565b8063a9059cbb146104d5578063b19f2fc414610505578063d89135cd14610521578063dd62ed3e1461053f576101da565b80638da5cb5b116100de5780638da5cb5b1461044b57806395d89b411461046957806398603cca14610487578063a457c2d7146104a5576101da565b80637e5cd5c1146103df578063859e0d3a146103fd57806388ee3b061461041b576101da565b8063395093511161017c57806370a082311161014b57806370a08231146103595780637581a8e61461038957806375eb259b146103a757806379cc6790146103c3576101da565b806339509351146102d357806340c10f191461030357806342966c681461031f57806355c7ba141461033b576101da565b806318160ddd116101b857806318160ddd1461024957806320c354bd1461026757806323b872dd14610285578063313ce567146102b5576101da565b806306fdde03146101df57806307aa037a146101fd578063095ea7b314610219575b600080fd5b6101e76105f7565b6040516101f491906139be565b60405180910390f35b61021760048036038101906102129190613a43565b610689565b005b610233600480360381019061022e9190613aa6565b6109f9565b6040516102409190613b01565b60405180910390f35b610251610a1c565b60405161025e9190613b2b565b60405180910390f35b61026f610a26565b60405161027c9190613b01565b60405180910390f35b61029f600480360381019061029a9190613b46565b610a39565b6040516102ac9190613b01565b60405180910390f35b6102bd610b43565b6040516102ca9190613bb5565b60405180910390f35b6102ed60048036038101906102e89190613aa6565b610b5a565b6040516102fa9190613b01565b60405180910390f35b61031d60048036038101906103189190613aa6565b610c04565b005b61033960048036038101906103349190613bd0565b610d8c565b005b610343610da0565b6040516103509190613b01565b60405180910390f35b610373600480360381019061036e9190613a43565b610db3565b6040516103809190613b2b565b60405180910390f35b610391610dfc565b60405161039e91906139be565b60405180910390f35b6103c160048036038101906103bc9190613a43565b61106c565b005b6103dd60048036038101906103d89190613aa6565b611381565b005b6103e7611483565b6040516103f491906139be565b60405180910390f35b6104056116f2565b6040516104129190613b01565b60405180910390f35b61043560048036038101906104309190613a43565b6119ed565b6040516104429190613b01565b60405180910390f35b610453611a47565b6040516104609190613c0c565b60405180910390f35b610471611a70565b60405161047e91906139be565b60405180910390f35b61048f611b02565b60405161049c91906139be565b60405180910390f35b6104bf60048036038101906104ba9190613aa6565b611d71565b6040516104cc9190613b01565b60405180910390f35b6104ef60048036038101906104ea9190613aa6565b611e77565b6040516104fc9190613b01565b60405180910390f35b61051f600480360381019061051a9190613c65565b611e9a565b005b6105296120a3565b6040516105369190613b2b565b60405180910390f35b61055960048036038101906105549190613c92565b6120ad565b6040516105669190613b2b565b60405180910390f35b610577612134565b60405161058491906139be565b60405180910390f35b6105a760048036038101906105a29190613cd2565b6123a4565b6040516105b49190613b01565b60405180910390f35b6105c561266a565b6040516105d29190613b01565b60405180910390f35b6105f560048036038101906105f09190613a43565b612965565b005b60606008805461060690613d41565b80601f016020809104026020016040519081016040528092919081815260200182805461063290613d41565b801561067f5780601f106106545761010080835404028352916020019161067f565b820191906000526020600020905b81548152906001019060200180831161066257829003601f168201915b5050505050905090565b610691612acf565b73ffffffffffffffffffffffffffffffffffffffff166106af611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e65728152509061073d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073491906139be565b60405180910390fd5b50600115158173ffffffffffffffffffffffffffffffffffffffff1663e4cea52e306040518263ffffffff1660e01b815260040161077b9190613c0c565b602060405180830381865afa158015610798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bc9190613d9e565b1515146040518060600160405280602e8152602001613f93602e913990610819576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081091906139be565b60405180910390fd5b50600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036108b65780600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506109f6565b60011515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b235199306040518263ffffffff1660e01b81526004016109159190613c0c565b602060405180830381865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109569190613d9e565b1515146040518060600160405280603681526020016140c660369139906109b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109aa91906139be565b60405180910390fd5b5080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600080610a04612acf565b9050610a11818585612ad7565b600191505092915050565b6000600554905090565b600760019054906101000a900460ff1681565b600080610a44612acf565b9050600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311156040518060600160405280603a8152602001613f2d603a913990610b20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1791906139be565b60405180910390fd5b50610b2c858285612d18565b610b37858585612ddd565b60019150509392505050565b6000600a60009054906101000a900460ff16905090565b600080610b65612acf565b9050610bf9818585600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bf49190613dfa565b612ad7565b600191505092915050565b600073ffffffffffffffffffffffffffffffffffffffff16610c24612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f4f7261636c653a2053656e6465722063616e206e6f742062652030783000000081525090610cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caa91906139be565b60405180910390fd5b50610cc4610cbf612acf565b6119ed565b80610d235750610cd2612acf565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6040518060600160405280602b8152602001614059602b913990610d7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7491906139be565b60405180910390fd5b50610d8882826130dd565b5050565b610d9d610d97612acf565b82613477565b50565b600760009054906101000a900460ff1681565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600073ffffffffffffffffffffffffffffffffffffffff16610e1e612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601581526020017f4f7261636c653a204e6f206f7261636c6520736574000000000000000000000081525090610ead576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea491906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610eef612acf565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280601e81526020017f4f7261636c653a20596f7520617265206e6f7420746865206f7261636c65000081525090610f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7491906139be565b60405180910390fd5b50600760019054906101000a900460ff16156040518060600160405280602181526020016140846021913990610fe9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe091906139be565b60405180910390fd5b506001600760016101000a81548160ff0219169083151502179055507f65521a0db60169023ef4718a72c0d13775b298d16968758a685e034d2ca1c87560405160405180910390a16040518060400160405280600f81526020017f456e61626c6564204275726e696e670000000000000000000000000000000000815250905090565b600073ffffffffffffffffffffffffffffffffffffffff1661108c612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601581526020017f4f7261636c653a204e6f206f7261636c652073657400000000000000000000008152509061111b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111291906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661115d612acf565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280601e81526020017f4f7261636c653a20596f7520617265206e6f7420746865206f7261636c650000815250906111eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e291906139be565b60405180910390fd5b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601f81526020017f4f776e61626c653a20416464726573732063616e206e6f74206265203078300081525090611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128b91906139be565b60405180910390fd5b5061129e816119ed565b156040518060600160405280602b8152602001613fe6602b9139906112f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f091906139be565b60405180910390fd5b508073ffffffffffffffffffffffffffffffffffffffff167f29cf5705e8ef0d06742df5af365503ef11d8886f3122b65edca07d64cf3d2f0a60405160405180910390a280600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006113ca612acf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156040518060600160405280603a8152602001613f2d603a913990611462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145991906139be565b60405180910390fd5b506114758261146f612acf565b83612d18565b61147f8282613477565b5050565b6060600073ffffffffffffffffffffffffffffffffffffffff166114a5612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601581526020017f4f7261636c653a204e6f206f7261636c6520736574000000000000000000000081525090611534576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152b91906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611576612acf565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280601e81526020017f4f7261636c653a20596f7520617265206e6f7420746865206f7261636c65000081525090611604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fb91906139be565b60405180910390fd5b50600760009054906101000a900460ff16604051806060016040528060228152602001614147602291399061166f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166691906139be565b60405180910390fd5b506000600760006101000a81548160ff0219169083151502179055507faf79b4370f6af9d950564bbe6b81f7f0834c003c455db9248f4e55e6bf865eb760405160405180910390a16040518060400160405280601081526020017f44697361626c6564204d696e74696e6700000000000000000000000000000000815250905090565b60006116fc612acf565b73ffffffffffffffffffffffffffffffffffffffff1661171a611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572815250906117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179f91906139be565b60405180910390fd5b50600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156040518060600160405280602c8152602001613f67602c913990611856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184d91906139be565b60405180910390fd5b5060011515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e4cea52e306040518263ffffffff1660e01b81526004016118b69190613c0c565b602060405180830381865afa1580156118d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f79190613d9e565b1515146040518060600160405280602e8152602001613f93602e913990611954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194b91906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a97854f56040518163ffffffff1660e01b81526004016020604051808303816000875af11580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e89190613d9e565b905090565b60008173ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060098054611a7f90613d41565b80601f0160208091040260200160405190810160405280929190818152602001828054611aab90613d41565b8015611af85780601f10611acd57610100808354040283529160200191611af8565b820191906000526020600020905b815481529060010190602001808311611adb57829003601f168201915b5050505050905090565b6060600073ffffffffffffffffffffffffffffffffffffffff16611b24612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601581526020017f4f7261636c653a204e6f206f7261636c6520736574000000000000000000000081525090611bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611baa91906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611bf5612acf565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280601e81526020017f4f7261636c653a20596f7520617265206e6f7420746865206f7261636c65000081525090611c83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7a91906139be565b60405180910390fd5b50600760019054906101000a900460ff166040518060600160405280602281526020016140376022913990611cee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce591906139be565b60405180910390fd5b506000600760016101000a81548160ff0219169083151502179055507f9bdcd7b2de47aadf92905c62d9ed9e7d1f02a42a8187d0549f686c76148c7c3560405160405180910390a16040518060400160405280601081526020017f44697361626c6564204275726e696e6700000000000000000000000000000000815250905090565b600080611d7c612acf565b90506000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905083811015604051806060016040528060258152602001613fc16025913990611e5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5491906139be565b60405180910390fd5b50611e6b8286868403612ad7565b60019250505092915050565b600080611e82612acf565b9050611e8f818585612ddd565b600191505092915050565b611ea2612acf565b73ffffffffffffffffffffffffffffffffffffffff16611ec0611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e657281525090611f4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4591906139be565b60405180910390fd5b5080600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090611ff8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fef91906139be565b60405180910390fd5b506000471160405180606001604052806029815260200161411e6029913990612057576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204e91906139be565b60405180910390fd5b508173ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561209e573d6000803e3d6000fd5b505050565b6000600654905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6060600073ffffffffffffffffffffffffffffffffffffffff16612156612acf565b73ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601581526020017f4f7261636c653a204e6f206f7261636c65207365740000000000000000000000815250906121e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121dc91906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612227612acf565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280601e81526020017f4f7261636c653a20596f7520617265206e6f7420746865206f7261636c650000815250906122b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ac91906139be565b60405180910390fd5b50600760009054906101000a900460ff16156040518060600160405280602181526020016140a56021913990612321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231891906139be565b60405180910390fd5b506001600760006101000a81548160ff0219169083151502179055507f38cb976174a5c48b8f7b2f07f69b47c271ba7f019948915dc12efb770c2a542c60405160405180910390a16040518060400160405280600f81526020017f456e61626c6564204d696e74696e670000000000000000000000000000000000815250905090565b60006123ae612acf565b73ffffffffffffffffffffffffffffffffffffffff166123cc611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e65728152509061245a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245191906139be565b60405180910390fd5b5081600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090612504576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fb91906139be565b60405180910390fd5b5060008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016125409190613c0c565b602060405180830381865afa15801561255d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125819190613e43565b90506000811160405180606001604052806029815260200161411e60299139906125e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d891906139be565b60405180910390fd5b508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b815260040161261d929190613ecf565b6020604051808303816000875af115801561263c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126609190613d9e565b9250505092915050565b6000612674612acf565b73ffffffffffffffffffffffffffffffffffffffff16612692611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e657281525090612720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271791906139be565b60405180910390fd5b50600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156040518060600160405280602c8152602001613f67602c9139906127ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c591906139be565b60405180910390fd5b5060011515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e4cea52e306040518263ffffffff1660e01b815260040161282e9190613c0c565b602060405180830381865afa15801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190613d9e565b1515146040518060600160405280602e8152602001613f93602e9139906128cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c391906139be565b60405180910390fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166375a1bb776040518163ffffffff1660e01b81526004016020604051808303816000875af115801561293c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129609190613d9e565b905090565b61296d612acf565b73ffffffffffffffffffffffffffffffffffffffff1661298b611a47565b73ffffffffffffffffffffffffffffffffffffffff16146040518060400160405280602081526020017f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e657281525090612a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1091906139be565b60405180910390fd5b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601f81526020017f4f776e61626c653a20416464726573732063616e206e6f74206265203078300081525090612ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab991906139be565b60405180910390fd5b50612acc8161386a565b50565b600033905090565b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090612b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7791906139be565b60405180910390fd5b5082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090612c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2191906139be565b60405180910390fd5b5082600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051612d099190613b2b565b60405180910390a35050505050565b6000612d2484846120ad565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612dd757818110156040518060400160405280601d81526020017f546f6b656e3a20496e73756666696369656e7420616c6c6f77616e636500000081525090612dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dbf91906139be565b60405180910390fd5b50612dd68484848403612ad7565b5b50505050565b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090612e86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e7d91906139be565b60405180910390fd5b5082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f742062652030783000000081525090612f30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f2791906139be565b60405180910390fd5b506000600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050838110156040518060600160405280602681526020016140116026913990612fd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fca91906139be565b60405180910390fd5b50838103600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546130699190613dfa565b925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516130cd9190613b2b565b60405180910390a3505050505050565b600760009054906101000a900460ff166040518060400160405280601a81526020017f546f6b656e3a204d696e74696e672069732064697361626c656400000000000081525090613164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315b91906139be565b60405180910390fd5b5081600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f74206265203078300000008152509061320e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320591906139be565b60405180910390fd5b50816006546005546aefe1e3804425306200000061322c9190613ef8565b6132369190613ef8565b8111156040518060400160405280601e81526020017f546f6b656e3a20416d6f756e742069732061626f766520746865206361700000815250906132b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132a791906139be565b60405180910390fd5b5082600560008282546132c39190613dfa565b9250508190555082600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546133199190613dfa565b925050819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161337e9190613b2b565b60405180910390a36000613390612acf565b905061339b816119ed565b1561340a578473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fc3b8ae385c02b938fbbbd694d1da0761f755ee2c942f26bbfc6723c986d31b9b866040516133fd9190613b2b565b60405180910390a3613470565b8473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f6de547f9e15aa8eb4e186426345d83ce982c2e4a1f811761da74ff56a2a23731866040516134679190613b2b565b60405180910390a35b5050505050565b600760019054906101000a900460ff166040518060400160405280601a81526020017f546f6b656e3a204275726e696e672069732064697361626c6564000000000000815250906134fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134f591906139be565b60405180910390fd5b5081600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156040518060400160405280601d81526020017f546f6b656e3a20416464726573732063616e206e6f7420626520307830000000815250906135a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161359f91906139be565b60405180910390fd5b506000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156040518060600160405280602281526020016140fc602291399061364b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161364291906139be565b60405180910390fd5b50828103600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600560008282546136a49190613ef8565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516137099190613b2b565b60405180910390a3600061371b612acf565b9050613726816119ed565b8061377e5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156137ed578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fabf8a0bc0c6341b64dfa026a551cda9d3beb0e0525758303026bacbc11ad1d8c866040516137e09190613b2b565b60405180910390a3613863565b836006600082825401925050819055508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fe89157ccd232bcbcdb51b17ee427bcd37c60c0d26c4d97408b1309a9333c636e8660405161385a9190613b2b565b60405180910390a35b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561396857808201518184015260208101905061394d565b60008484015250505050565b6000601f19601f8301169050919050565b60006139908261392e565b61399a8185613939565b93506139aa81856020860161394a565b6139b381613974565b840191505092915050565b600060208201905081810360008301526139d88184613985565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613a10826139e5565b9050919050565b613a2081613a05565b8114613a2b57600080fd5b50565b600081359050613a3d81613a17565b92915050565b600060208284031215613a5957613a586139e0565b5b6000613a6784828501613a2e565b91505092915050565b6000819050919050565b613a8381613a70565b8114613a8e57600080fd5b50565b600081359050613aa081613a7a565b92915050565b60008060408385031215613abd57613abc6139e0565b5b6000613acb85828601613a2e565b9250506020613adc85828601613a91565b9150509250929050565b60008115159050919050565b613afb81613ae6565b82525050565b6000602082019050613b166000830184613af2565b92915050565b613b2581613a70565b82525050565b6000602082019050613b406000830184613b1c565b92915050565b600080600060608486031215613b5f57613b5e6139e0565b5b6000613b6d86828701613a2e565b9350506020613b7e86828701613a2e565b9250506040613b8f86828701613a91565b9150509250925092565b600060ff82169050919050565b613baf81613b99565b82525050565b6000602082019050613bca6000830184613ba6565b92915050565b600060208284031215613be657613be56139e0565b5b6000613bf484828501613a91565b91505092915050565b613c0681613a05565b82525050565b6000602082019050613c216000830184613bfd565b92915050565b6000613c32826139e5565b9050919050565b613c4281613c27565b8114613c4d57600080fd5b50565b600081359050613c5f81613c39565b92915050565b600060208284031215613c7b57613c7a6139e0565b5b6000613c8984828501613c50565b91505092915050565b60008060408385031215613ca957613ca86139e0565b5b6000613cb785828601613a2e565b9250506020613cc885828601613a2e565b9150509250929050565b60008060408385031215613ce957613ce86139e0565b5b6000613cf785828601613a2e565b9250506020613d0885828601613c50565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613d5957607f821691505b602082108103613d6c57613d6b613d12565b5b50919050565b613d7b81613ae6565b8114613d8657600080fd5b50565b600081519050613d9881613d72565b92915050565b600060208284031215613db457613db36139e0565b5b6000613dc284828501613d89565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613e0582613a70565b9150613e1083613a70565b9250828201905080821115613e2857613e27613dcb565b5b92915050565b600081519050613e3d81613a7a565b92915050565b600060208284031215613e5957613e586139e0565b5b6000613e6784828501613e2e565b91505092915050565b6000819050919050565b6000613e95613e90613e8b846139e5565b613e70565b6139e5565b9050919050565b6000613ea782613e7a565b9050919050565b6000613eb982613e9c565b9050919050565b613ec981613eae565b82525050565b6000604082019050613ee46000830185613ec0565b613ef16020830184613b1c565b9392505050565b6000613f0382613a70565b9150613f0e83613a70565b9250828203905081811115613f2657613f25613dcb565b5b9291505056fe546f6b656e3a20596f7520617265206e6f7420617070726f76656420746f207370656e64207468697320616d6f756e74206f6620746f6b656e734f7261636c653a20536574207468652068616e646c6572206f7261636c6520616464726573732066697273744f7261636c653a20596f757220746f6b656e206973206e6f7420616c6c6f77656420696e204a4d20427269646765546f6b656e3a2044656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f7261636c653a204164647265737320697320616c72656164792061204272696467652048616e646c6572546f6b656e3a205472616e7366657220616d6f756e7420657863656564732062616c616e6365546f6b656e3a204275726e696e6720697320616c72656164792064697361626c65644f7261636c653a2043616c6c6572206973206e6f7420746865206f7261636c65206f722068616e646c6572546f6b656e3a204275726e696e6720697320616c726561647920656e61626c6564546f6b656e3a204d696e74696e6720697320616c726561647920656e61626c65644f7261636c653a204e6f7420616c6c6f77656420746f2065646974207468652048616e646c6572204f7261636c652061646472657373546f6b656e3a204275726e20616d6f756e7420657863656564732062616c616e6365546f6b656e3a205468652062616c616e6365206d7573742062652067726561746572207468616e2030546f6b656e3a204d696e74696e6720697320616c72656164792064697361626c6564a2646970667358221220202030905529ca65af30a9e71914841b4b02959ce5c2982ff92a874327a369e464736f6c63430008100033

Verified Source Code Partial Match

Compiler: v0.8.16+commit.07a7930e EVM: london Optimization: No
GOLCOIN.sol 762 lines
/**
 *Submitted for verification at BscScan.com on 2022-08-18
*/

/**
 *Submitted for verification at BscScan.com on 2022-08-18
// */
//                   TOKENOMICS 
// ERC Wallet	       percentage	        amount
// Agartha	            24.14%	         GOL17,500,000.00
// Mining	            15.52%	         GOL11,250,000.00
// NFT	                17.24%	         GOL12,500,000.00
// Gol Blockchain	    27.59%	         GOL20,000,000.00
// Rest	                15.52%	         GOL11,250,000.00
// total ERC wallet	    25.00%	         GOL72,500,000.00








// ///File: contracts/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
    
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/Context.sol

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// File: contracts/Errors.sol


pragma solidity ^0.8.0;

library Errors {
    string constant MINT_DISABLED = "Token: Minting is disabled";
    string constant BURN_DISABLED = "Token: Burning is disabled";
    string constant MINT_ALREADY_ENABLED = "Token: Minting is already enabled";
    string constant MINT_ALREADY_DISABLED = "Token: Minting is already disabled";
    string constant BURN_ALREADY_ENABLED = "Token: Burning is already enabled";
    string constant BURN_ALREADY_DISABLED = "Token: Burning is already disabled";
    string constant NON_ZERO_ADDRESS = "Token: Address can not be 0x0";
    string constant NOT_APPROVED = "Token: You are not approved to spend this amount of tokens";
    string constant TRANSFER_EXCEEDS_BALANCE = "Token: Transfer amount exceeds balance";
    string constant BURN_EXCEEDS_BALANCE = "Token: Burn amount exceeds balance";
    string constant INSUFFICIENT_ALLOWANCE = "Token: Insufficient allowance";
    string constant NOTHING_TO_WITHDRAW = "Token: The balance must be greater than 0";
    string constant ALLOWANCE_BELOW_ZERO = "Token: Decreased allowance below zero";
    string constant ABOVE_CAP = "Token: Amount is above the cap";

    string constant NOT_OWNER = "Ownable: Caller is not the owner";
    string constant OWNABLE_NON_ZERO_ADDRESS = "Ownable: Address can not be 0x0";

    string constant NOT_ORACLE_OR_HANDLER = "Oracle: Caller is not the oracle or handler";
    string constant ADDRESS_IS_HANDLER = "Oracle: Address is already a Bridge Handler";
    string constant ADDRESS_IS_NOT_HANDLER = "Oracle: Address is not a Bridge Handler";
    string constant TOKEN_NOT_ALLOWED_IN_BRIDGE = "Oracle: Your token is not allowed in JM Bridge";
    string constant SET_HANDLER_ORACLE_FIRST = "Oracle: Set the handler oracle address first";
    string constant ORACLE_NOT_SET = "Oracle: No oracle set";
    string constant IS_NOT_ORACLE = "Oracle: You are not the oracle";
    string constant NOT_ALLOWED_TO_EDIT_ORACLE = "Oracle: Not allowed to edit the Handler Oracle address";
    string constant NON_ZERO_ADDRESS_SENDER = "Oracle: Sender can not be 0x0";
}

// File: contracts/Ownable.sol

// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    
    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), Errors.NOT_OWNER);
        _;
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), Errors.OWNABLE_NON_ZERO_ADDRESS);
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File: contracts/BridgeOracle.sol


pragma solidity ^0.8.0;

interface HandlerOracle {
    function approveHandlerChange() external returns (bool);
    function approveManualMint() external returns (bool);
    function isTokenContract(address tokenContract) external view returns (bool);
    function isAllowedToChangeOracle(address tokenContract) external view returns (bool);
}

abstract contract BridgeOracle is Ownable {
    HandlerOracle internal _handlerOracle;
    address private _bridgeHandler;

    event BridgeHandlerSet(address indexed added);

    /**
     * @dev Returns true if the address is a bridge handler.
     */
    function isBridgeHandler(address account) public view returns (bool) {
        return _bridgeHandler == account;
    }
    
    /**
     * @dev Throws if called by any account other than the oracle or a bridge handler.
     */
    modifier onlyOracleAndBridge() {
        require(_msgSender() != address(0), Errors.NON_ZERO_ADDRESS_SENDER);
        require(isBridgeHandler(_msgSender()) || address(_handlerOracle) == _msgSender(), Errors.NOT_ORACLE_OR_HANDLER);
        _;
    }
    
    modifier onlyHandlerOracle() {
        require(_msgSender() != address(0), Errors.ORACLE_NOT_SET);
        require(_msgSender() == address(_handlerOracle), Errors.IS_NOT_ORACLE);
        _;
    }

    function approveOracleToSetHandler() public onlyOwner returns (bool) {
        require(address(_handlerOracle) != address(0), Errors.SET_HANDLER_ORACLE_FIRST);
        require(_handlerOracle.isTokenContract(address(this)) == true, Errors.TOKEN_NOT_ALLOWED_IN_BRIDGE);

        return _handlerOracle.approveHandlerChange();
    }
    
    function approveOracleToManualMint() public onlyOwner returns (bool) {
        require(address(_handlerOracle) != address(0), Errors.SET_HANDLER_ORACLE_FIRST);
        require(_handlerOracle.isTokenContract(address(this)) == true, Errors.TOKEN_NOT_ALLOWED_IN_BRIDGE);

        return _handlerOracle.approveManualMint();
    }

    /**
     * @dev Add handler address (`account`) that can mint and burn.
     * Can only be called by the 'Handler Oracle Contract' after it was approved.
     */
    function setBridgeHandler(address account) public onlyHandlerOracle {
        require(account != address(0), Errors.OWNABLE_NON_ZERO_ADDRESS);
        require(!isBridgeHandler(account), Errors.ADDRESS_IS_HANDLER);

        emit BridgeHandlerSet(account);
        _bridgeHandler = account;
    }

    function setHandlerOracle(address newHandlerOracle) public onlyOwner {
        require(HandlerOracle(newHandlerOracle).isTokenContract(address(this)) == true, Errors.TOKEN_NOT_ALLOWED_IN_BRIDGE);

        if ( address(_handlerOracle) == address(0) ) {
            _handlerOracle = HandlerOracle(newHandlerOracle);
        } else {
            require(_handlerOracle.isAllowedToChangeOracle(address(this)) == true, Errors.NOT_ALLOWED_TO_EDIT_ORACLE);

            _handlerOracle = HandlerOracle(newHandlerOracle);
        }
    }
}

// File: contracts/GOLCOIN.sol

// @Title GOLCOIN Bridged Token
// @Author Team GOLCOIN

pragma solidity ^0.8.0;


/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract GOLCOIN is BridgeOracle, IERC20 {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private constant _max = 290000000 * 10**18;
    uint256 private _totalSupply;
    uint256 private _totalBurned;

    bool public isMintingEnabled = false;
    bool public isBurningEnabled = true;
    
    string private _name = "GOLCOIN";
    string private _symbol = "GOLC";
    uint8 private _decimals = 18;

    constructor() {
        uint256 initialAmount = 72500000 * 10**18;
        _totalSupply = initialAmount;
        _balances[_msgSender()] = initialAmount;
    }

    modifier mintingEnabled() {
        require(isMintingEnabled, Errors.MINT_DISABLED);
        _;
    }
    
    modifier burningEnabled() {
        require(isBurningEnabled, Errors.BURN_DISABLED);
        _;
    }
    
    modifier nonZeroAddress(address _account) {
        require(_account != address(0), Errors.NON_ZERO_ADDRESS);
        _;
    }
    
    modifier belowCap(uint256 amount) {
        require(amount <= (_max - _totalSupply - _totalBurned), Errors.ABOVE_CAP);
        _;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    function totalBurned() public view returns (uint256) {
        return _totalBurned;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }
    
    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
        address spender = _msgSender();
        require(amount <= _allowances[from][spender], Errors.NOT_APPROVED);
        
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, Errors.ALLOWANCE_BELOW_ZERO);
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }
    
    function enableMinting() public onlyHandlerOracle returns (string memory retMsg) {
        require(!isMintingEnabled, Errors.MINT_ALREADY_ENABLED);
        
        isMintingEnabled = true;
        emit MintingEnabled();
        retMsg = "Enabled Minting";
    }

    function disableMinting() public onlyHandlerOracle returns (string memory retMsg) {
        require(isMintingEnabled, Errors.MINT_ALREADY_DISABLED);
        
        isMintingEnabled = false;
        emit MintingDisabled();
        retMsg = "Disabled Minting";
    }
    
    function enableBurning() public onlyHandlerOracle returns (string memory retMsg) {
        require(!isBurningEnabled, Errors.BURN_ALREADY_ENABLED);
        
        isBurningEnabled = true;
        emit BurningEnabled();
        retMsg = "Enabled Burning";
    }

    function disableBurning() public onlyHandlerOracle returns (string memory retMsg) {
        require(isBurningEnabled, Errors.BURN_ALREADY_DISABLED);
        
        isBurningEnabled = false;
        emit BurningDisabled();
        retMsg = "Disabled Burning";
    }
    
    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal nonZeroAddress(from) nonZeroAddress(to) {
        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, Errors.TRANSFER_EXCEEDS_BALANCE);
        unchecked { _balances[from] = fromBalance - amount; }
        _balances[to] += amount;

        emit Transfer(from, to, amount);
    }
    
    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must be the bridge or owner.
     */
    function mint(address to, uint256 amount) public onlyOracleAndBridge {
        _mint(to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - minting and burning must be enabled.
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal mintingEnabled nonZeroAddress(account) belowCap(amount) {
        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        address mintBy = _msgSender();
        if ( isBridgeHandler(mintBy) ) {
            emit BridgeMint(mintBy, account, amount);
        } else {
            emit ManualMint(mintBy, account, amount);
        }
    }
    
    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal burningEnabled nonZeroAddress(account) {
        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, Errors.BURN_EXCEEDS_BALANCE);
        unchecked { _balances[account] = accountBalance - amount; }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        address burnBy = _msgSender();
        if ( isBridgeHandler(burnBy) || burnBy == address(_handlerOracle) ) {
            emit BridgeBurn(account, burnBy, amount);
        } else {
            unchecked { _totalBurned += amount; }
            emit NormalBurn(account, burnBy, amount);
        }
    }
    
    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This private function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) private nonZeroAddress(owner) nonZeroAddress(spender) {
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }
    
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public {
        _burn(_msgSender(), amount);
    }

    
    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public {
        require(amount <= _allowances[account][_msgSender()], Errors.NOT_APPROVED);
        
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
    
    function withdrawBASE(address payable recipient) external onlyOwner nonZeroAddress(recipient) {
        require(address(this).balance > 0, Errors.NOTHING_TO_WITHDRAW);

        recipient.transfer(address(this).balance);
    }

    function withdrawERC20token(address _token, address payable recipient) external onlyOwner nonZeroAddress(recipient) returns (bool) {
        uint256 bal = IERC20(_token).balanceOf(address(this));
        require(bal > 0, Errors.NOTHING_TO_WITHDRAW);

        return IERC20(_token).transfer(recipient, bal);
    }


    
    event BridgeMint(address indexed by, address indexed to, uint256 value);
    event ManualMint(address indexed by, address indexed to, uint256 value);
    event BridgeBurn(address indexed from, address indexed by, uint256 value);
    event NormalBurn(address indexed from, address indexed to, uint256 value);
    event MintingEnabled();
    event MintingDisabled();
    event BurningEnabled();
    event BurningDisabled();
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
isBridgeHandler 0x88ee3b06 → bool
isBurningEnabled 0x20c354bd → bool
isMintingEnabled 0x55c7ba14 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalBurned 0xd89135cd → uint256
totalSupply 0x18160ddd → uint256

Write Contract 19 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
approveOracleToManualMint 0x859e0d3a
No parameters
returns: bool
approveOracleToSetHandler 0xedf07bb5
No parameters
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disableBurning 0x98603cca
No parameters
returns: string
disableMinting 0x7e5cd5c1
No parameters
returns: string
enableBurning 0x7581a8e6
No parameters
returns: string
enableMinting 0xe797ec1b
No parameters
returns: string
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x40c10f19
address to
uint256 amount
setBridgeHandler 0x75eb259b
address account
setHandlerOracle 0x07aa037a
address newHandlerOracle
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
withdrawBASE 0xb19f2fc4
address recipient
withdrawERC20token 0xe7e11786
address _token
address recipient
returns: bool

Recent Transactions

No transactions found for this address