More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 12300377 | 1259 days ago | IN | 0 ETH | 0.02795377 |
Loading...
Loading
Contract Name:
InsurancePool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract InsurancePool is Ownable { IERC20 public tokenContract; constructor(IERC20 _tokenContract) public { tokenContract = _tokenContract; } function setTokenContract(IERC20 _tokenContract) public onlyOwner { tokenContract = _tokenContract; } function transfer(address to, uint256 amount) public onlyOwner { tokenContract.transfer(to, amount); emit InsurancePoolTransfer(address(this), to, amount); } event InsurancePoolTransfer( address indexed from, address indexed to, uint256 amount ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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 virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../GSN/Context.sol"; /** * @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. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @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 Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `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 Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_tokenContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InsurancePoolTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_tokenContract","type":"address"}],"name":"setTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516105a63803806105a68339818101604052602081101561003357600080fd5b5051600061003f6100ae565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100b2565b3390565b6104e5806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806355a373d614610067578063715018a61461008b5780638da5cb5b14610095578063a9059cbb1461009d578063bbcd5bbe146100c9578063f2fde38b146100ef575b600080fd5b61006f610115565b604080516001600160a01b039092168252519081900360200190f35b610093610124565b005b61006f6101c6565b610093600480360360408110156100b357600080fd5b506001600160a01b0381351690602001356101d5565b610093600480360360208110156100df57600080fd5b50356001600160a01b03166102f3565b6100936004803603602081101561010557600080fd5b50356001600160a01b031661036d565b6001546001600160a01b031681565b61012c610465565b6000546001600160a01b0390811691161461017c576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6101dd610465565b6000546001600160a01b0390811691161461022d576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561028357600080fd5b505af1158015610297573d6000803e3d6000fd5b505050506040513d60208110156102ad57600080fd5b50506040805182815290516001600160a01b0384169130917fc43b1f0837daa625382691b3ab7ba3e67709f533e02436618d43de54f0471ff29181900360200190a35050565b6102fb610465565b6000546001600160a01b0390811691161461034b576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610375610465565b6000546001600160a01b039081169116146103c5576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b6001600160a01b03811661040a5760405162461bcd60e51b815260040180806020018281038252602681526020018061046a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122019c718f751eb51f66ed6c38eeacf79feb5683bdd66d961acba0c0e0b463ba31664736f6c634300060c00330000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a9
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806355a373d614610067578063715018a61461008b5780638da5cb5b14610095578063a9059cbb1461009d578063bbcd5bbe146100c9578063f2fde38b146100ef575b600080fd5b61006f610115565b604080516001600160a01b039092168252519081900360200190f35b610093610124565b005b61006f6101c6565b610093600480360360408110156100b357600080fd5b506001600160a01b0381351690602001356101d5565b610093600480360360208110156100df57600080fd5b50356001600160a01b03166102f3565b6100936004803603602081101561010557600080fd5b50356001600160a01b031661036d565b6001546001600160a01b031681565b61012c610465565b6000546001600160a01b0390811691161461017c576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6101dd610465565b6000546001600160a01b0390811691161461022d576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561028357600080fd5b505af1158015610297573d6000803e3d6000fd5b505050506040513d60208110156102ad57600080fd5b50506040805182815290516001600160a01b0384169130917fc43b1f0837daa625382691b3ab7ba3e67709f533e02436618d43de54f0471ff29181900360200190a35050565b6102fb610465565b6000546001600160a01b0390811691161461034b576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610375610465565b6000546001600160a01b039081169116146103c5576040805162461bcd60e51b81526020600482018190526024820152600080516020610490833981519152604482015290519081900360640190fd5b6001600160a01b03811661040a5760405162461bcd60e51b815260040180806020018281038252602681526020018061046a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122019c718f751eb51f66ed6c38eeacf79feb5683bdd66d961acba0c0e0b463ba31664736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a9
-----Decoded View---------------
Arg [0] : _tokenContract (address): 0x3c9d6c1C73b31c837832c72E04D3152f051fc1A9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a9
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.