Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
SimpleFiatTokenUtil
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * SPDX-License-Identifier: MIT * * Simplified implementation of FiatTokenUtil.sol * Authors: Samuel Sutch, Amhed Herrera */ pragma solidity 0.8.19; contract SimpleFiatTokenUtil { // keccak256("transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)")[0:4] bytes4 private constant _TRANSFER_WITH_AUTHORIZATION_SELECTOR = 0xe3ee160e; address private _fiatToken; uint8 public _version; event TransferFailed(address indexed authorizer, bytes32 indexed nonce); constructor(address fiatToken, uint8 version) { _fiatToken = fiatToken; _version = version; } function batchTransferWithAuthorization( address[] calldata from, address[] calldata to, uint256[] calldata value, uint256[] calldata validAfter, uint256[] calldata validBefore, bytes32[] calldata nonce, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s, uint256 _gasLimit ) public { require( from.length == to.length && to.length == value.length && value.length == validAfter.length && validAfter.length == validBefore.length && validBefore.length == nonce.length && nonce.length == v.length && v.length == r.length && r.length == s.length, "FiatTokenUtil: parameter length mismatch" ); for (uint256 i = 0; i < from.length; i++) { bytes memory data = abi.encodeWithSelector( _TRANSFER_WITH_AUTHORIZATION_SELECTOR, from[i], to[i], value[i], validAfter[i], validBefore[i], nonce[i], v[i], r[i], s[i] ); (bool success, ) = _fiatToken.call{gas: _gasLimit}(data); if (!success) { emit TransferFailed(from[i], nonce[i]); } } } }
{ "viaIR": true, "optimizer": { "enabled": true, "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":"fiatToken","type":"address"},{"internalType":"uint8","name":"version","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"TransferFailed","type":"event"},{"inputs":[],"name":"_version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"from","type":"address[]"},{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"value","type":"uint256[]"},{"internalType":"uint256[]","name":"validAfter","type":"uint256[]"},{"internalType":"uint256[]","name":"validBefore","type":"uint256[]"},{"internalType":"bytes32[]","name":"nonce","type":"bytes32[]"},{"internalType":"uint8[]","name":"v","type":"uint8[]"},{"internalType":"bytes32[]","name":"r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"s","type":"bytes32[]"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"}],"name":"batchTransferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60803461008d57601f61067a38819003918201601f19168301916001600160401b0383118484101761009257808492604094855283398101031261008d5780516001600160a01b038116919082900361008d57602001519060ff8216820361008d576000549160ff60a01b9060a01b169160018060a81b03191617176000556040516105d190816100a98239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe6102e080604052600436101561001457600080fd5b60003560e01c9081633e118dbe14610510575063cccbb34c1461003657600080fd5b3461046d5761014036600319011261046d576004356001600160401b03811161046d57610067903690600401610531565b908160e052610100526024356001600160401b03811161046d5761008f903690600401610531565b91908261014052610220526044356001600160401b03811161046d576100b9903690600401610531565b9081610120526101e0526001600160401b036064351161046d576100e236606435600401610531565b90816102c0526102a0526001600160401b036084351161046d5761010b36608435600401610531565b908161024052610160526001600160401b0360a4351161046d576101343660a435600401610531565b91908260a052610200526001600160401b0360c4351161046d5761015d3660c435600401610531565b93908461018052610280526001600160401b0360e4351161046d576101873660e435600401610531565b959086608052610260526001600160401b03610104351161046d57876101b33661010435600401610531565b98908960c0526101c052149788610506575b50876104fc575b50866104f2575b50856104e8575b50846104de575b50836104d4575b50826104ca575b5050156104745760006101a0525b60e0516101a0519080821015610472576102239161021e9161010051610561565b610587565b61023a61021e6101a0516101405161022051610561565b61024e6101a051610120516101e051610561565b356102636101a0516102c0516102a051610561565b356102786101a0516102405161016051610561565b3561028c6101a05160a05161020051610561565b356102a16101a0516101805161028051610561565b359160ff8316830361046d5760ff936102c36101a05160805161026051610561565b35956102d86101a05160c0516101c051610561565b6040516371f70b0760e11b60208201526001600160a01b039a8b1660248201529990981660448a01526064890152608488015260a487015260c48601521660e4840152610104830152356101248083019190915281526001600160401b036101608201908111908211176104525760008161016082930160405260018060a01b03825416826020835193019161012435f13d15610468573d6001600160401b0381116104525760405190601f196001600160401b03601f83018216603f01821684019081119084111761045257603f81601f840116011682016040528152600060203d92013e5b156103f4575b6101a05160001981146103de576001016101a0526101fd565b634e487b7160e01b600052601160045260246000fd5b61040a61021e6101a05160e05161010051610561565b61041d6101a05160a05161020051610561565b35906001600160a01b03167f13cab104924a28ca77b3228596ebc8e597aa628ce47d39429f3cb62b9a9ac60f600080a36103c5565b634e487b7160e01b600052604160045260246000fd5b6103bf565b600080fd5b005b60405162461bcd60e51b815260206004820152602860248201527f46696174546f6b656e5574696c3a20706172616d65746572206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b14905038806101ef565b81149250386101e8565b81149350386101e1565b81149450386101da565b81149550386101d3565b81149650386101cc565b81149750386101c5565b3461046d57600036600319011261046d5760209060ff60005460a01c168152f35b9181601f8401121561046d578235916001600160401b03831161046d576020808501948460051b01011161046d57565b91908110156105715760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b038116810361046d579056fea2646970667358221220b4aaa8b91402513d8d52754298b7339aa0ab1ca4e48d658a72cbba451bca29b564736f6c63430008130033000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000000000000000000000000000000000000000000002
Deployed Bytecode
0x6102e080604052600436101561001457600080fd5b60003560e01c9081633e118dbe14610510575063cccbb34c1461003657600080fd5b3461046d5761014036600319011261046d576004356001600160401b03811161046d57610067903690600401610531565b908160e052610100526024356001600160401b03811161046d5761008f903690600401610531565b91908261014052610220526044356001600160401b03811161046d576100b9903690600401610531565b9081610120526101e0526001600160401b036064351161046d576100e236606435600401610531565b90816102c0526102a0526001600160401b036084351161046d5761010b36608435600401610531565b908161024052610160526001600160401b0360a4351161046d576101343660a435600401610531565b91908260a052610200526001600160401b0360c4351161046d5761015d3660c435600401610531565b93908461018052610280526001600160401b0360e4351161046d576101873660e435600401610531565b959086608052610260526001600160401b03610104351161046d57876101b33661010435600401610531565b98908960c0526101c052149788610506575b50876104fc575b50866104f2575b50856104e8575b50846104de575b50836104d4575b50826104ca575b5050156104745760006101a0525b60e0516101a0519080821015610472576102239161021e9161010051610561565b610587565b61023a61021e6101a0516101405161022051610561565b61024e6101a051610120516101e051610561565b356102636101a0516102c0516102a051610561565b356102786101a0516102405161016051610561565b3561028c6101a05160a05161020051610561565b356102a16101a0516101805161028051610561565b359160ff8316830361046d5760ff936102c36101a05160805161026051610561565b35956102d86101a05160c0516101c051610561565b6040516371f70b0760e11b60208201526001600160a01b039a8b1660248201529990981660448a01526064890152608488015260a487015260c48601521660e4840152610104830152356101248083019190915281526001600160401b036101608201908111908211176104525760008161016082930160405260018060a01b03825416826020835193019161012435f13d15610468573d6001600160401b0381116104525760405190601f196001600160401b03601f83018216603f01821684019081119084111761045257603f81601f840116011682016040528152600060203d92013e5b156103f4575b6101a05160001981146103de576001016101a0526101fd565b634e487b7160e01b600052601160045260246000fd5b61040a61021e6101a05160e05161010051610561565b61041d6101a05160a05161020051610561565b35906001600160a01b03167f13cab104924a28ca77b3228596ebc8e597aa628ce47d39429f3cb62b9a9ac60f600080a36103c5565b634e487b7160e01b600052604160045260246000fd5b6103bf565b600080fd5b005b60405162461bcd60e51b815260206004820152602860248201527f46696174546f6b656e5574696c3a20706172616d65746572206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b14905038806101ef565b81149250386101e8565b81149350386101e1565b81149450386101da565b81149550386101d3565b81149650386101cc565b81149750386101c5565b3461046d57600036600319011261046d5760209060ff60005460a01c168152f35b9181601f8401121561046d578235916001600160401b03831161046d576020808501948460051b01011161046d57565b91908110156105715760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b038116810361046d579056fea2646970667358221220b4aaa8b91402513d8d52754298b7339aa0ab1ca4e48d658a72cbba451bca29b564736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000000000000000000000000000000000000000000002
-----Decoded View---------------
Arg [0] : fiatToken (address): 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Arg [1] : version (uint8): 2
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000002
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.