Verified contractPartialMIT
Cashier
Address0x0000000004cc52cc59f59a2e1fa2e9cf0f001b66
- Balance
0 ETH
- Transactions
455
- Compiler
solc 0.8.13
- Same code
Only this contract
Details
- Compiler
- solc 0.8.13+commit.abaa5c0e
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- petersburg
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 15,530,840
- Creation transaction
- 0xb20b4d7865…1276a7457a
Cashier.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
contract Cashier {
address payable public coldWallet;
constructor(address multiSigWallet) payable
{
coldWallet = payable(multiSigWallet);
}
function execute(address protocalAddress, bytes calldata data, uint256 sumPrice) public payable
{
require(protocalAddress != address(0) && protocalAddress != address(this), "invalid protocol address");
require(msg.value >= sumPrice * 1005 / 1000, "platform fee required");
coldWallet.transfer(sumPrice * 5 / 1000);
(bool success, bytes memory result) = protocalAddress.call{value: sumPrice}(data);
if(!success)
_revertWithData(result);
_returnWithData(result);
}
receive() external payable {}
function _revertWithData(bytes memory data) private pure {
assembly { revert(add(data, 32), mload(data)) }
}
function _returnWithData(bytes memory data) private pure {
assembly { return(add(data, 32), mload(data)) }
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "petersburg"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.