More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MultiSig
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; interface IERC20 { function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transfer( address recipient, uint256 amount ) external returns (bool); function decimals() external view returns (uint8); } struct Deposit { uint256 tokens; uint256 payout_timestamp; address receiver; address depositor; } contract MultiSig { IERC20 token; address owner; Deposit[] public deposits; event DepositEvent(uint256 index); constructor(address address_token) { token = IERC20(address_token); owner = msg.sender; } function deposit( address receiver, uint256 amount, uint256 payout_timestamp ) public { token.transferFrom(msg.sender, address(this), amount); deposits.push(Deposit(amount, payout_timestamp, receiver, msg.sender)); emit DepositEvent(deposits.length - 1); } function payout(uint256 deposit_index) public { Deposit memory this_deposit = deposits[deposit_index]; require( this_deposit.tokens > 0, "This deposit has already been withdrawn" ); require( msg.sender == this_deposit.depositor || msg.sender == owner, "You are neither the depositor nor the owner" ); deposits[deposit_index].tokens = 0; token.transfer(this_deposit.receiver, this_deposit.tokens); } function refund(uint256 deposit_index) public { Deposit memory this_deposit = deposits[deposit_index]; require( this_deposit.tokens > 0, "This deposit has already been withdrawn" ); require( msg.sender == this_deposit.receiver || msg.sender == owner, "You are neither the owner nor the receiver" ); deposits[deposit_index].tokens = 0; token.transfer(this_deposit.depositor, this_deposit.tokens); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"address_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"DepositEvent","type":"event"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"payout_timestamp","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposits","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"},{"internalType":"uint256","name":"payout_timestamp","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"depositor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"deposit_index","type":"uint256"}],"name":"payout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deposit_index","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610f55380380610f558339818101604052810190610032919061011c565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610149565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100e9826100be565b9050919050565b6100f9816100de565b811461010457600080fd5b50565b600081519050610116816100f0565b92915050565b600060208284031215610132576101316100b9565b5b600061014084828501610107565b91505092915050565b610dfd806101586000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630efe6a8b14610051578063278ecde11461006d578063b02c43d014610089578063e1152343146100bc575b600080fd5b61006b600480360381019061006691906109ab565b6100d8565b005b610087600480360381019061008291906109fe565b6102e2565b005b6100a3600480360381019061009e91906109fe565b6105ba565b6040516100b39493929190610a49565b60405180910390f35b6100d660048036038101906100d191906109fe565b61063a565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161013593929190610a8e565b6020604051808303816000875af1158015610154573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101789190610afd565b50600260405180608001604052808481526020018381526020018573ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000209060040201600090919091909150600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050507f0adeae8759aabaf58fb5029d7519173f1f604ef94b5a157fb8f6f2a6af34b13d60016002805490506102c89190610b59565b6040516102d59190610b8d565b60405180910390a1505050565b6000600282815481106102f8576102f7610ba8565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161041a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041190610c5a565b60405180910390fd5b806040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806104a55750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104db90610cec565b60405180910390fd5b6000600283815481106104fa576104f9610ba8565b5b90600052602060002090600402016000018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb826060015183600001516040518363ffffffff1660e01b8152600401610572929190610d0c565b6020604051808303816000875af1158015610591573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b59190610afd565b505050565b600281815481106105ca57600080fd5b90600052602060002090600402016000915090508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b6000600282815481106106505761064f610ba8565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000816000015111610772576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076990610c5a565b60405180910390fd5b806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107fd5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61083c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083390610da7565b60405180910390fd5b60006002838154811061085257610851610ba8565b5b90600052602060002090600402016000018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb826040015183600001516040518363ffffffff1660e01b81526004016108ca929190610d0c565b6020604051808303816000875af11580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d9190610afd565b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061094282610917565b9050919050565b61095281610937565b811461095d57600080fd5b50565b60008135905061096f81610949565b92915050565b6000819050919050565b61098881610975565b811461099357600080fd5b50565b6000813590506109a58161097f565b92915050565b6000806000606084860312156109c4576109c3610912565b5b60006109d286828701610960565b93505060206109e386828701610996565b92505060406109f486828701610996565b9150509250925092565b600060208284031215610a1457610a13610912565b5b6000610a2284828501610996565b91505092915050565b610a3481610975565b82525050565b610a4381610937565b82525050565b6000608082019050610a5e6000830187610a2b565b610a6b6020830186610a2b565b610a786040830185610a3a565b610a856060830184610a3a565b95945050505050565b6000606082019050610aa36000830186610a3a565b610ab06020830185610a3a565b610abd6040830184610a2b565b949350505050565b60008115159050919050565b610ada81610ac5565b8114610ae557600080fd5b50565b600081519050610af781610ad1565b92915050565b600060208284031215610b1357610b12610912565b5b6000610b2184828501610ae8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b6482610975565b9150610b6f83610975565b9250828203905081811115610b8757610b86610b2a565b5b92915050565b6000602082019050610ba26000830184610a2b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082825260208201905092915050565b7f54686973206465706f7369742068617320616c7265616479206265656e20776960008201527f7468647261776e00000000000000000000000000000000000000000000000000602082015250565b6000610c44602783610bd7565b9150610c4f82610be8565b604082019050919050565b60006020820190508181036000830152610c7381610c37565b9050919050565b7f596f7520617265206e65697468657220746865206f776e6572206e6f7220746860008201527f6520726563656976657200000000000000000000000000000000000000000000602082015250565b6000610cd6602a83610bd7565b9150610ce182610c7a565b604082019050919050565b60006020820190508181036000830152610d0581610cc9565b9050919050565b6000604082019050610d216000830185610a3a565b610d2e6020830184610a2b565b9392505050565b7f596f7520617265206e65697468657220746865206465706f7369746f72206e6f60008201527f7220746865206f776e6572000000000000000000000000000000000000000000602082015250565b6000610d91602b83610bd7565b9150610d9c82610d35565b604082019050919050565b60006020820190508181036000830152610dc081610d84565b905091905056fea2646970667358221220be72eed30c792f686c45263d8e7328a8a25773b3d2f9b63d99ca2aa819d29f3564736f6c63430008110033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630efe6a8b14610051578063278ecde11461006d578063b02c43d014610089578063e1152343146100bc575b600080fd5b61006b600480360381019061006691906109ab565b6100d8565b005b610087600480360381019061008291906109fe565b6102e2565b005b6100a3600480360381019061009e91906109fe565b6105ba565b6040516100b39493929190610a49565b60405180910390f35b6100d660048036038101906100d191906109fe565b61063a565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161013593929190610a8e565b6020604051808303816000875af1158015610154573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101789190610afd565b50600260405180608001604052808481526020018381526020018573ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000209060040201600090919091909150600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050507f0adeae8759aabaf58fb5029d7519173f1f604ef94b5a157fb8f6f2a6af34b13d60016002805490506102c89190610b59565b6040516102d59190610b8d565b60405180910390a1505050565b6000600282815481106102f8576102f7610ba8565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161041a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041190610c5a565b60405180910390fd5b806040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806104a55750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104db90610cec565b60405180910390fd5b6000600283815481106104fa576104f9610ba8565b5b90600052602060002090600402016000018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb826060015183600001516040518363ffffffff1660e01b8152600401610572929190610d0c565b6020604051808303816000875af1158015610591573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b59190610afd565b505050565b600281815481106105ca57600080fd5b90600052602060002090600402016000915090508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b6000600282815481106106505761064f610ba8565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000816000015111610772576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076990610c5a565b60405180910390fd5b806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107fd5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61083c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083390610da7565b60405180910390fd5b60006002838154811061085257610851610ba8565b5b90600052602060002090600402016000018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb826040015183600001516040518363ffffffff1660e01b81526004016108ca929190610d0c565b6020604051808303816000875af11580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d9190610afd565b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061094282610917565b9050919050565b61095281610937565b811461095d57600080fd5b50565b60008135905061096f81610949565b92915050565b6000819050919050565b61098881610975565b811461099357600080fd5b50565b6000813590506109a58161097f565b92915050565b6000806000606084860312156109c4576109c3610912565b5b60006109d286828701610960565b93505060206109e386828701610996565b92505060406109f486828701610996565b9150509250925092565b600060208284031215610a1457610a13610912565b5b6000610a2284828501610996565b91505092915050565b610a3481610975565b82525050565b610a4381610937565b82525050565b6000608082019050610a5e6000830187610a2b565b610a6b6020830186610a2b565b610a786040830185610a3a565b610a856060830184610a3a565b95945050505050565b6000606082019050610aa36000830186610a3a565b610ab06020830185610a3a565b610abd6040830184610a2b565b949350505050565b60008115159050919050565b610ada81610ac5565b8114610ae557600080fd5b50565b600081519050610af781610ad1565b92915050565b600060208284031215610b1357610b12610912565b5b6000610b2184828501610ae8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b6482610975565b9150610b6f83610975565b9250828203905081811115610b8757610b86610b2a565b5b92915050565b6000602082019050610ba26000830184610a2b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082825260208201905092915050565b7f54686973206465706f7369742068617320616c7265616479206265656e20776960008201527f7468647261776e00000000000000000000000000000000000000000000000000602082015250565b6000610c44602783610bd7565b9150610c4f82610be8565b604082019050919050565b60006020820190508181036000830152610c7381610c37565b9050919050565b7f596f7520617265206e65697468657220746865206f776e6572206e6f7220746860008201527f6520726563656976657200000000000000000000000000000000000000000000602082015250565b6000610cd6602a83610bd7565b9150610ce182610c7a565b604082019050919050565b60006020820190508181036000830152610d0581610cc9565b9050919050565b6000604082019050610d216000830185610a3a565b610d2e6020830184610a2b565b9392505050565b7f596f7520617265206e65697468657220746865206465706f7369746f72206e6f60008201527f7220746865206f776e6572000000000000000000000000000000000000000000602082015250565b6000610d91602b83610bd7565b9150610d9c82610d35565b604082019050919050565b60006020820190508181036000830152610dc081610d84565b905091905056fea2646970667358221220be72eed30c792f686c45263d8e7328a8a25773b3d2f9b63d99ca2aa819d29f3564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
-----Decoded View---------------
Arg [0] : address_token (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.