Verified contractExactMIT
BridgeAssistE
Address0x930c2b5600befc19c1b90968ffaf5ee768609807
- Balance
0 ETH
- Transactions
331
- Compiler
solc 0.8.3
- Same code
4 more contracts
Details
- Compiler
- solc 0.8.3+commit.8d00100c
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- istanbul
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 12,153,042
- Creation transaction
- 0xd9b8ff99ea…0e186d0a39
CTIBE.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
interface IERC20 {
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract BridgeAssistE {
address public owner;
IERC20 public TKN;
modifier restricted {
require(msg.sender == owner, "This function is restricted to owner");
_;
}
event Collect(address indexed sender, uint256 amount);
event Dispense(address indexed sender, uint256 amount);
event TransferOwnership(address indexed previousOwner, address indexed newOwner);
function collect(address _sender, uint256 _amount) public restricted returns (bool success) {
require(TKN.allowance(_sender, address(this)) >= _amount, "Amount check failed");
require(TKN.transferFrom(_sender, address(this), _amount), "transferFrom() failure. Make sure that your balance is not lower than the allowance you set");
emit Collect(_sender, _amount);
return true;
}
function dispense(address _sender, uint256 _amount) public restricted returns (bool success) {
require(TKN.transfer(_sender, _amount), "transfer() failure. Contact contract owner");
emit Dispense(_sender, _amount);
return true;
}
function transferOwnership(address _newOwner) public restricted {
require(_newOwner != address(0), "Invalid address: should not be 0x0");
emit TransferOwnership(owner, _newOwner);
owner = _newOwner;
}
constructor(IERC20 _TKN, address _owner) {
TKN = _TKN;
owner = _owner;
}
}Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "istanbul",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.