编译器
0.8.19+commit.7dd6d404
文件 1 的 6:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
文件 2 的 6:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
文件 3 的 6:IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
文件 4 的 6:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
文件 5 的 6:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}
文件 6 的 6:SelfBridge2.sol
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract SelfBridge2 is ReentrancyGuard {
using SafeERC20 for IERC20;
string public constant title = "SelfBridge v0.3.6";
IERC20 public immutable selfToken;
uint public immutable selfDecimals;
address public admin;
address public agent;
address public vault;
uint public minBridge;
uint public maxBridge;
uint public maxSupply;
uint public bridgeFee;
uint public minFee;
uint public collectedFee;
uint public transferredFee;
uint public nonce;
bool public shutDownFlag;
uint256 public lastTransaction;
struct Transaction {
address owner;
address token;
uint amount;
bool completed;
}
mapping(uint => Transaction) public outbounds;
uint public inonce;
mapping(uint => Transaction) public inbounds;
event tokensOutBound(uint nonce, address indexed holder, uint amount);
event tokensInBound(uint nonce, address indexed holder, uint amount);
event deposited(uint amount);
event withdrawn(uint amount);
event nonceUpdated(uint nonce);
event iNonceUpdated(uint inonce);
event feeTransferred(uint amount);
event feeUpdated(uint newBridgeFee);
event minFeeUpdated(uint newMinFee);
event adminUpdated(address indexed admin);
event agentUpdated(address indexed agent);
event vaultUpdated(address indexed vault);
event shutdownActivated(bool flag);
event minBridgeUpdated(uint amount);
event maxBridgeUpdated(uint amount);
event maxSupplyUpdated(uint amount);
constructor(address _selfToken) {
require(_selfToken != address(0), "Invalid _selfToken address");
selfToken = IERC20(_selfToken);
selfDecimals = 18;
nonce = 0;
nonce = 0;
minBridge = 1000 * (10 ** selfDecimals);
maxBridge = 100_000 * (10 ** selfDecimals);
maxSupply = 1_200_000 * (10 ** selfDecimals);
minFee = 1000 * (10 ** selfDecimals);
admin = msg.sender;
agent = msg.sender;
lastTransaction = 0;
shutDownFlag = false;
}
modifier onlyAdmin() {
require(
msg.sender == admin,
"only the admin can executed this routine"
);
_;
}
modifier onlyAgent() {
require(
msg.sender == agent,
"only the agent can executed this routine"
);
_;
}
function outBound(uint _amount) external nonReentrant {
require(!shutDownFlag, "Bridge has ShutDown Status");
require(_amount >= minBridge, "Amount must be >= minBridge ");
require(_amount <= maxBridge, "Amount must be <= maxBridge ");
require(
selfToken.allowance(msg.sender, address(this)) >= _amount,
"Must approve token transfer first"
);
require(
selfToken.balanceOf(msg.sender) >= _amount,
"Insufficient balance"
);
require(
block.timestamp >= (lastTransaction + 1 minutes),
"Transaction delay of 1 minute active!"
);
lastTransaction = block.timestamp;
uint fee = (_amount * bridgeFee) / (10 ** 5);
if (fee < minFee) fee = minFee;
address _to = address(this);
if ((selfToken.balanceOf(address(this)) + _amount) > maxSupply) {
_to = address(vault);
}
selfToken.transferFrom(msg.sender, _to, _amount);
collectedFee += fee;
Transaction memory _transaction = Transaction({
owner: msg.sender,
token: address(selfToken),
amount: _amount,
completed: false
});
outbounds[++nonce] = _transaction;
emit tokensOutBound(nonce, msg.sender, (_amount - fee));
}
function getOutBound(
uint _nonce
)
external
view
returns (address _owner, address _token, uint _amount, bool _completed)
{
_owner = outbounds[_nonce].owner;
_token = outbounds[_nonce].token;
_amount = outbounds[_nonce].amount;
_completed = outbounds[_nonce].completed;
}
function getOrderAmount(uint _nonce) external view returns (uint) {
return (outbounds[_nonce].amount);
}
function inBound(
uint _inonce,
address _to,
uint _amount
) external onlyAgent {
require(_to != address(0), "Invalid _to address");
require(!shutDownFlag, "Bridge has ShutDown Status");
require(_amount <= maxBridge, "Amount must be <= maxBridge ");
inonce = _inonce;
Transaction memory _transaction = Transaction({
owner: _to,
token: address(selfToken),
amount: _amount,
completed: false
});
inbounds[inonce] = _transaction;
require(
selfToken.balanceOf(address(this)) >= _amount,
"Insufficient balance"
);
selfToken.transfer(_to, _amount);
inbounds[inonce].completed = true;
emit tokensInBound(inonce, _to, _amount);
}
function deposit(uint _amount) external onlyAdmin {
require(_amount >= minBridge, "Amount must be higher than 10 ");
require(
selfToken.allowance(msg.sender, address(this)) >= _amount,
"Must approve token transfer first"
);
selfToken.transferFrom(msg.sender, address(this), _amount);
emit deposited(_amount);
}
function withdraw(uint _amount) external onlyAdmin {
require(_amount >= minBridge, "Amount must be higher than 10 ");
require(
selfToken.balanceOf(address(this)) >= _amount,
"Insufficient balance"
);
selfToken.transfer(admin, _amount);
emit withdrawn(_amount);
}
function transferFee() external onlyAgent {
uint amount = collectedFee - transferredFee;
require(amount >= 0, "Pending fee collected must be higher than 0");
require(
selfToken.balanceOf(address(this)) >= amount,
"Unsufficient balance for fee transfer"
);
selfToken.transfer(agent, amount);
transferredFee = collectedFee;
emit feeTransferred(amount);
}
function setBridgeFee(uint _newBridgeFee) external onlyAdmin {
bridgeFee = _newBridgeFee;
emit feeUpdated(_newBridgeFee);
}
function changeAdmin(address _newAdmin) external onlyAdmin {
admin = _newAdmin;
emit adminUpdated(_newAdmin);
}
function changeAgent(address _newAgent) external onlyAdmin {
agent = _newAgent;
emit agentUpdated(_newAgent);
}
function setVault(address _newVault) external onlyAdmin {
vault = _newVault;
emit vaultUpdated(_newVault);
}
function setShutDownFlag(bool _flag) external onlyAdmin {
shutDownFlag = _flag;
emit shutdownActivated(_flag);
}
function timerReady() external view returns (bool) {
return block.timestamp >= (lastTransaction + 1 minutes);
}
function totalSupply() public view returns (uint) {
return selfToken.balanceOf(address(this));
}
function setNonce(uint _nonce) external onlyAdmin {
nonce = _nonce;
emit nonceUpdated(nonce);
}
function setInonce(uint _inonce) external onlyAdmin {
inonce = _inonce;
emit iNonceUpdated(inonce);
}
function setMinBridge(uint _amount) external onlyAdmin {
require(_amount >= 0, "Amount must be >= 0 ");
require(_amount <= 1_000_000, "Amount must <= 1m");
minBridge = _amount * (10 ** selfDecimals);
emit minBridgeUpdated(_amount);
}
function setMaxBridge(uint _amount) external onlyAdmin {
require(_amount >= 0, "Amount must be >= 0 ");
require(_amount <= 5_000_000, "Amount must <= 5m");
maxBridge = _amount * (10 ** selfDecimals);
emit maxBridgeUpdated(_amount);
}
function setMaxSupply(uint _amount) external onlyAdmin {
require(_amount >= 5_000, "Amount must be >= 5_000 ");
require(_amount <= 10_000_000, "Amount must <= 10m");
maxSupply = _amount * (10 ** selfDecimals);
emit maxSupplyUpdated(_amount);
}
function setMinFee(uint _newMinFee) external onlyAdmin {
minFee = _newMinFee;
emit minFeeUpdated(_newMinFee);
}
}
{
"compilationTarget": {
"contracts/SelfBridge2.sol": "SelfBridge2"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_selfToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"adminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"agent","type":"address"}],"name":"agentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"feeTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newBridgeFee","type":"uint256"}],"name":"feeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"inonce","type":"uint256"}],"name":"iNonceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"maxBridgeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"maxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"minBridgeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinFee","type":"uint256"}],"name":"minFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"nonceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"shutdownActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokensInBound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokensOutBound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"vaultUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawn","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"agent","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAgent","type":"address"}],"name":"changeAgent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectedFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"getOrderAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"getOutBound","outputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_completed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inonce","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"inBound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"inbounds","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"completed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBridge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBridge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"outBound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"outbounds","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"completed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"selfDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"selfToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newBridgeFee","type":"uint256"}],"name":"setBridgeFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inonce","type":"uint256"}],"name":"setInonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMinBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinFee","type":"uint256"}],"name":"setMinFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"setNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setShutDownFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newVault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shutDownFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timerReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"title","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferredFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]