Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 21 from a total of 21 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw All | 7037316 | 26 days ago | IN | 0 ETH | 0.00011511 | ||||
Withdraw All | 7012713 | 30 days ago | IN | 0 ETH | 0.00015431 | ||||
Withdraw All | 7012670 | 30 days ago | IN | 0 ETH | 0.00013407 | ||||
Withdraw All | 7012616 | 30 days ago | IN | 0 ETH | 0.00013751 | ||||
Withdraw All | 7012372 | 30 days ago | IN | 0 ETH | 0.00018511 | ||||
Withdraw All | 6876763 | 51 days ago | IN | 0 ETH | 0.00437158 | ||||
Set Authorized A... | 6583356 | 99 days ago | IN | 0 ETH | 0.00067192 | ||||
Set Authorized A... | 6583312 | 99 days ago | IN | 0 ETH | 0.00021658 | ||||
Withdraw All | 6581511 | 99 days ago | IN | 0 ETH | 0.00031232 | ||||
Withdraw All | 6512578 | 110 days ago | IN | 0 ETH | 0.00005098 | ||||
Withdraw All | 6512151 | 110 days ago | IN | 0 ETH | 0.00019879 | ||||
Set Service | 6339471 | 138 days ago | IN | 0 ETH | 0.00127337 | ||||
Add Service | 6339471 | 138 days ago | IN | 0 ETH | 0.0019415 | ||||
Set Service | 6339471 | 138 days ago | IN | 0 ETH | 0.00127337 | ||||
Add Service | 6339471 | 138 days ago | IN | 0 ETH | 0.0019415 | ||||
Set Service | 6339471 | 138 days ago | IN | 0 ETH | 0.00127337 | ||||
Add Service | 6339471 | 138 days ago | IN | 0 ETH | 0.00194183 | ||||
Set Service | 6339470 | 138 days ago | IN | 0 ETH | 0.00122245 | ||||
Add Service | 6339470 | 138 days ago | IN | 0 ETH | 0.00186417 | ||||
Set Service | 6339470 | 138 days ago | IN | 0 ETH | 0.00122213 | ||||
Add Service | 6339470 | 138 days ago | IN | 0 ETH | 0.00186385 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
7037316 | 26 days ago | 0.011 ETH | ||||
7036664 | 26 days ago | 0.001 ETH | ||||
7036652 | 26 days ago | 0.01 ETH | ||||
7012372 | 30 days ago | 0.0316 ETH | ||||
6990400 | 33 days ago | 0.005 ETH | ||||
6990398 | 33 days ago | 0.005 ETH | ||||
6990397 | 33 days ago | 0.01 ETH | ||||
6965477 | 37 days ago | 0.0006 ETH | ||||
6938971 | 41 days ago | 0.01 ETH | ||||
6938951 | 41 days ago | 0.001 ETH | ||||
6876763 | 51 days ago | 0.1287 ETH | ||||
6874569 | 51 days ago | 0.001 ETH | ||||
6850664 | 55 days ago | 0.01 ETH | ||||
6846096 | 56 days ago | 0.0006 ETH | ||||
6846084 | 56 days ago | 0.01 ETH | ||||
6677920 | 83 days ago | 0.0005 ETH | ||||
6677915 | 83 days ago | 0.005 ETH | ||||
6677914 | 83 days ago | 0.005 ETH | ||||
6677913 | 83 days ago | 0.01 ETH | ||||
6675464 | 84 days ago | 0.0005 ETH | ||||
6672680 | 84 days ago | 0.0001 ETH | ||||
6672662 | 84 days ago | 0.005 ETH | ||||
6672640 | 84 days ago | 0.001 ETH | ||||
6671715 | 84 days ago | 0.01 ETH | ||||
6666633 | 85 days ago | 0.01 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Payments
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; /* &&&&&& &&&&& &% &&&&&&&&&&&&&&& && &&&&&&&&&&% &&&&&&& &&&&& #&&&&&&&&&&&&& &&&&& &&&&&&& && &&&& &% &&&&&&& &&. &&&&&&&&&& & %&&&&&&& &&&& &&&& *&&&&&&&&& &&&&&&&&& &&&& .&&& &&&&&&&& &&&&&&&& &&& .&&&&&&& &&&&&&& &&&% &&&&&& &&&&&& &&&&& /&&&&. &&&& %&&& #&&&, &&&&( &&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&& &&&% &&&&&&&&&&&&&&&&&&&&&&&&& &&& &&& &&&* &&&&&&&&&&&&&&&&&&&&& &&* &&& .&&&&&& &&&&&&&&&&&&&&&&&&&& &&&&& && &&& #&&&&&& &&&&&&&&&&&&&&&&&&&&& &&&&& && &&& &&&& &&&&&&&&&&&&&&&&&&&&&& #&& &&& &&& &&&&&&&&&&&&&&&&&&&&&&&&, *&&& (&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&% &&&&&&&&&&&&&&&&& &&&&& &&&&&&&&&&&&&&&&&& %&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&# &&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&& */ /* * Payments contract * This contract is used to pay the bills based on servicesId and projectId from the Indexer. */ /// @title Payments /// @author Smithii import {IPayments} from "../interfaces/marketplace/IPayments.sol"; import {Authorized} from "@privylabs/authorized/contracts/Authorized.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; contract Payments is IPayments, Authorized, ReentrancyGuard { mapping(bytes32 => Service) public services; /// projectId from indexer => contract address => serviceId => Invoice mapping(bytes32 => mapping(address => mapping(bytes32 => Invoice[]))) public invoices; constructor() {} /// @inheritdoc IPayments function addService( bytes32 _serviceId, uint256 _pricePerItem ) public onlyAuthorizedOperator { services[_serviceId] = Service(_serviceId, _pricePerItem, false); } /// @inheritdoc IPayments function setService( bytes32 _serviceId, bool _active ) public onlyAuthorizedOperator { services[_serviceId].active = _active; } /// @inheritdoc IPayments function payService( bytes32 _projectId, address _contract, bytes32 _serviceId, uint256 _qty ) public payable nonReentrant { if (!services[_serviceId].active) revert ServiceNotActive(_serviceId); uint256 total = services[_serviceId].pricePerItem * _qty; if (msg.value != total) revert InvalidTotalAmount(); Invoice memory invoice = Invoice( msg.sender, services[_serviceId], _qty, total, block.timestamp ); invoices[_projectId][_contract][_serviceId].push(invoice); emit ServicePaid( _projectId, _contract, _serviceId, msg.sender, total, block.timestamp ); } /// @inheritdoc IPayments function withdraw( bytes32 _projectId, address _contract, bytes32 _serviceId, address payable _to ) public onlyAuthorizedAdmin { Invoice[] memory _invoices = invoices[_projectId][_contract][ _serviceId ]; uint256 total = 0; for (uint256 i = 0; i < _invoices.length; i++) { total += _invoices[i].total; } _to.transfer(total); emit ServiceWithdraw(_projectId, _contract, _serviceId, total); } /// @inheritdoc IPayments function withdrawAll(address payable _to) public onlyOwner { _to.transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { IAuthorized } from "./interfaces/IAuthorized.sol"; abstract contract Authorized is IAuthorized { constructor() { /// @notice Add the deployer as an authorized admin owner = msg.sender; } /// @notice the owner of the contract address private owner; /// @notice A mapping storing authorized admins /// @dev admin address => authorized status mapping (address => bool) private authorizedAdmins; /// @notice A mapping of the authorized delegate operators /// @dev operator address => authorized status mapping (address => bool) private authorizedOperators; /// @notice Modifier to ensure caller is owner modifier onlyOwner() { if (msg.sender != owner) { revert Unauthorized(); } _; } /// @dev Modifier to ensure caller is authorized admin modifier onlyAuthorizedAdmin() { if (msg.sender != owner && !authorizedAdmins[msg.sender]) { revert Unauthorized(); } _; } /// @dev Modifier to ensure caller is authorized operator modifier onlyAuthorizedOperator() { if (msg.sender != owner && !authorizedAdmins[msg.sender] && !authorizedOperators[msg.sender]) { revert Unauthorized(); } _; } /// @inheritdoc IAuthorized function transferOwnership(address newOwner) external onlyOwner { /// check if address is not null require(newOwner != address(0), "Authorized System: New owner cannot be null"); /// check if address is not the same as owner require(newOwner != owner, "Authorized System: New owner cannot be the same as old owner"); /// check if address is not the same as operator require(!authorizedOperators[owner], "Authorized System: Owner cannot be an operator"); /// update the owner owner = newOwner; } /// @inheritdoc IAuthorized function setAuthorizedAdmin(address _admin, bool status) public virtual onlyAuthorizedAdmin { /// check if address is not null require(_admin != address(0), "Authorized System: Admin address cannot be null"); /// check if address is not the same as operator require(!authorizedOperators[_admin], "Authorized System: Admin cannot be an operator"); /// update the admin status authorizedAdmins[_admin] = status; emit SetAdmin(_admin); } /// @inheritdoc IAuthorized function setAuthorizedOperator(address _operator, bool status) public virtual onlyAuthorizedAdmin { /// check if address is not null require(_operator != address(0), "Authorized System: Operator address cannot be null"); /// check if address is not the same as admin require(!authorizedAdmins[_operator], "Authorized System: Operator cannot be an admin"); /// update the operator status authorizedOperators[_operator] = status; emit SetOperator(_operator); } /// @inheritdoc IAuthorized function getAuthorizedAdmin(address _admin) public view virtual returns (bool) { return authorizedAdmins[_admin]; } /// @inheritdoc IAuthorized function getAuthorizedOperator(address _operator) public view virtual returns (bool) { return authorizedOperators[_operator]; } /// @inheritdoc IAuthorized function getOwner() public view virtual override returns (address) { return owner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IAuthorized { /// @notice Generic error when a user attempts to access a feature/function without proper access error Unauthorized(); /// @notice Event emitted when a new admin is added event SetAdmin(address indexed admin); /// @notice Event emitted when a new operator is added event SetOperator(address indexed operator); /// @notice Event emmited when a new authOperator is added event SetAuthOperator(address indexed authOperator); /// @notice Transfer ownership of the contract to a new account (`newOwner`). /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) external; /// @notice Add an authorized admin /// @param _admin address of the admin /// @param status status of the admin function setAuthorizedAdmin(address _admin, bool status) external; /// @notice Add an authorized Operator /// @param _operator address of the operator /// @param status status of the operator function setAuthorizedOperator(address _operator, bool status) external; /// @notice Get the status of an admin /// @param _admin address of the admin /// @return status of the admin function getAuthorizedAdmin(address _admin) external view returns (bool); /// @notice Get the status of an operator /// @param _operator address of the operator /// @return status of the operator function getAuthorizedOperator(address _operator) external view returns (bool); /// @notice Get the owner function getOwner() external view returns (address); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; /* * IPayments interface */ /// @title Payments /// @author Smithii interface IPayments { struct Service { bytes32 serviceId; uint256 pricePerItem; bool active; } struct Invoice { address user; Service service; uint256 qty; uint256 total; uint256 timestamp; } /// Events event ServiceAdded(bytes32 serviceId, string name, uint256 price); event ServiceSet(bytes32 serviceId, bool active); event ServicePaid( bytes32 projectId, address contractAddress, bytes32 serviceId, address user, uint256 amount, uint256 timestamp ); event ServiceWithdraw( bytes32 projectId, address contractAddress, bytes32 serviceId, uint256 amount ); /// Errors error ServiceNotActive(bytes32 serviceId); error InvalidTotalAmount(); error ServiceAlreadyPaid( bytes32 projectId, address contractAddress, bytes32 serviceId ); /// Add a service to the payment program /// @param _serviceId the service id /// @param _pricePerItem the price per item function addService(bytes32 _serviceId, uint256 _pricePerItem) external; /// Set the service active status /// @param _serviceId the service id /// @param _active the active status function setService(bytes32 _serviceId, bool _active) external; /// function payService by projectId and contract address /// @param _projectId bytes32 projectId /// @param _contract the contract address /// @param _serviceId the service id /// @param _qty the qty of items to pay function payService( bytes32 _projectId, address _contract, bytes32 _serviceId, uint256 _qty ) external payable; /// Withdraw per invoice /// @param _projectId the project id /// @param _contract the contract address /// @param _serviceId the service id /// @param _to the address to withdraw the balance function withdraw( bytes32 _projectId, address _contract, bytes32 _serviceId, address payable _to ) external; /// Withdraw the contract balance /// @param _to the address to withdraw the balance function withdrawAll(address payable _to) external; }
{ "optimizer": { "enabled": true, "runs": 1000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidTotalAmount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"bytes32","name":"projectId","type":"bytes32"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"ServiceAlreadyPaid","type":"error"},{"inputs":[{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"ServiceNotActive","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"ServiceAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"projectId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ServicePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"ServiceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"projectId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ServiceWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"SetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authOperator","type":"address"}],"name":"SetAuthOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"SetOperator","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_serviceId","type":"bytes32"},{"internalType":"uint256","name":"_pricePerItem","type":"uint256"}],"name":"addService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"getAuthorizedAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"getAuthorizedOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"invoices","outputs":[{"internalType":"address","name":"user","type":"address"},{"components":[{"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"internalType":"uint256","name":"pricePerItem","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct IPayments.Service","name":"service","type":"tuple"},{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_projectId","type":"bytes32"},{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bytes32","name":"_serviceId","type":"bytes32"},{"internalType":"uint256","name":"_qty","type":"uint256"}],"name":"payService","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"services","outputs":[{"internalType":"bytes32","name":"serviceId","type":"bytes32"},{"internalType":"uint256","name":"pricePerItem","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setAuthorizedAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setAuthorizedOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_serviceId","type":"bytes32"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_projectId","type":"bytes32"},{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bytes32","name":"_serviceId","type":"bytes32"},{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b03191633179055600160035561118d806100376000396000f3fe6080604052600436106100d25760003560e01c8063893d20e81161007f578063cb35124411610059578063cb3512441461025e578063de72e71714610297578063f2fde38b14610300578063fa09e6301461032057600080fd5b8063893d20e8146101cd57806390fe3e32146101f557806399d80ed91461023e57600080fd5b806371c3a4b1116100b057806371c3a4b11461017a578063788f737d1461019a5780638690b8c9146101ba57600080fd5b80630a790eb7146100d75780632deacd04146101385780633ceafe411461015a575b600080fd5b3480156100e357600080fd5b506101166100f2366004610f90565b60046020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060015b60405180910390f35b34801561014457600080fd5b50610158610153366004610fc1565b610340565b005b34801561016657600080fd5b50610158610175366004611020565b610531565b34801561018657600080fd5b5061015861019536600461104c565b6105b8565b3480156101a657600080fd5b506101586101b536600461104c565b61075e565b6101586101c8366004611078565b6108ff565b3480156101d957600080fd5b506000546040516001600160a01b03909116815260200161012f565b34801561020157600080fd5b5061022e6102103660046110b5565b6001600160a01b031660009081526002602052604090205460ff1690565b604051901515815260200161012f565b34801561024a57600080fd5b506101586102593660046110d9565b610bad565b34801561026a57600080fd5b5061022e6102793660046110b5565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156102a357600080fd5b506102b76102b2366004611078565b610c5d565b604080516001600160a01b039096168652845160208088019190915285015186820152939093015115156060850152608084019190915260a083015260c082015260e00161012f565b34801561030c57600080fd5b5061015861031b3660046110b5565b610cf7565b34801561032c57600080fd5b5061015861033b3660046110b5565b610eea565b6000546001600160a01b0316331480159061036b57503360009081526001602052604090205460ff16155b15610388576040516282b42960e81b815260040160405180910390fd5b60008481526005602090815260408083206001600160a01b03871684528252808320858452825280832080548251818502810185019093528083529192909190849084015b8282101561045b5760008481526020908190206040805160a0810182526007860290920180546001600160a01b031683528151606080820184526001808401548352600284015483880152600384015460ff161515838601528587019290925260048301549385019390935260058201549284019290925260060154608083015290835290920191016103cd565b5050505090506000805b82518110156104a157828181518110610480576104806110fb565b602002602001015160600151826104979190611127565b9150600101610465565b506040516001600160a01b0384169082156108fc029083906000818181858888f193505050501580156104d8573d6000803e3d6000fd5b50604080518781526001600160a01b0387166020820152908101859052606081018290527f65f733aa3414ed7f696504b884c34a0cd3122b15416963ccdd3b61ae57f341729060800160405180910390a1505050505050565b6000546001600160a01b0316331480159061055c57503360009081526001602052604090205460ff16155b801561057857503360009081526002602052604090205460ff16155b15610595576040516282b42960e81b815260040160405180910390fd5b600091825260046020526040909120600201805460ff1916911515919091179055565b6000546001600160a01b031633148015906105e357503360009081526001602052604090205460ff16155b15610600576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0382166106815760405162461bcd60e51b815260206004820152602f60248201527f417574686f72697a65642053797374656d3a2041646d696e206164647265737360448201527f2063616e6e6f74206265206e756c6c000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b03821660009081526002602052604090205460ff16156107105760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a2041646d696e2063616e6e6f742060448201527f626520616e206f70657261746f720000000000000000000000000000000000006064820152608401610678565b6001600160a01b038216600081815260016020526040808220805460ff1916851515179055517f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19190a25050565b6000546001600160a01b0316331480159061078957503360009081526001602052604090205460ff16155b156107a6576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0382166108225760405162461bcd60e51b815260206004820152603260248201527f417574686f72697a65642053797374656d3a204f70657261746f72206164647260448201527f6573732063616e6e6f74206265206e756c6c00000000000000000000000000006064820152608401610678565b6001600160a01b03821660009081526001602052604090205460ff16156108b15760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a204f70657261746f722063616e6e60448201527f6f7420626520616e2061646d696e0000000000000000000000000000000000006064820152608401610678565b6001600160a01b038216600081815260026020526040808220805460ff1916851515179055517fdbebfba65bd6398fb722063efc10c99f624f9cd8ba657201056af918a676d5ee9190a25050565b610907610f4d565b60008281526004602052604090206002015460ff16610955576040517f2fffbd9b00000000000000000000000000000000000000000000000000000000815260048101839052602401610678565b600082815260046020526040812060010154610972908390611140565b90508034146109ad576040517f908128d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518060a00160405280336001600160a01b031681526020016004600087815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900460ff1615151515815250508152602001848152602001838152602001428152509050600560008781526020019081526020016000206000866001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002081908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550505060408201518160040155606082015181600501556080820151816006015550507f62117c93df16bb1361c74ea0245d0be933c44a55051e873915544592ea4da9ef868686338642604051610b93969594939291909586526001600160a01b039485166020870152604086019390935292166060840152608083019190915260a082015260c00190565b60405180910390a15050610ba76001600355565b50505050565b6000546001600160a01b03163314801590610bd857503360009081526001602052604090205460ff16155b8015610bf457503360009081526002602052604090205460ff16155b15610c11576040516282b42960e81b815260040160405180910390fd5b6040805160608101825283815260208082019384526000828401818152958152600490915291909120905181559051600182015590516002909101805460ff1916911515919091179055565b60056020528360005260406000206020528260005260406000206020528160005260406000208181548110610c9157600080fd5b600091825260209182902060079091020180546040805160608101825260018401548152600284015494810194909452600383015460ff16151590840152600482015460058301546006909301546001600160a01b039092169750929550919350915085565b6000546001600160a01b03163314610d21576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610d9d5760405162461bcd60e51b815260206004820152602b60248201527f417574686f72697a65642053797374656d3a204e6577206f776e65722063616e60448201527f6e6f74206265206e756c6c0000000000000000000000000000000000000000006064820152608401610678565b6000546001600160a01b0390811690821603610e215760405162461bcd60e51b815260206004820152603c60248201527f417574686f72697a65642053797374656d3a204e6577206f776e65722063616e60448201527f6e6f74206265207468652073616d65206173206f6c64206f776e6572000000006064820152608401610678565b600080546001600160a01b031681526002602052604090205460ff1615610eb05760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a204f776e65722063616e6e6f742060448201527f626520616e206f70657261746f720000000000000000000000000000000000006064820152608401610678565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610f14576040516282b42960e81b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f49573d6000803e3d6000fd5b5050565b600260035403610f89576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600355565b600060208284031215610fa257600080fd5b5035919050565b6001600160a01b0381168114610fbe57600080fd5b50565b60008060008060808587031215610fd757600080fd5b843593506020850135610fe981610fa9565b925060408501359150606085013561100081610fa9565b939692955090935050565b8035801515811461101b57600080fd5b919050565b6000806040838503121561103357600080fd5b823591506110436020840161100b565b90509250929050565b6000806040838503121561105f57600080fd5b823561106a81610fa9565b91506110436020840161100b565b6000806000806080858703121561108e57600080fd5b8435935060208501356110a081610fa9565b93969395505050506040820135916060013590565b6000602082840312156110c757600080fd5b81356110d281610fa9565b9392505050565b600080604083850312156110ec57600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561113a5761113a611111565b92915050565b808202811582820484141761113a5761113a61111156fea2646970667358221220be6bdad8c310c8aeb703449d2a02a462c118e978b93d5f6d50f914f905a0672c64736f6c63430008180033
Deployed Bytecode
0x6080604052600436106100d25760003560e01c8063893d20e81161007f578063cb35124411610059578063cb3512441461025e578063de72e71714610297578063f2fde38b14610300578063fa09e6301461032057600080fd5b8063893d20e8146101cd57806390fe3e32146101f557806399d80ed91461023e57600080fd5b806371c3a4b1116100b057806371c3a4b11461017a578063788f737d1461019a5780638690b8c9146101ba57600080fd5b80630a790eb7146100d75780632deacd04146101385780633ceafe411461015a575b600080fd5b3480156100e357600080fd5b506101166100f2366004610f90565b60046020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060015b60405180910390f35b34801561014457600080fd5b50610158610153366004610fc1565b610340565b005b34801561016657600080fd5b50610158610175366004611020565b610531565b34801561018657600080fd5b5061015861019536600461104c565b6105b8565b3480156101a657600080fd5b506101586101b536600461104c565b61075e565b6101586101c8366004611078565b6108ff565b3480156101d957600080fd5b506000546040516001600160a01b03909116815260200161012f565b34801561020157600080fd5b5061022e6102103660046110b5565b6001600160a01b031660009081526002602052604090205460ff1690565b604051901515815260200161012f565b34801561024a57600080fd5b506101586102593660046110d9565b610bad565b34801561026a57600080fd5b5061022e6102793660046110b5565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156102a357600080fd5b506102b76102b2366004611078565b610c5d565b604080516001600160a01b039096168652845160208088019190915285015186820152939093015115156060850152608084019190915260a083015260c082015260e00161012f565b34801561030c57600080fd5b5061015861031b3660046110b5565b610cf7565b34801561032c57600080fd5b5061015861033b3660046110b5565b610eea565b6000546001600160a01b0316331480159061036b57503360009081526001602052604090205460ff16155b15610388576040516282b42960e81b815260040160405180910390fd5b60008481526005602090815260408083206001600160a01b03871684528252808320858452825280832080548251818502810185019093528083529192909190849084015b8282101561045b5760008481526020908190206040805160a0810182526007860290920180546001600160a01b031683528151606080820184526001808401548352600284015483880152600384015460ff161515838601528587019290925260048301549385019390935260058201549284019290925260060154608083015290835290920191016103cd565b5050505090506000805b82518110156104a157828181518110610480576104806110fb565b602002602001015160600151826104979190611127565b9150600101610465565b506040516001600160a01b0384169082156108fc029083906000818181858888f193505050501580156104d8573d6000803e3d6000fd5b50604080518781526001600160a01b0387166020820152908101859052606081018290527f65f733aa3414ed7f696504b884c34a0cd3122b15416963ccdd3b61ae57f341729060800160405180910390a1505050505050565b6000546001600160a01b0316331480159061055c57503360009081526001602052604090205460ff16155b801561057857503360009081526002602052604090205460ff16155b15610595576040516282b42960e81b815260040160405180910390fd5b600091825260046020526040909120600201805460ff1916911515919091179055565b6000546001600160a01b031633148015906105e357503360009081526001602052604090205460ff16155b15610600576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0382166106815760405162461bcd60e51b815260206004820152602f60248201527f417574686f72697a65642053797374656d3a2041646d696e206164647265737360448201527f2063616e6e6f74206265206e756c6c000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b03821660009081526002602052604090205460ff16156107105760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a2041646d696e2063616e6e6f742060448201527f626520616e206f70657261746f720000000000000000000000000000000000006064820152608401610678565b6001600160a01b038216600081815260016020526040808220805460ff1916851515179055517f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19190a25050565b6000546001600160a01b0316331480159061078957503360009081526001602052604090205460ff16155b156107a6576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0382166108225760405162461bcd60e51b815260206004820152603260248201527f417574686f72697a65642053797374656d3a204f70657261746f72206164647260448201527f6573732063616e6e6f74206265206e756c6c00000000000000000000000000006064820152608401610678565b6001600160a01b03821660009081526001602052604090205460ff16156108b15760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a204f70657261746f722063616e6e60448201527f6f7420626520616e2061646d696e0000000000000000000000000000000000006064820152608401610678565b6001600160a01b038216600081815260026020526040808220805460ff1916851515179055517fdbebfba65bd6398fb722063efc10c99f624f9cd8ba657201056af918a676d5ee9190a25050565b610907610f4d565b60008281526004602052604090206002015460ff16610955576040517f2fffbd9b00000000000000000000000000000000000000000000000000000000815260048101839052602401610678565b600082815260046020526040812060010154610972908390611140565b90508034146109ad576040517f908128d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518060a00160405280336001600160a01b031681526020016004600087815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900460ff1615151515815250508152602001848152602001838152602001428152509050600560008781526020019081526020016000206000866001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002081908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550505060408201518160040155606082015181600501556080820151816006015550507f62117c93df16bb1361c74ea0245d0be933c44a55051e873915544592ea4da9ef868686338642604051610b93969594939291909586526001600160a01b039485166020870152604086019390935292166060840152608083019190915260a082015260c00190565b60405180910390a15050610ba76001600355565b50505050565b6000546001600160a01b03163314801590610bd857503360009081526001602052604090205460ff16155b8015610bf457503360009081526002602052604090205460ff16155b15610c11576040516282b42960e81b815260040160405180910390fd5b6040805160608101825283815260208082019384526000828401818152958152600490915291909120905181559051600182015590516002909101805460ff1916911515919091179055565b60056020528360005260406000206020528260005260406000206020528160005260406000208181548110610c9157600080fd5b600091825260209182902060079091020180546040805160608101825260018401548152600284015494810194909452600383015460ff16151590840152600482015460058301546006909301546001600160a01b039092169750929550919350915085565b6000546001600160a01b03163314610d21576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610d9d5760405162461bcd60e51b815260206004820152602b60248201527f417574686f72697a65642053797374656d3a204e6577206f776e65722063616e60448201527f6e6f74206265206e756c6c0000000000000000000000000000000000000000006064820152608401610678565b6000546001600160a01b0390811690821603610e215760405162461bcd60e51b815260206004820152603c60248201527f417574686f72697a65642053797374656d3a204e6577206f776e65722063616e60448201527f6e6f74206265207468652073616d65206173206f6c64206f776e6572000000006064820152608401610678565b600080546001600160a01b031681526002602052604090205460ff1615610eb05760405162461bcd60e51b815260206004820152602e60248201527f417574686f72697a65642053797374656d3a204f776e65722063616e6e6f742060448201527f626520616e206f70657261746f720000000000000000000000000000000000006064820152608401610678565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610f14576040516282b42960e81b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f49573d6000803e3d6000fd5b5050565b600260035403610f89576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600355565b600060208284031215610fa257600080fd5b5035919050565b6001600160a01b0381168114610fbe57600080fd5b50565b60008060008060808587031215610fd757600080fd5b843593506020850135610fe981610fa9565b925060408501359150606085013561100081610fa9565b939692955090935050565b8035801515811461101b57600080fd5b919050565b6000806040838503121561103357600080fd5b823591506110436020840161100b565b90509250929050565b6000806040838503121561105f57600080fd5b823561106a81610fa9565b91506110436020840161100b565b6000806000806080858703121561108e57600080fd5b8435935060208501356110a081610fa9565b93969395505050506040820135916060013590565b6000602082840312156110c757600080fd5b81356110d281610fa9565b9392505050565b600080604083850312156110ec57600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561113a5761113a611111565b92915050565b808202811582820484141761113a5761113a61111156fea2646970667358221220be6bdad8c310c8aeb703449d2a02a462c118e978b93d5f6d50f914f905a0672c64736f6c63430008180033
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.