Address Contract Partially Verified
Address
0xAef563ce53f153edF9C676910B3E91D56573b88c
Balance
0.300000 ETH
Nonce
1
Code Size
15192 bytes
Creator
0x26dAEE1d...11Ff at tx 0xe8802249...56c93f
Indexed Transactions
0
Contract Bytecode
15192 bytes
0x6080604052600436106100c65760003560e01c8063a5de36191161007f578063d6b7277211610059578063d6b72772146102ff578063d9caed1214610328578063f2fde38b14610351578063ff3367081461037a57610125565b8063a5de36191461026c578063c45a015514610297578063c87234b9146102c257610125565b80634a6ba2f11461017f5780634f7f8870146101a857806379ba5097146101c4578063833b463f146101db5780638da5cb5b146102045780639d0c025b1461022f57610125565b36610125576000341115610123573373ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c43460405161011a9190612450565b60405180910390a25b005b600034111561017d573373ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4346040516101749190612450565b60405180910390a25b005b34801561018b57600080fd5b506101a660048036038101906101a19190612731565b6103a3565b005b6101c260048036038101906101bd9190612830565b6108e0565b005b3480156101d057600080fd5b506101d961125e565b005b3480156101e757600080fd5b5061020260048036038101906101fd9190612915565b61143c565b005b34801561021057600080fd5b50610219611712565b604051610226919061299f565b60405180910390f35b34801561023b57600080fd5b50610256600480360381019061025191906129ba565b61173b565b6040516102639190612a98565b60405180910390f35b34801561027857600080fd5b50610281611845565b60405161028e9190612b62565b60405180910390f35b3480156102a357600080fd5b506102ac6118d3565b6040516102b9919061299f565b60405180910390f35b3480156102ce57600080fd5b506102e960048036038101906102e49190612b84565b6118fd565b6040516102f69190612bd3565b60405180910390f35b34801561030b57600080fd5b5061032660048036038101906103219190612bee565b611939565b005b34801561033457600080fd5b5061034f600480360381019061034a9190612bee565b611b78565b005b34801561035d57600080fd5b5061037860048036038101906103739190612c41565b612002565b005b34801561038657600080fd5b506103a1600480360381019061039c9190612c9a565b612132565b005b6103ab6122cf565b73ffffffffffffffffffffffffffffffffffffffff166103c9611712565b73ffffffffffffffffffffffffffffffffffffffff161461041f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041690612d37565b60405180910390fd5b600082511415610464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045b90612da3565b60405180910390fd5b6000815114156104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a090612da3565b60405180910390fd5b80518251146104ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e490612e0f565b60405180910390fd5b60005b82518110156108db57600083828151811061050e5761050d612e2f565b5b6020026020010151905082828151811061052b5761052a612e2f565b5b6020026020010151156106a657600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106a1576003819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508282815181106105ff576105fe612e2f565b5b6020026020010151600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33960405160405180910390a25b6108c7565b60005b6003805490508110156108c5578173ffffffffffffffffffffffffffffffffffffffff16600382815481106106e1576106e0612e2f565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156108b2576003600160038054905061073c9190612e8d565b8154811061074d5761074c612e2f565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166003828154811061078c5761078b612e2f565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060038054806107e6576107e5612ec1565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690558173ffffffffffffffffffffffffffffffffffffffff167fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f60405160405180910390a26108c5565b80806108bd90612ef0565b9150506106a9565b505b5080806108d390612ef0565b9150506104f0565b505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109739190612f4e565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f68016b76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a089190612f4e565b90506000821115610a5d5781610a1c6122d7565b14610a5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5390612fc7565b60405180910390fd5b5b6000600560008b8152602001908152602001600020905060008160030160149054906101000a900460ff1660ff1611610acb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac290613033565b60405180910390fd5b4281600001541115610b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b099061309f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b799061310b565b60405180910390fd5b600089898989604051602001610b9b9493929190613194565b604051602081830303815290604052805190602001209050610c03868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508360010154836122df565b610c42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c399061322e565b60405180910390fd5b610c4c8b8b6118fd565b15610c8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c839061329a565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168360020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610cee57479050610d8f565b8260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d4b919061299f565b602060405180830381865afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c9190612f4e565b90505b80891115610dd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc990613306565b60405180910390fd5b610ddc8c8c612395565b6000851115610f62576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c0116ba6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e789190612f4e565b905060008187610e889190612e8d565b9050600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16838990604051610ed590613357565b600060405180830381858888f193505050503d8060008114610f13576040519150601f19603f3d011682016040523d82523d6000602084013e610f18565b606091505b509150915081610f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f54906133b8565b60405180910390fd5b505050505b6000881115611018578260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610fb36122cf565b308b6040518463ffffffff1660e01b8152600401610fd3939291906133d8565b6020604051808303816000875af1158015610ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110169190613424565b505b600073ffffffffffffffffffffffffffffffffffffffff168360020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156110e2578973ffffffffffffffffffffffffffffffffffffffff1689859060405161109790613357565b600060405180830381858888f193505050503d80600081146110d5576040519150601f19603f3d011682016040523d82523d6000602084013e6110da565b606091505b505050611186565b8260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b8b6040518363ffffffff1660e01b8152600401611141929190613451565b6020604051808303816000875af1158015611160573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111849190613424565b505b8260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167ff409ae64b6834450b7c7d1a871be39b3e8e5e1410392dece1609e952a0bbed258f8f8e8e604051611248949392919061347a565b60405180910390a4505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661129f6122cf565b73ffffffffffffffffffffffffffffffffffffffff16146112f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ec90613531565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b6114446122cf565b73ffffffffffffffffffffffffffffffffffffffff16611462611712565b73ffffffffffffffffffffffffffffffffffffffff1614806114d457506004600061148b6122cf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150a9061359d565b60405180910390fd5b600060056000878152602001908152602001600020600001541461156c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156390613609565b60405180910390fd5b60008414156115b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a790613675565b60405180910390fd5b836005600087815260200190815260200160002060000181905550826005600087815260200190815260200160002060010181905550816005600087815260200190815260200160002060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806005600087815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016005600087815260200190815260200160002060030160146101000a81548160ff021916908360ff1602179055507f3794e18b3f4d3de301daa976248a2476083cf6ae9075916ca3746ec7c07acbd785600560008881526020019081526020016000206040516117039291906137f2565b60405180910390a15050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6117436123d6565b600560008381526020019081526020016000206040518060a001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160149054906101000a900460ff1660ff1660ff16815250509050919050565b606060038054806020026020016040519081016040528092919081815260200182805480156118c957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161187f575b5050505050905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060066000848152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16905092915050565b6119416122cf565b73ffffffffffffffffffffffffffffffffffffffff1661195f611712565b73ffffffffffffffffffffffffffffffffffffffff1614806119d15750600460006119886122cf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611a10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a079061359d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a779061388d565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3084846040518463ffffffff1660e01b8152600401611abd939291906133d8565b600060405180830381600087803b158015611ad757600080fd5b505af1158015611aeb573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16611b256122cf565b73ffffffffffffffffffffffffffffffffffffffff167fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa246001604051611b6b91906138f2565b60405180910390a4505050565b611b806122cf565b73ffffffffffffffffffffffffffffffffffffffff16611b9e611712565b73ffffffffffffffffffffffffffffffffffffffff161480611c10575060046000611bc76122cf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611c4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c469061359d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611cbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb69061397f565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611cfd57479050611d7a565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611d36919061299f565b602060405180830381865afa158015611d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d779190612f4e565b90505b80821115611dbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db4906139eb565b60405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f68016b76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e509190612f4e565b9050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611ef8578373ffffffffffffffffffffffffffffffffffffffff16838290604051611ead90613357565b600060405180830381858888f193505050503d8060008114611eeb576040519150601f19603f3d011682016040523d82523d6000602084013e611ef0565b606091505b505050611f78565b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b8152600401611f33929190613451565b6020604051808303816000875af1158015611f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f769190613424565b505b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16611fae6122cf565b73ffffffffffffffffffffffffffffffffffffffff167fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa2486604051611ff39190612450565b60405180910390a45050505050565b61200a6122cf565b73ffffffffffffffffffffffffffffffffffffffff16612028611712565b73ffffffffffffffffffffffffffffffffffffffff161461207e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161207590612d37565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e590613a7d565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61213a6122cf565b73ffffffffffffffffffffffffffffffffffffffff16612158611712565b73ffffffffffffffffffffffffffffffffffffffff1614806121ca5750600460006121816122cf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b612209576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122009061359d565b60405180910390fd5b600060056000848152602001908152602001600020600001541415612263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225a90613033565b60405180910390fd5b806005600084815260200190815260200160002060030160146101000a81548160ff021916908360ff1602179055507f2d1b07be957769da732a7889c8d02d769c80659ae1bd2302944e78380f06164482826040516122c3929190613aac565b60405180910390a15050565b600033905090565b600034905090565b60008082905060005b855181101561238757600086828151811061230657612305612e2f565b5b6020026020010151905080831161234757828160405160200161232a929190613af6565b604051602081830303815290604052805190602001209250612373565b808360405160200161235a929190613af6565b6040516020818303038152906040528051906020012092505b50808061237f90612ef0565b9150506122e8565b508381149150509392505050565b600160066000848152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6040518060a001604052806000815260200160008019168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600060ff1681525090565b6000819050919050565b61244a81612437565b82525050565b60006020820190506124656000830184612441565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6124cd82612484565b810181811067ffffffffffffffff821117156124ec576124eb612495565b5b80604052505050565b60006124ff61246b565b905061250b82826124c4565b919050565b600067ffffffffffffffff82111561252b5761252a612495565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061256c82612541565b9050919050565b61257c81612561565b811461258757600080fd5b50565b60008135905061259981612573565b92915050565b60006125b26125ad84612510565b6124f5565b905080838252602082019050602084028301858111156125d5576125d461253c565b5b835b818110156125fe57806125ea888261258a565b8452602084019350506020810190506125d7565b5050509392505050565b600082601f83011261261d5761261c61247f565b5b813561262d84826020860161259f565b91505092915050565b600067ffffffffffffffff82111561265157612650612495565b5b602082029050602081019050919050565b60008115159050919050565b61267781612662565b811461268257600080fd5b50565b6000813590506126948161266e565b92915050565b60006126ad6126a884612636565b6124f5565b905080838252602082019050602084028301858111156126d0576126cf61253c565b5b835b818110156126f957806126e58882612685565b8452602084019350506020810190506126d2565b5050509392505050565b600082601f8301126127185761271761247f565b5b813561272884826020860161269a565b91505092915050565b6000806040838503121561274857612747612475565b5b600083013567ffffffffffffffff8111156127665761276561247a565b5b61277285828601612608565b925050602083013567ffffffffffffffff8111156127935761279261247a565b5b61279f85828601612703565b9150509250929050565b6127b281612437565b81146127bd57600080fd5b50565b6000813590506127cf816127a9565b92915050565b600080fd5b60008083601f8401126127f0576127ef61247f565b5b8235905067ffffffffffffffff81111561280d5761280c6127d5565b5b6020830191508360208202830111156128295761282861253c565b5b9250929050565b600080600080600080600060c0888a03121561284f5761284e612475565b5b600061285d8a828b016127c0565b975050602061286e8a828b016127c0565b965050604061287f8a828b0161258a565b95505060606128908a828b016127c0565b94505060806128a18a828b016127c0565b93505060a088013567ffffffffffffffff8111156128c2576128c161247a565b5b6128ce8a828b016127da565b925092505092959891949750929550565b6000819050919050565b6128f2816128df565b81146128fd57600080fd5b50565b60008135905061290f816128e9565b92915050565b600080600080600060a0868803121561293157612930612475565b5b600061293f888289016127c0565b9550506020612950888289016127c0565b945050604061296188828901612900565b93505060606129728882890161258a565b92505060806129838882890161258a565b9150509295509295909350565b61299981612561565b82525050565b60006020820190506129b46000830184612990565b92915050565b6000602082840312156129d0576129cf612475565b5b60006129de848285016127c0565b91505092915050565b6129f081612437565b82525050565b6129ff816128df565b82525050565b612a0e81612561565b82525050565b600060ff82169050919050565b612a2a81612a14565b82525050565b60a082016000820151612a4660008501826129e7565b506020820151612a5960208501826129f6565b506040820151612a6c6040850182612a05565b506060820151612a7f6060850182612a05565b506080820151612a926080850182612a21565b50505050565b600060a082019050612aad6000830184612a30565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000612aeb8383612a05565b60208301905092915050565b6000602082019050919050565b6000612b0f82612ab3565b612b198185612abe565b9350612b2483612acf565b8060005b83811015612b55578151612b3c8882612adf565b9750612b4783612af7565b925050600181019050612b28565b5085935050505092915050565b60006020820190508181036000830152612b7c8184612b04565b905092915050565b60008060408385031215612b9b57612b9a612475565b5b6000612ba9858286016127c0565b9250506020612bba858286016127c0565b9150509250929050565b612bcd81612662565b82525050565b6000602082019050612be86000830184612bc4565b92915050565b600080600060608486031215612c0757612c06612475565b5b6000612c158682870161258a565b9350506020612c268682870161258a565b9250506040612c37868287016127c0565b9150509250925092565b600060208284031215612c5757612c56612475565b5b6000612c658482850161258a565b91505092915050565b612c7781612a14565b8114612c8257600080fd5b50565b600081359050612c9481612c6e565b92915050565b60008060408385031215612cb157612cb0612475565b5b6000612cbf858286016127c0565b9250506020612cd085828601612c85565b9150509250929050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612d21602083612cda565b9150612d2c82612ceb565b602082019050919050565b60006020820190508181036000830152612d5081612d14565b9050919050565b7f4339385661756c743a20456d70747920617267756d656e747300000000000000600082015250565b6000612d8d601983612cda565b9150612d9882612d57565b602082019050919050565b60006020820190508181036000830152612dbc81612d80565b9050919050565b7f4339385661756c743a20496e76616c696420617267756d656e74730000000000600082015250565b6000612df9601b83612cda565b9150612e0482612dc3565b602082019050919050565b60006020820190508181036000830152612e2881612dec565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e9882612437565b9150612ea383612437565b925082821015612eb657612eb5612e5e565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000612efb82612437565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f2e57612f2d612e5e565b5b600182019050919050565b600081519050612f48816127a9565b92915050565b600060208284031215612f6457612f63612475565b5b6000612f7284828501612f39565b91505092915050565b7f4339385661756c743a20496e76616c6964206665650000000000000000000000600082015250565b6000612fb1601583612cda565b9150612fbc82612f7b565b602082019050919050565b60006020820190508181036000830152612fe081612fa4565b9050919050565b7f4339385661756c743a20496e76616c6964206576656e74000000000000000000600082015250565b600061301d601783612cda565b915061302882612fe7565b602082019050919050565b6000602082019050818103600083015261304c81613010565b9050919050565b7f4339385661756c743a205363686564756c65206c6f636b656400000000000000600082015250565b6000613089601983612cda565b915061309482613053565b602082019050919050565b600060208201905081810360008301526130b88161307c565b9050919050565b7f4339385661756c743a20496e76616c6964207363686564756c65000000000000600082015250565b60006130f5601a83612cda565b9150613100826130bf565b602082019050919050565b60006020820190508181036000830152613124816130e8565b9050919050565b6000819050919050565b61314661314182612437565b61312b565b82525050565b60008160601b9050919050565b60006131648261314c565b9050919050565b600061317682613159565b9050919050565b61318e61318982612561565b61316b565b82525050565b60006131a08287613135565b6020820191506131b0828661317d565b6014820191506131c08285613135565b6020820191506131d08284613135565b60208201915081905095945050505050565b7f4339385661756c743a20496e76616c69642070726f6f66000000000000000000600082015250565b6000613218601783612cda565b9150613223826131e2565b602082019050919050565b600060208201905081810360008301526132478161320b565b9050919050565b7f4339385661756c743a2052656465656d65640000000000000000000000000000600082015250565b6000613284601283612cda565b915061328f8261324e565b602082019050919050565b600060208201905081810360008301526132b381613277565b9050919050565b7f4339385661756c743a20496e73756666696369656e7420746f6b656e00000000600082015250565b60006132f0601c83612cda565b91506132fb826132ba565b602082019050919050565b6000602082019050818103600083015261331f816132e3565b9050919050565b600081905092915050565b50565b6000613341600083613326565b915061334c82613331565b600082019050919050565b600061336282613334565b9150819050919050565b7f4339385661756c743a20556e61626c6520746f20636861726765206665650000600082015250565b60006133a2601e83612cda565b91506133ad8261336c565b602082019050919050565b600060208201905081810360008301526133d181613395565b9050919050565b60006060820190506133ed6000830186612990565b6133fa6020830185612990565b6134076040830184612441565b949350505050565b60008151905061341e8161266e565b92915050565b60006020828403121561343a57613439612475565b5b60006134488482850161340f565b91505092915050565b60006040820190506134666000830185612990565b6134736020830184612441565b9392505050565b600060808201905061348f6000830187612441565b61349c6020830186612441565b6134a96040830185612441565b6134b66060830184612441565b95945050505050565b7f4f776e61626c653a206f6e6c79206e6577206f776e65722063616e206163636560008201527f7074206f776e6572736869700000000000000000000000000000000000000000602082015250565b600061351b602c83612cda565b9150613526826134bf565b604082019050919050565b6000602082019050818103600083015261354a8161350e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420616e2061646d696e00600082015250565b6000613587601f83612cda565b915061359282613551565b602082019050919050565b600060208201905081810360008301526135b68161357a565b9050919050565b7f4339385661756c743a204576656e742065786973746564000000000000000000600082015250565b60006135f3601783612cda565b91506135fe826135bd565b602082019050919050565b60006020820190508181036000830152613622816135e6565b9050919050565b7f4339385661756c743a20496e76616c69642074696d657374616d700000000000600082015250565b600061365f601b83612cda565b915061366a82613629565b602082019050919050565b6000602082019050818103600083015261368e81613652565b9050919050565b60008160001c9050919050565b6000819050919050565b60006136bf6136ba83613695565b6136a2565b9050919050565b6000819050919050565b60006136e36136de83613695565b6136c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061371d61371883613695565b6136ea565b9050919050565b60008160a01c9050919050565b600060ff82169050919050565b600061375161374c83613724565b613731565b9050919050565b60a08201600080830154905061376d816136ac565b61377a60008601826129e7565b506001830154905061378b816136d0565b61379860208601826129f6565b50600283015490506137a98161370a565b6137b66040860182612a05565b50600383015490506137c78161370a565b6137d46060860182612a05565b506137de8161373e565b6137eb6080860182612a21565b5050505050565b600060c0820190506138076000830185612441565b6138146020830184613758565b9392505050565b7f4339385661756c743a2064657374696e6174696f6e206973207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613877602583612cda565b91506138828261381b565b604082019050919050565b600060208201905081810360008301526138a68161386a565b9050919050565b6000819050919050565b6000819050919050565b60006138dc6138d76138d2846138ad565b6138b7565b612437565b9050919050565b6138ec816138c1565b82525050565b600060208201905061390760008301846138e3565b92915050565b7f4339385661756c743a2044657374696e6174696f6e206973207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613969602583612cda565b91506139748261390d565b604082019050919050565b600060208201905081810360008301526139988161395c565b9050919050565b7f4339385661756c743a204e6f7420656e6f7567682062616c616e636500000000600082015250565b60006139d5601c83612cda565b91506139e08261399f565b602082019050919050565b60006020820190508181036000830152613a04816139c8565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613a67602683612cda565b9150613a7282613a0b565b604082019050919050565b60006020820190508181036000830152613a9681613a5a565b9050919050565b613aa681612a14565b82525050565b6000604082019050613ac16000830185612441565b613ace6020830184613a9d565b9392505050565b6000819050919050565b613af0613aeb826128df565b613ad5565b82525050565b6000613b028285613adf565b602082019150613b128284613adf565b602082019150819050939250505056fea2646970667358221220fa13a3c1b51345bc9dec8c75e27bc82350ec1c51045ed8fcb8c06e55265b4a7364736f6c634300080a0033
Verified Source Code Partial Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: No
Coin98Vault.sol 527 lines
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 {
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
}
interface IVaultConfig {
function fee() external view returns (uint256);
function gasLimit() external view returns (uint256);
function ownerReward() external view returns (uint256);
}
/*
* @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 GSN 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 returns (address) {
return msg.sender;
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
function _msgValue() internal view returns (uint256) {
return msg.value;
}
}
/**
* @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;
address private _newOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor (address owner_) {
_owner = owner_;
emit OwnershipTransferred(address(0), owner_);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Accept the ownership transfer. This is to make sure that the contract is
* transferred to a working address
*
* Can only be called by the newly transfered owner.
*/
function acceptOwnership() public {
require(_msgSender() == _newOwner, "Ownable: only new owner can accept ownership");
address oldOwner = _owner;
_owner = _newOwner;
_newOwner = address(0);
emit OwnershipTransferred(oldOwner, _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 onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_newOwner = newOwner;
}
}
/**
* @dev Enable contract to receive gas token
*/
abstract contract Payable {
event Deposited(address indexed sender, uint256 value);
fallback() external payable {
if(msg.value > 0) {
emit Deposited(msg.sender, msg.value);
}
}
/// @dev enable wallet to receive ETH
receive() external payable {
if(msg.value > 0) {
emit Deposited(msg.sender, msg.value);
}
}
}
/**
* @dev These functions deal with verification of Merkle trees (hash trees),
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
// Check if the computed hash (root) is equal to the provided root
return computedHash == root;
}
}
/**
* @dev Coin98Vault contract to enable vesting funds to investors
*/
contract Coin98Vault is Ownable, Payable {
address private _factory;
address[] private _admins;
mapping(address => bool) private _adminStatuses;
mapping(uint256 => EventData) private _eventDatas;
mapping(uint256 => mapping(uint256 => bool)) private _eventRedemptions;
/// @dev Initialize a new vault
/// @param factory_ Back reference to the factory initialized this vault for global configuration
/// @param owner_ Owner of this vault
constructor(address factory_, address owner_) Ownable(owner_) {
_factory = factory_;
}
struct EventData {
uint256 timestamp;
bytes32 merkleRoot;
address receivingToken;
address sendingToken;
uint8 isActive;
}
event AdminAdded(address indexed admin);
event AdminRemoved(address indexed admin);
event EventCreated(uint256 eventId, EventData eventData);
event EventUpdated(uint256 eventId, uint8 isActive);
event Redeemed(uint256 eventId, uint256 index, address indexed recipient, address indexed receivingToken, uint256 receivingTokenAmount, address indexed sendingToken, uint256 sendingTokenAmount);
event Withdrawn(address indexed owner, address indexed recipient, address indexed token, uint256 value);
function _setRedemption(uint256 eventId_, uint256 index_) private {
_eventRedemptions[eventId_][index_] = true;
}
/// @dev Access Control, only owner and admins are able to access the specified function
modifier onlyAdmin() {
require(owner() == _msgSender() || _adminStatuses[_msgSender()], "Ownable: caller is not an admin");
_;
}
/// @dev returns current admins who can manage the vault
function admins() public view returns (address[] memory) {
return _admins;
}
/// @dev returns info of an event
/// @param eventId_ ID of the event
function eventInfo(uint256 eventId_) public view returns (EventData memory) {
return _eventDatas[eventId_];
}
/// @dev address of the factory
function factory() public view returns (address) {
return _factory;
}
/// @dev check an index whether it's redeemed
/// @param eventId_ event ID
/// @param index_ index of redemption pre-assigned to user
function isRedeemed(uint256 eventId_, uint256 index_) public view returns (bool) {
return _eventRedemptions[eventId_][index_];
}
/// @dev claim the token which user is eligible from schedule
/// @param eventId_ event ID
/// @param index_ index of redemption pre-assigned to user
/// @param recipient_ index of redemption pre-assigned to user
/// @param receivingAmount_ amount of *receivingToken* user is eligible to redeem
/// @param sendingAmount_ amount of *sendingToken* user must send the contract to get *receivingToken*
/// @param proofs additional data to validate that the inputted information is valid
function redeem(uint256 eventId_, uint256 index_, address recipient_, uint256 receivingAmount_, uint256 sendingAmount_, bytes32[] calldata proofs) public payable {
uint256 fee = IVaultConfig(_factory).fee();
uint256 gasLimit = IVaultConfig(_factory).gasLimit();
if(fee > 0) {
require(_msgValue() == fee, "C98Vault: Invalid fee");
}
EventData storage eventData = _eventDatas[eventId_];
require(eventData.isActive > 0, "C98Vault: Invalid event");
require(eventData.timestamp <= block.timestamp, "C98Vault: Schedule locked");
require(recipient_ != address(0), "C98Vault: Invalid schedule");
bytes32 node = keccak256(abi.encodePacked(index_, recipient_, receivingAmount_, sendingAmount_));
require(MerkleProof.verify(proofs, eventData.merkleRoot, node), "C98Vault: Invalid proof");
require(!isRedeemed(eventId_, index_), "C98Vault: Redeemed");
uint256 availableAmount;
if(eventData.receivingToken == address(0)) {
availableAmount = address(this).balance;
} else {
availableAmount = IERC20(eventData.receivingToken).balanceOf(address(this));
}
require(receivingAmount_ <= availableAmount, "C98Vault: Insufficient token");
_setRedemption(eventId_, index_);
if(fee > 0) {
uint256 reward = IVaultConfig(_factory).ownerReward();
uint256 finalFee = fee - reward;
(bool success, bytes memory data) = _factory.call{value:finalFee, gas:gasLimit}("");
require(success, "C98Vault: Unable to charge fee");
}
if(sendingAmount_ > 0) {
IERC20(eventData.sendingToken).transferFrom(_msgSender(), address(this), sendingAmount_);
}
if(eventData.receivingToken == address(0)) {
recipient_.call{value:receivingAmount_, gas:gasLimit}("");
} else {
IERC20(eventData.receivingToken).transfer(recipient_, receivingAmount_);
}
emit Redeemed(eventId_, index_, recipient_, eventData.receivingToken, receivingAmount_, eventData.sendingToken, sendingAmount_);
}
/// @dev withdraw the token in the vault, no limit
/// @param token_ address of the token, use address(0) to withdraw gas token
/// @param destination_ recipient address to receive the fund
/// @param amount_ amount of fund to withdaw
function withdraw(address token_, address destination_, uint256 amount_) public onlyAdmin {
require(destination_ != address(0), "C98Vault: Destination is zero address");
uint256 availableAmount;
if(token_ == address(0)) {
availableAmount = address(this).balance;
} else {
availableAmount = IERC20(token_).balanceOf(address(this));
}
require(amount_ <= availableAmount, "C98Vault: Not enough balance");
uint256 gasLimit = IVaultConfig(_factory).gasLimit();
if(token_ == address(0)) {
destination_.call{value:amount_, gas:gasLimit}("");
} else {
IERC20(token_).transfer(destination_, amount_);
}
emit Withdrawn(_msgSender(), destination_, token_, amount_);
}
/// @dev withdraw NFT from contract
/// @param token_ address of the token, use address(0) to withdraw gas token
/// @param destination_ recipient address to receive the fund
/// @param tokenId_ ID of NFT to withdraw
function withdrawNft(address token_, address destination_, uint256 tokenId_) public onlyAdmin {
require(destination_ != address(0), "C98Vault: destination is zero address");
IERC721(token_).transferFrom(address(this), destination_, tokenId_);
emit Withdrawn(_msgSender(), destination_, token_, 1);
}
/// @dev create an event to specify how user can claim their token
/// @param eventId_ event ID
/// @param timestamp_ when the token will be available for redemption
/// @param receivingToken_ token user will be receiving, mandatory
/// @param sendingToken_ token user need to send in order to receive *receivingToken_*
function createEvent(uint256 eventId_, uint256 timestamp_, bytes32 merkleRoot_, address receivingToken_, address sendingToken_) public onlyAdmin {
require(_eventDatas[eventId_].timestamp == 0, "C98Vault: Event existed");
require(timestamp_ != 0, "C98Vault: Invalid timestamp");
_eventDatas[eventId_].timestamp = timestamp_;
_eventDatas[eventId_].merkleRoot = merkleRoot_;
_eventDatas[eventId_].receivingToken = receivingToken_;
_eventDatas[eventId_].sendingToken = sendingToken_;
_eventDatas[eventId_].isActive = 1;
emit EventCreated(eventId_, _eventDatas[eventId_]);
}
/// @dev enable/disable a particular event
/// @param eventId_ event ID
/// @param isActive_ zero to inactive, any number to active
function setEventStatus(uint256 eventId_, uint8 isActive_) public onlyAdmin {
require(_eventDatas[eventId_].timestamp != 0, "C98Vault: Invalid event");
_eventDatas[eventId_].isActive = isActive_;
emit EventUpdated(eventId_, isActive_);
}
/// @dev add/remove admin of the vault.
/// @param nAdmins_ list to address to update
/// @param nStatuses_ address with same index will be added if true, or remove if false
/// admins will have access to all tokens in the vault, and can define vesting schedule
function setAdmins(address[] memory nAdmins_, bool[] memory nStatuses_) public onlyOwner {
require(nAdmins_.length != 0, "C98Vault: Empty arguments");
require(nStatuses_.length != 0, "C98Vault: Empty arguments");
require(nAdmins_.length == nStatuses_.length, "C98Vault: Invalid arguments");
uint256 i;
for(i = 0; i < nAdmins_.length; i++) {
address nAdmin = nAdmins_[i];
if(nStatuses_[i]) {
if(!_adminStatuses[nAdmin]) {
_admins.push(nAdmin);
_adminStatuses[nAdmin] = nStatuses_[i];
emit AdminAdded(nAdmin);
}
} else {
uint256 j;
for(j = 0; j < _admins.length; j++) {
if(_admins[j] == nAdmin) {
_admins[j] = _admins[_admins.length - 1];
_admins.pop();
delete _adminStatuses[nAdmin];
emit AdminRemoved(nAdmin);
break;
}
}
}
}
}
}
contract Coin98VaultFactory is Ownable, Payable, IVaultConfig {
uint256 private _fee;
uint256 private _gasLimit;
uint256 private _ownerReward;
address[] private _vaults;
constructor () Ownable(_msgSender()) {
_gasLimit = 9000;
}
/// @dev Emit `FeeUpdated` when a new vault is created
event Created(address indexed vault);
/// @dev Emit `FeeUpdated` when fee of the protocol is updated
event FeeUpdated(uint256 fee);
/// @dev Emit `OwnerRewardUpdated` when reward for vault owner is updated
event OwnerRewardUpdated(uint256 fee);
/// @dev Emit `Withdrawn` when owner withdraw fund from the factory
event Withdrawn(address indexed owner, address indexed recipient, address indexed token, uint256 value);
/// @dev get current protocol fee in gas token
function fee() override external view returns (uint256) {
return _fee;
}
/// @dev limit gas to send native token
function gasLimit() override external view returns (uint256) {
return _gasLimit;
}
/// @dev get current owner reward in gas token
function ownerReward() override external view returns (uint256) {
return _ownerReward;
}
/// @dev get list of vaults initialized through this factory
function vaults() external view returns (address[] memory) {
return _vaults;
}
/// @dev create a new vault
/// @param owner_ Owner of newly created vault
function createVault(address owner_) external returns (Coin98Vault vault) {
vault = new Coin98Vault(address(this), owner_);
_vaults.push(address(vault));
emit Created(address(vault));
}
function setGasLimit(uint256 limit_) public onlyOwner {
_gasLimit = limit_;
}
/// @dev change protocol fee
/// @param fee_ amount of gas token to charge for every redeem. can be ZERO to disable protocol fee
/// @param reward_ amount of gas token to incentive vault owner. this reward will be deduce from protocol fee
function setFee(uint256 fee_, uint256 reward_) public onlyOwner {
require(fee_ >= reward_, "C98Vault: Invalid reward amount");
_fee = fee_;
_ownerReward = reward_;
emit FeeUpdated(fee_);
emit OwnerRewardUpdated(reward_);
}
/// @dev withdraw fee collected for protocol
/// @param token_ address of the token, use address(0) to withdraw gas token
/// @param destination_ recipient address to receive the fund
/// @param amount_ amount of fund to withdaw
function withdraw(address token_, address destination_, uint256 amount_) public onlyOwner {
require(destination_ != address(0), "C98Vault: Destination is zero address");
uint256 availableAmount;
if(token_ == address(0)) {
availableAmount = address(this).balance;
} else {
availableAmount = IERC20(token_).balanceOf(address(this));
}
require(amount_ <= availableAmount, "C98Vault: Not enough balance");
if(token_ == address(0)) {
destination_.call{value:amount_, gas:_gasLimit}("");
} else {
IERC20(token_).transfer(destination_, amount_);
}
emit Withdrawn(_msgSender(), destination_, token_, amount_);
}
/// @dev withdraw NFT from contract
/// @param token_ address of the token, use address(0) to withdraw gas token
/// @param destination_ recipient address to receive the fund
/// @param tokenId_ ID of NFT to withdraw
function withdrawNft(address token_, address destination_, uint256 tokenId_) public onlyOwner {
require(destination_ != address(0), "C98Vault: destination is zero address");
IERC721(token_).transferFrom(address(this), destination_, tokenId_);
emit Withdrawn(_msgSender(), destination_, token_, 1);
}
}
Read Contract
admins 0xa5de3619 → address[]
eventInfo 0x9d0c025b → tuple
factory 0xc45a0155 → address
isRedeemed 0xc87234b9 → bool
owner 0x8da5cb5b → address
Write Contract 8 functions
These functions modify contract state and require a wallet transaction to execute.
acceptOwnership 0x79ba5097
No parameters
createEvent 0x833b463f
uint256 eventId_
uint256 timestamp_
bytes32 merkleRoot_
address receivingToken_
address sendingToken_
redeem 0x4f7f8870
uint256 eventId_
uint256 index_
address recipient_
uint256 receivingAmount_
uint256 sendingAmount_
bytes32[] proofs
setAdmins 0x4a6ba2f1
address[] nAdmins_
bool[] nStatuses_
setEventStatus 0xff336708
uint256 eventId_
uint8 isActive_
transferOwnership 0xf2fde38b
address newOwner
withdraw 0xd9caed12
address token_
address destination_
uint256 amount_
withdrawNft 0xd6b72772
address token_
address destination_
uint256 tokenId_
Recent Transactions
No transactions found for this address