Address Contract Partially Verified
Address
0x98F2ab72198f2e64527bdb28931F60c0F77Ac2FC
Balance
0 ETH
Nonce
1
Code Size
11404 bytes
Creator
0x6f0986D7...9567 at tx 0xd6612eb7...56bc5e
Indexed Transactions
0 (1 on-chain, 1.2% indexed)
Contract Bytecode
11404 bytes
0x6080604052600436106101195763ffffffff60e060020a60003504166306fdde03811461011e578063095ea7b3146101a857806318160ddd146101e057806323b872dd14610207578063313ce567146102315780633f4ba83a1461025c57806342966c68146102735780634e71e0c81461028b5780635c975abb146102a057806366188463146102b557806370a08231146102d957806383f12fec146102fa5780638456cb591461035157806386575e40146103665780638da5cb5b146103fd57806395d89b411461042e578063a9059cbb14610443578063aaea396c14610467578063d73dd62314610488578063dd62ed3e146104ac578063e30c3978146104d3578063f2fde38b146104e8578063f9f92be414610509575b600080fd5b34801561012a57600080fd5b5061013361052a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016d578181015183820152602001610155565b50505050905090810190601f16801561019a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b457600080fd5b506101cc600160a060020a03600435166024356105b8565b604080519115158252519081900360200190f35b3480156101ec57600080fd5b506101f56109c4565b60408051918252519081900360200190f35b34801561021357600080fd5b506101cc600160a060020a0360043581169060243516604435610a55565b34801561023d57600080fd5b50610246610ed8565b6040805160ff9092168252519081900360200190f35b34801561026857600080fd5b50610271610edd565b005b34801561027f57600080fd5b506101cc600435610f55565b34801561029757600080fd5b506102716112c2565b3480156102ac57600080fd5b506101cc61134a565b3480156102c157600080fd5b506101cc600160a060020a036004351660243561135a565b3480156102e557600080fd5b506101f5600160a060020a03600435166117f9565b34801561030657600080fd5b50604080516020600480358082013583810280860185019096528085526101cc9536959394602494938501929182918501908490808284375094975050933594506118809350505050565b34801561035d57600080fd5b50610271611d4d565b34801561037257600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261027194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750611dca9650505050505050565b34801561040957600080fd5b50610412611e24565b60408051600160a060020a039092168252519081900360200190f35b34801561043a57600080fd5b50610133611e33565b34801561044f57600080fd5b506101cc600160a060020a0360043516602435611e8e565b34801561047357600080fd5b506101cc600160a060020a03600435166121d9565b34801561049457600080fd5b506101cc600160a060020a036004351660243561222e565b3480156104b857600080fd5b506101f5600160a060020a03600435811690602435166125d5565b3480156104df57600080fd5b5061041261267d565b3480156104f457600080fd5b50610271600160a060020a036004351661268c565b34801561051557600080fd5b506101cc600160a060020a0360043516612724565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b05780601f10610585576101008083540402835291602001916105b0565b820191906000526020600020905b81548152906001019060200180831161059357829003601f168201915b505050505081565b60015460009060a060020a900460ff16156105d257600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b15801561062457600080fd5b505af1158015610638573d6000803e3d6000fd5b505050506040513d602081101561064e57600080fd5b50511561065a57600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b5051156106e557600080fd5b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b15801561072e57600080fd5b505af1158015610742573d6000803e3d6000fd5b505050506040513d602081101561075857600080fd5b5051156107e8576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b1580156107b157600080fd5b505af11580156107c5573d6000803e3d6000fd5b505050506040513d60208110156107db57600080fd5b505115156107e857600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b505050506040513d602081101561085b57600080fd5b5051156108eb576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b1580156108b457600080fd5b505af11580156108c8573d6000803e3d6000fd5b505050506040513d60208110156108de57600080fd5b505115156108eb57600080fd5b600754604080517fda46098c000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038a81166024830152604482018a90529151919092169163da46098c91606480830192600092919082900301818387803b15801561095f57600080fd5b505af1158015610973573d6000803e3d6000fd5b5050604080518981529051600160a060020a038b1693503392507f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a35060019695505050505050565b600654604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a0316916318160ddd91600480830192602092919082900301818787803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b505050506040513d6020811015610a4d57600080fd5b505190505b90565b60015460009060a060020a900460ff1615610a6f57600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b158015610ac457600080fd5b505af1158015610ad8573d6000803e3d6000fd5b505050506040513d6020811015610aee57600080fd5b505115610afa57600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b158015610b4f57600080fd5b505af1158015610b63573d6000803e3d6000fd5b505050506040513d6020811015610b7957600080fd5b505115610b8557600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b158015610bce57600080fd5b505af1158015610be2573d6000803e3d6000fd5b505050506040513d6020811015610bf857600080fd5b505115610c88576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b158015610c5157600080fd5b505af1158015610c65573d6000803e3d6000fd5b505050506040513d6020811015610c7b57600080fd5b50511515610c8857600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b158015610cd157600080fd5b505af1158015610ce5573d6000803e3d6000fd5b505050506040513d6020811015610cfb57600080fd5b505115610d8b576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b158015610d5457600080fd5b505af1158015610d68573d6000803e3d6000fd5b505050506040513d6020811015610d7e57600080fd5b50511515610d8b57600080fd5b600754604080517f1a46ec82000000000000000000000000000000000000000000000000000000008152600160a060020a038b81166004830152336024830152915189939290921691631a46ec82916044808201926020929091908290030181600087803b158015610dfc57600080fd5b505af1158015610e10573d6000803e3d6000fd5b505050506040513d6020811015610e2657600080fd5b50511015610e3357600080fd5b600754604080517f97d88cd2000000000000000000000000000000000000000000000000000000008152600160a060020a038b81166004830152336024830152604482018a9052915191909216916397d88cd291606480830192600092919082900301818387803b158015610ea757600080fd5b505af1158015610ebb573d6000803e3d6000fd5b50505050610eca888888612779565b506001979650505050505050565b601281565b600054600160a060020a03163314610ef457600080fd5b60015460a060020a900460ff161515610f0c57600080fd5b6001805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60015460009060a060020a900460ff1615610f6f57600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b158015610fc157600080fd5b505af1158015610fd5573d6000803e3d6000fd5b505050506040513d6020811015610feb57600080fd5b505115610ff757600080fd5b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b15801561104057600080fd5b505af1158015611054573d6000803e3d6000fd5b505050506040513d602081101561106a57600080fd5b5051156110fa576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d60208110156110ed57600080fd5b505115156110fa57600080fd5b6006546040805160e060020a6370a0823102815233600482015290518692600160a060020a0316916370a082319160248083019260209291908290030181600087803b15801561114957600080fd5b505af115801561115d573d6000803e3d6000fd5b505050506040513d602081101561117357600080fd5b5051101561118057600080fd5b600654604080517fcf8eeb7e000000000000000000000000000000000000000000000000000000008152336004820152602481018790529051600160a060020a039092169163cf8eeb7e9160448082019260009290919082900301818387803b1580156111ec57600080fd5b505af1158015611200573d6000803e3d6000fd5b5050600654604080517f82838c76000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a0390921693506382838c76925060248082019260009290919082900301818387803b15801561126a57600080fd5b505af115801561127e573d6000803e3d6000fd5b50506040805187815290513393507fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592509081900360200190a25060019392505050565b600154600160a060020a031633146112d957600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b60015460a060020a900460ff1681565b60015460009060a060020a900460ff161561137457600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b1580156113c657600080fd5b505af11580156113da573d6000803e3d6000fd5b505050506040513d60208110156113f057600080fd5b5051156113fc57600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b15801561145157600080fd5b505af1158015611465573d6000803e3d6000fd5b505050506040513d602081101561147b57600080fd5b50511561148757600080fd5b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b1580156114d057600080fd5b505af11580156114e4573d6000803e3d6000fd5b505050506040513d60208110156114fa57600080fd5b50511561158a576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561155357600080fd5b505af1158015611567573d6000803e3d6000fd5b505050506040513d602081101561157d57600080fd5b5051151561158a57600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b1580156115d357600080fd5b505af11580156115e7573d6000803e3d6000fd5b505050506040513d60208110156115fd57600080fd5b50511561168d576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561165657600080fd5b505af115801561166a573d6000803e3d6000fd5b505050506040513d602081101561168057600080fd5b5051151561168d57600080fd5b600754604080517f97d88cd2000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038a81166024830152604482018a9052915191909216916397d88cd291606480830192600092919082900301818387803b15801561170157600080fd5b505af1158015611715573d6000803e3d6000fd5b5050600754604080517f1a46ec820000000000000000000000000000000000000000000000000000000081523360048201819052600160a060020a03808e166024840181905293519396509094507f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925931691631a46ec82916044808201926020929091908290030181600087803b1580156117af57600080fd5b505af11580156117c3573d6000803e3d6000fd5b505050506040513d60208110156117d957600080fd5b505160408051918252519081900360200190a35060019695505050505050565b6006546040805160e060020a6370a08231028152600160a060020a038481166004830152915160009392909216916370a082319160248082019260209290919082900301818787803b15801561184e57600080fd5b505af1158015611862573d6000803e3d6000fd5b505050506040513d602081101561187857600080fd5b505192915050565b60015460009081908190819060a060020a900460ff16156118a057600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b1580156118f257600080fd5b505af1158015611906573d6000803e3d6000fd5b505050506040513d602081101561191c57600080fd5b50511561192857600080fd5b8660005b81518110156119eb576002548251600160a060020a039091169063f9f92be49084908490811061195857fe5b906020019060200201516040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1580156119ad57600080fd5b505af11580156119c1573d6000803e3d6000fd5b505050506040513d60208110156119d757600080fd5b5051156119e357600080fd5b60010161192c565b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b158015611a3457600080fd5b505af1158015611a48573d6000803e3d6000fd5b505050506040513d6020811015611a5e57600080fd5b505115611aee576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b158015611ab757600080fd5b505af1158015611acb573d6000803e3d6000fd5b505050506040513d6020811015611ae157600080fd5b50511515611aee57600080fd5b896000600360009054906101000a9004600160a060020a0316600160a060020a0316630a79726a6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611b4457600080fd5b505af1158015611b58573d6000803e3d6000fd5b505050506040513d6020811015611b6e57600080fd5b505115611c39575060005b8151811015611c39576003548251600160a060020a0390911690638160149690849084908110611ba557fe5b906020019060200201516040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015611bfa57600080fd5b505af1158015611c0e573d6000803e3d6000fd5b505050506040513d6020811015611c2457600080fd5b50511515611c3157600080fd5b600101611b79565b8b519850600089118015611c4e575060648911155b8015611c5a575060008b115b1515611c6557600080fd5b611c758b8a63ffffffff612b9216565b6006546040805160e060020a6370a082310281523360048201529051929a508a92600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015611cca57600080fd5b505af1158015611cde573d6000803e3d6000fd5b505050506040513d6020811015611cf457600080fd5b50511015611d0157600080fd5b600096505b88871015611d3b57611d30338d89815181101515611d2057fe5b906020019060200201518d612779565b600190960195611d06565b5060019b9a5050505050505050505050565b600054600160a060020a03163314611d6457600080fd5b60015460a060020a900460ff1615611d7b57600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600054600160a060020a03163314611de157600080fd5b60015460a060020a900460ff1615611df857600080fd5b8151611e0b906004906020850190612bc8565b508051611e1f906005906020840190612bc8565b505050565b600054600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b05780601f10610585576101008083540402835291602001916105b0565b60015460009060a060020a900460ff1615611ea857600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b158015611efa57600080fd5b505af1158015611f0e573d6000803e3d6000fd5b505050506040513d6020811015611f2457600080fd5b505115611f3057600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b158015611f8557600080fd5b505af1158015611f99573d6000803e3d6000fd5b505050506040513d6020811015611faf57600080fd5b505115611fbb57600080fd5b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b15801561200457600080fd5b505af1158015612018573d6000803e3d6000fd5b505050506040513d602081101561202e57600080fd5b5051156120be576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561208757600080fd5b505af115801561209b573d6000803e3d6000fd5b505050506040513d60208110156120b157600080fd5b505115156120be57600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b15801561210757600080fd5b505af115801561211b573d6000803e3d6000fd5b505050506040513d602081101561213157600080fd5b5051156121c1576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561218a57600080fd5b505af115801561219e573d6000803e3d6000fd5b505050506040513d60208110156121b457600080fd5b505115156121c157600080fd5b6121cc338888612779565b5060019695505050505050565b6003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151600093929092169163816014969160248082019260209290919082900301818787803b15801561184e57600080fd5b60015460009060a060020a900460ff161561224857600080fd5b6002546040805160e260020a633e7e4af9028152336004820181905291519192600160a060020a03169163f9f92be4916024808201926020929091908290030181600087803b15801561229a57600080fd5b505af11580156122ae573d6000803e3d6000fd5b505050506040513d60208110156122c457600080fd5b5051156122d057600080fd5b6002546040805160e260020a633e7e4af9028152600160a060020a03808816600483015291518793929092169163f9f92be4916024808201926020929091908290030181600087803b15801561232557600080fd5b505af1158015612339573d6000803e3d6000fd5b505050506040513d602081101561234f57600080fd5b50511561235b57600080fd5b6003546040805160e160020a63053cb93502815290513392600160a060020a031691630a79726a9160048083019260209291908290030181600087803b1580156123a457600080fd5b505af11580156123b8573d6000803e3d6000fd5b505050506040513d60208110156123ce57600080fd5b50511561245e576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561242757600080fd5b505af115801561243b573d6000803e3d6000fd5b505050506040513d602081101561245157600080fd5b5051151561245e57600080fd5b6003546040805160e160020a63053cb93502815290518892600160a060020a031691630a79726a9160048083019260209291908290030181600087803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b505050506040513d60208110156124d157600080fd5b505115612561576003546040805160e160020a6340b00a4b028152600160a060020a0384811660048301529151919092169163816014969160248083019260209291908290030181600087803b15801561252a57600080fd5b505af115801561253e573d6000803e3d6000fd5b505050506040513d602081101561255457600080fd5b5051151561256157600080fd5b600754604080517f5fd72d16000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038a81166024830152604482018a905291519190921691635fd72d1691606480830192600092919082900301818387803b15801561170157600080fd5b600754604080517f1a46ec82000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152848116602483015291516000939290921691631a46ec829160448082019260209290919082900301818787803b15801561264857600080fd5b505af115801561265c573d6000803e3d6000fd5b505050506040513d602081101561267257600080fd5b505190505b92915050565b600154600160a060020a031681565b600054600160a060020a031633146126a357600080fd5b600160a060020a03811615156126b857600080fd5b60015460008054604051600160a060020a0393841693909116917f8573d4aae9f7fb051c6b88d7440011a1c12376acda6603a45f45bad36a8db4ce91a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6002546040805160e260020a633e7e4af9028152600160a060020a0384811660048301529151600093929092169163f9f92be49160248082019260209290919082900301818787803b15801561184e57600080fd5b600080821161278757600080fd5b600160a060020a038316151561279c57600080fd5b6006546040805160e060020a6370a08231028152600160a060020a0387811660048301529151859392909216916370a08231916024808201926020929091908290030181600087803b1580156127f157600080fd5b505af1158015612805573d6000803e3d6000fd5b505050506040513d602081101561281b57600080fd5b5051101561282857600080fd5b6006546040805160e060020a6370a08231028152600160a060020a03868116600483015291516129359392909216916370a08231916024808201926020929091908290030181600087803b15801561287f57600080fd5b505af1158015612893573d6000803e3d6000fd5b505050506040513d60208110156128a957600080fd5b50516006546040805160e060020a6370a08231028152600160a060020a038981166004830152915191909216916370a082319160248083019260209291908290030181600087803b1580156128fd57600080fd5b505af1158015612911573d6000803e3d6000fd5b505050506040513d602081101561292757600080fd5b50519063ffffffff612bbb16565b600654604080517fcf8eeb7e000000000000000000000000000000000000000000000000000000008152600160a060020a03888116600483015260248201879052915193945091169163cf8eeb7e9160448082019260009290919082900301818387803b1580156129a557600080fd5b505af11580156129b9573d6000803e3d6000fd5b5050600654604080517f21e5383a000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301526024820188905291519190921693506321e5383a9250604480830192600092919082900301818387803b158015612a2b57600080fd5b505af1158015612a3f573d6000803e3d6000fd5b5050604080518581529051600160a060020a038088169450881692507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a36006546040805160e060020a6370a08231028152600160a060020a0386811660048301529151849392909216916370a08231916024808201926020929091908290030181600087803b158015612ada57600080fd5b505af1158015612aee573d6000803e3d6000fd5b505050506040513d6020811015612b0457600080fd5b50516006546040805160e060020a6370a08231028152600160a060020a038981166004830152915191909216916370a082319160248083019260209291908290030181600087803b158015612b5857600080fd5b505af1158015612b6c573d6000803e3d6000fd5b505050506040513d6020811015612b8257600080fd5b50510114612b8c57fe5b50505050565b6000821515612ba357506000612677565b50818102818382811515612bb357fe5b041461267757fe5b8181018281101561267757fe5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c0957805160ff1916838001178555612c36565b82800160010185558215612c36579182015b82811115612c36578251825591602001919060010190612c1b565b50612c42929150612c46565b5090565b610a5291905b80821115612c425760008155600101612c4c5600a165627a7a72305820b04286540bb0a8d0ecbce52ba69b8cc0caf26b99317c423396f3ecdb37ef418d0029
Verified Source Code Partial Match
Compiler: v0.4.25+commit.59dbf8f1
EVM: byzantium
Optimization: Yes (200 runs)
USDO.sol 622 lines
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
}
// ----------------------------------------------------------------------------
// Ownable contract
// ----------------------------------------------------------------------------
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
}
/**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/
contract Claimable is Ownable {
address public pendingOwner;
event OwnershipTransferPending(address indexed owner, address indexed pendingOwner);
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferPending(owner, pendingOwner);
pendingOwner = newOwner;
}
/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner public {
emit OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner;
pendingOwner = address(0);
}
}
// ----------------------------------------------------------------------------
// Pausable contract
// ----------------------------------------------------------------------------
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Claimable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
}
/**
* @title Callable
* @dev Extension for the Claimable contract.
* This allows the contract only be called by certain contract.
*/
contract Callable is Claimable {
mapping(address => bool) public callers;
event CallerAddressAdded(address indexed addr);
event CallerAddressRemoved(address indexed addr);
/**
* @dev Modifier throws if called by any account other than the callers or owner.
*/
modifier onlyCaller() {
require(callers[msg.sender]);
_;
}
/**
* @dev add an address to the caller list
* @param addr address
* @return true if the address was added to the caller list, false if the address was already in the caller list
*/
function addAddressToCaller(address addr) onlyOwner public returns(bool success) {
if (!callers[addr]) {
callers[addr] = true;
emit CallerAddressAdded(addr);
success = true;
}
}
/**
* @dev remove an address from the caller list
* @param addr address
* @return true if the address was removed from the caller list,
* false if the address wasn't in the caller list in the first place
*/
function removeAddressFromCaller(address addr) onlyOwner public returns(bool success) {
if (callers[addr]) {
callers[addr] = false;
emit CallerAddressRemoved(addr);
success = true;
}
}
}
// ----------------------------------------------------------------------------
// Blacklist
// ----------------------------------------------------------------------------
/**
* @title Blacklist
* @dev The Blacklist contract has a blacklist of addresses, and provides basic authorization control functions.
*/
contract Blacklist is Callable {
mapping(address => bool) public blacklist;
function addAddressToBlacklist(address addr) onlyCaller public returns (bool success) {
if (!blacklist[addr]) {
blacklist[addr] = true;
success = true;
}
}
function removeAddressFromBlacklist(address addr) onlyCaller public returns (bool success) {
if (blacklist[addr]) {
blacklist[addr] = false;
success = true;
}
}
}
// ----------------------------------------------------------------------------
// Verified
// ----------------------------------------------------------------------------
/**
* @title Verified
* @dev The Verified contract has a list of verified addresses.
*/
contract Verified is Callable {
mapping(address => bool) public verifiedList;
bool public shouldVerify = true;
function verifyAddress(address addr) onlyCaller public returns (bool success) {
if (!verifiedList[addr]) {
verifiedList[addr] = true;
success = true;
}
}
function unverifyAddress(address addr) onlyCaller public returns (bool success) {
if (verifiedList[addr]) {
verifiedList[addr] = false;
success = true;
}
}
function setShouldVerify(bool value) onlyCaller public returns (bool success) {
shouldVerify = value;
return true;
}
}
// ----------------------------------------------------------------------------
// Allowance
// ----------------------------------------------------------------------------
/**
* @title Allowance
* @dev Storage for the Allowance List.
*/
contract Allowance is Callable {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) public allowanceOf;
function addAllowance(address _holder, address _spender, uint256 _value) onlyCaller public {
allowanceOf[_holder][_spender] = allowanceOf[_holder][_spender].add(_value);
}
function subAllowance(address _holder, address _spender, uint256 _value) onlyCaller public {
uint256 oldValue = allowanceOf[_holder][_spender];
if (_value > oldValue) {
allowanceOf[_holder][_spender] = 0;
} else {
allowanceOf[_holder][_spender] = oldValue.sub(_value);
}
}
function setAllowance(address _holder, address _spender, uint256 _value) onlyCaller public {
allowanceOf[_holder][_spender] = _value;
}
}
// ----------------------------------------------------------------------------
// Balance
// ----------------------------------------------------------------------------
/**
* @title Balance
* @dev Storage for the Balance List.
*/
contract Balance is Callable {
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
uint256 public totalSupply;
function addBalance(address _addr, uint256 _value) onlyCaller public {
balanceOf[_addr] = balanceOf[_addr].add(_value);
}
function subBalance(address _addr, uint256 _value) onlyCaller public {
balanceOf[_addr] = balanceOf[_addr].sub(_value);
}
function setBalance(address _addr, uint256 _value) onlyCaller public {
balanceOf[_addr] = _value;
}
function addTotalSupply(uint256 _value) onlyCaller public {
totalSupply = totalSupply.add(_value);
}
function subTotalSupply(uint256 _value) onlyCaller public {
totalSupply = totalSupply.sub(_value);
}
}
// ----------------------------------------------------------------------------
// UserContract
// ----------------------------------------------------------------------------
/**
* @title UserContract
* @dev A contract for the blacklist and verified list modifiers.
*/
contract UserContract {
Blacklist internal _blacklist;
Verified internal _verifiedList;
constructor(
Blacklist _blacklistContract, Verified _verifiedListContract
) public {
_blacklist = _blacklistContract;
_verifiedList = _verifiedListContract;
}
/**
* @dev Throws if the given address is blacklisted.
*/
modifier onlyNotBlacklistedAddr(address addr) {
require(!_blacklist.blacklist(addr));
_;
}
/**
* @dev Throws if one of the given addresses is blacklisted.
*/
modifier onlyNotBlacklistedAddrs(address[] addrs) {
for (uint256 i = 0; i < addrs.length; i++) {
require(!_blacklist.blacklist(addrs[i]));
}
_;
}
/**
* @dev Throws if the given address is not verified.
*/
modifier onlyVerifiedAddr(address addr) {
if (_verifiedList.shouldVerify()) {
require(_verifiedList.verifiedList(addr));
}
_;
}
/**
* @dev Throws if one of the given addresses is not verified.
*/
modifier onlyVerifiedAddrs(address[] addrs) {
if (_verifiedList.shouldVerify()) {
for (uint256 i = 0; i < addrs.length; i++) {
require(_verifiedList.verifiedList(addrs[i]));
}
}
_;
}
function blacklist(address addr) public view returns (bool) {
return _blacklist.blacklist(addr);
}
function verifiedlist(address addr) public view returns (bool) {
return _verifiedList.verifiedList(addr);
}
}
// ----------------------------------------------------------------------------
// ContractInterface
// ----------------------------------------------------------------------------
contract ContractInterface {
function totalSupply() public view returns (uint256);
function balanceOf(address tokenOwner) public view returns (uint256);
function allowance(address tokenOwner, address spender) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function batchTransfer(address[] to, uint256 value) public returns (bool);
function increaseApproval(address spender, uint256 value) public returns (bool);
function decreaseApproval(address spender, uint256 value) public returns (bool);
function burn(uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
}
// ----------------------------------------------------------------------------
// USDO contract
// ----------------------------------------------------------------------------
contract USDO is ContractInterface, Pausable, UserContract {
using SafeMath for uint256;
// variables of the token
uint8 public constant decimals = 18;
uint256 constant maxBatch = 100;
string public name;
string public symbol;
Balance internal _balances;
Allowance internal _allowance;
constructor(string _tokenName, string _tokenSymbol,
Balance _balanceContract, Allowance _allowanceContract,
Blacklist _blacklistContract, Verified _verifiedListContract
) UserContract(_blacklistContract, _verifiedListContract) public {
name = _tokenName; // Set the name for display purposes
symbol = _tokenSymbol; // Set the symbol for display purposes
_balances = _balanceContract;
_allowance = _allowanceContract;
}
function totalSupply() public view returns (uint256) {
return _balances.totalSupply();
}
function balanceOf(address _addr) public view returns (uint256) {
return _balances.balanceOf(_addr);
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
return _allowance.allowanceOf(_owner, _spender);
}
/**
* @dev Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint256 _value) internal {
require(_value > 0); // transfering value must be greater than 0
require(_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require(_balances.balanceOf(_from) >= _value); // Check if the sender has enough
uint256 previousBalances = _balances.balanceOf(_from).add(_balances.balanceOf(_to)); // Save this for an assertion in the future
_balances.subBalance(_from, _value); // Subtract from the sender
_balances.addBalance(_to, _value); // Add the same to the recipient
emit Transfer(_from, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(_balances.balanceOf(_from) + _balances.balanceOf(_to) == previousBalances);
}
/**
* @dev Transfer tokens
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value)
whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyNotBlacklistedAddr(_to) onlyVerifiedAddr(msg.sender) onlyVerifiedAddr(_to)
public returns (bool) {
_transfer(msg.sender, _to, _value);
return true;
}
/**
* @dev Transfer tokens to multiple accounts
* Send `_value` tokens to all addresses in `_to` from your account
*
* @param _to The addresses of the recipients
* @param _value the amount to send
*/
function batchTransfer(address[] _to, uint256 _value)
whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyNotBlacklistedAddrs(_to) onlyVerifiedAddr(msg.sender) onlyVerifiedAddrs(_to)
public returns (bool) {
uint256 cnt = uint256(_to.length);
require(cnt > 0 && cnt <= maxBatch && _value > 0);
uint256 amount = _value.mul(cnt);
require(_balances.balanceOf(msg.sender) >= amount);
for (uint256 i = 0; i < cnt; i++) {
_transfer(msg.sender, _to[i], _value);
}
return true;
}
/**
* @dev Transfer tokens from other address
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value)
whenNotPaused onlyNotBlacklistedAddr(_from) onlyNotBlacklistedAddr(_to) onlyVerifiedAddr(_from) onlyVerifiedAddr(_to)
public returns (bool) {
require(_allowance.allowanceOf(_from, msg.sender) >= _value); // Check allowance
_allowance.subAllowance(_from, msg.sender, _value);
_transfer(_from, _to, _value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* 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
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value)
whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyNotBlacklistedAddr(_spender) onlyVerifiedAddr(msg.sender) onlyVerifiedAddr(_spender)
public returns (bool) {
_allowance.setAllowance(msg.sender, _spender, _value);
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint256 _addedValue)
whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyNotBlacklistedAddr(_spender) onlyVerifiedAddr(msg.sender) onlyVerifiedAddr(_spender)
public returns (bool) {
_allowance.addAllowance(msg.sender, _spender, _addedValue);
emit Approval(msg.sender, _spender, _allowance.allowanceOf(msg.sender, _spender));
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint256 _subtractedValue)
whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyNotBlacklistedAddr(_spender) onlyVerifiedAddr(msg.sender) onlyVerifiedAddr(_spender)
public returns (bool) {
_allowance.subAllowance(msg.sender, _spender, _subtractedValue);
emit Approval(msg.sender, _spender, _allowance.allowanceOf(msg.sender, _spender));
return true;
}
/**
* @dev Destroy tokens
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) whenNotPaused onlyNotBlacklistedAddr(msg.sender) onlyVerifiedAddr(msg.sender)
public returns (bool success) {
require(_balances.balanceOf(msg.sender) >= _value); // Check if the sender has enough
_balances.subBalance(msg.sender, _value); // Subtract from the sender
_balances.subTotalSupply(_value); // Updates totalSupply
emit Burn(msg.sender, _value);
return true;
}
/**
* @dev Change name and symbol of the tokens
*
* @param _name the new name of the token
* @param _symbol the new symbol of the token
*/
function changeName(string _name, string _symbol) onlyOwner whenNotPaused public {
name = _name;
symbol = _symbol;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blacklist 0xf9f92be4 → bool
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
pendingOwner 0xe30c3978 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
verifiedlist 0xaaea396c → bool
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
batchTransfer 0x83f12fec
address[] _to
uint256 _value
returns: bool
burn 0x42966c68
uint256 _value
returns: bool
changeName 0x86575e40
string _name
string _symbol
claimOwnership 0x4e71e0c8
No parameters
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
pause 0x8456cb59
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
Recent Transactions
This address has 1 on-chain transactions, but only 1.2% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →