// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
interface IERC20 {
function transfer(address, uint) external;
function transferFrom(address, address, uint) external;
}
contract WjxnBscBridge {
uint chainId;
address public admin;
uint public penalty_amount = 0;
address public penalty_wallet;
uint public max_pending_audit_records = 10;
uint public pending_audit_records;
IERC20 public wjxn = IERC20(0xcA1262e77Fb25c0a4112CFc9bad3ff54F617f2e6);
mapping(uint => uint) public fee_percent; // 8 decimals
mapping(uint => uint) public minimum_fee_amount;
bool public use_no_gas;
enum RequestStatus {Init, Proved, Verified, Released, Completed, Rejected}
struct Request {
uint src_chain_id;
uint dest_chain_id;
uint amount;
uint fee_amount;
address to;
uint deposit_timestamp;
bytes32 src_chain_data_hash;
bytes32 data_hash;
RequestStatus status;
string deposit_tx_hash;
string deposit_tx_link;
string release_tx_link;
}
Request[] public requests;
address[] public auditors;
address[] public verifiers;
address[] public bridge_executors;
mapping(address => uint) public operating_limits;
mapping(address => address) public fee_wallets;
mapping(bytes32 => bool) public proccessed_txd_hashes;
mapping(bytes32 => Request) public foreign_requests;
event Deposit(uint indexed request_id, bytes32 indexed data_hash, address indexed to, uint amount, uint fee_amount, uint64 src_chain_id, uint64 dest_chain_id, uint128 deposit_timestamp);
event Release(bytes32 indexed src_chain_data_hash);
event Verify_Data_Hash(bytes32 src_chain_data_hash);
event Reject_Bridge_Transaction(bytes32 src_chain_data_hash);
event Complete_Release_Tx_Link(uint request_id, string deposit_tx_hash, string release_tx_hash, bytes32 info_hash);
event Update_Release_Tx_Link(uint request_id, string deposit_tx_hash, string release_tx_hash);
event Reject_Request(uint request_id);
event Set_Fee(uint fee_percent, uint minimum_fee_amount);
event Add_Penalty_Amount(uint amount, bytes32 info_hash);
event Subtract_Penalty_Amount(uint amount, bytes32 info_hash);
event Withdraw_By_Admin(address token, uint amount);
constructor() {
admin = msg.sender;
uint _chainId;
assembly {
_chainId := chainid()
}
chainId = _chainId;
penalty_wallet = msg.sender;
}
modifier onlyAdmin() {
require(admin == msg.sender, "Only Admin can perform this operation.");
_;
}
modifier onlyAuditor() {
require(isAuditor(msg.sender), "Only Auditor can perform this operation.");
_;
}
modifier onlyVerifier() {
require(isVerifier(msg.sender), "Only Verifier can perform this operation.");
_;
}
modifier onlyExecutor() {
require(isBridgeExecutor(msg.sender), "Not a bridge executor");
_;
}
modifier noGas() {
uint gas = gasleft();
_;
if(use_no_gas){
payable(msg.sender).transfer(tx.gasprice * (gas - gasleft()));
}
}
function deposit(uint dest_chain_id, uint amount) external {
require(amount >= minimum_fee_amount[dest_chain_id], "Minimum amount");
require(chainId != dest_chain_id, "Invalid Destnation network");
uint request_id = requests.length;
uint fee_amount = amount * fee_percent[dest_chain_id] / 1e8;
if(fee_amount < minimum_fee_amount[dest_chain_id]) fee_amount = minimum_fee_amount[dest_chain_id];
bytes32 src_chain_data_hash = _get_data_hash(request_id, msg.sender, chainId, dest_chain_id, amount, fee_amount, block.timestamp);
Request memory request = Request({
src_chain_id: chainId,
dest_chain_id: dest_chain_id,
amount: amount,
fee_amount: fee_amount,
to: msg.sender,
deposit_timestamp: block.timestamp,
src_chain_data_hash: src_chain_data_hash,
data_hash: 0,
status: RequestStatus.Init,
deposit_tx_hash: "",
deposit_tx_link: "",
release_tx_link: ""
});
requests.push(request);
wjxn.transferFrom(msg.sender, address(this), amount);
emit Deposit(request_id, src_chain_data_hash, msg.sender, amount, fee_amount, uint64(chainId), uint64(dest_chain_id), uint128(block.timestamp));
}
function verify_data_hash(
uint request_id,
address to,
uint src_chain_id,
uint dest_chain_id,
uint amount,
uint fee_amount,
uint timestamp,
bytes32 src_chain_data_hash,
string memory deposit_tx_hash
) external noGas onlyVerifier {
require( dest_chain_id == chainId, "Incorrect destination network" );
require( src_chain_data_hash == _get_data_hash(request_id, to, src_chain_id, chainId, amount, fee_amount, timestamp), "Incorrect data hash");
bytes32 txDHash = keccak256(abi.encodePacked(deposit_tx_hash));
require( !proccessed_txd_hashes[txDHash], "Invalid deposit tx hash");
bytes32 data_hash = keccak256(abi.encodePacked(src_chain_data_hash, deposit_tx_hash));
Request memory request = Request({
src_chain_id: src_chain_id,
dest_chain_id: dest_chain_id,
amount: amount,
fee_amount: fee_amount,
to: to,
deposit_timestamp: timestamp,
src_chain_data_hash: src_chain_data_hash,
data_hash: data_hash,
status: RequestStatus.Verified,
deposit_tx_hash: deposit_tx_hash,
deposit_tx_link: "",
release_tx_link: ""
});
foreign_requests[src_chain_data_hash] = request;
emit Verify_Data_Hash(src_chain_data_hash);
}
function reject_bridge_transaction(
uint request_id,
address to,
uint src_chain_id,
uint dest_chain_id,
uint amount,
uint fee_amount,
uint timestamp,
string memory deposit_tx_hash
) external noGas onlyVerifier {
bytes32 src_chain_data_hash = _get_data_hash(request_id, to, src_chain_id, dest_chain_id, amount, fee_amount, timestamp);
bytes32 data_hash = keccak256(abi.encodePacked(src_chain_data_hash, deposit_tx_hash));
Request storage request = foreign_requests[src_chain_data_hash];
require( request.status == RequestStatus.Verified, "Invalid status" );
require( data_hash == request.data_hash, "Datahash mismatch" );
request.status = RequestStatus.Rejected;
emit Reject_Bridge_Transaction(src_chain_data_hash);
}
function release(
uint request_id,
address to,
uint src_chain_id,
uint dest_chain_id,
uint amount,
uint fee_amount,
uint timestamp,
string memory deposit_tx_hash
) external noGas onlyExecutor {
require( dest_chain_id == chainId, "Incorrect destination network" );
bytes32 src_chain_data_hash = _get_data_hash(request_id, to, src_chain_id, chainId, amount, fee_amount, timestamp);
Request storage request = foreign_requests[src_chain_data_hash];
require( request.status == RequestStatus.Verified, "Invalid status" );
require( keccak256(abi.encodePacked(src_chain_data_hash, deposit_tx_hash)) == request.data_hash, "Datahash mismatch" );
require(operating_limits[msg.sender] >= amount, "Out of operating limit");
require(max_pending_audit_records > pending_audit_records, "Exceed maximum pending audit records");
pending_audit_records += 1;
operating_limits[msg.sender] -= amount;
wjxn.transfer(to, amount - fee_amount);
if(penalty_amount > 0) {
if(penalty_amount > fee_amount) {
wjxn.transfer(penalty_wallet, fee_amount);
penalty_amount -= fee_amount;
}
else {
wjxn.transfer(penalty_wallet, penalty_amount);
wjxn.transfer(fee_wallets[msg.sender], fee_amount - penalty_amount);
penalty_amount -= penalty_amount;
}
}
else {
wjxn.transfer(fee_wallets[msg.sender], fee_amount);
}
proccessed_txd_hashes[keccak256(abi.encodePacked(deposit_tx_hash))] = true;
request.status = RequestStatus.Released;
emit Release(src_chain_data_hash);
}
function complete_release_tx_link(
uint request_id,
address to,
uint src_chain_id,
uint dest_chain_id,
uint amount,
uint fee_amount,
uint timestamp,
string memory deposit_tx_hash,
string memory deposit_tx_link,
string memory release_tx_link,
bytes32 info_hash
) external noGas onlyAuditor {
bytes32 src_chain_data_hash = _get_data_hash(request_id, to, src_chain_id, dest_chain_id, amount, fee_amount, timestamp);
bytes32 data_hash = keccak256(abi.encodePacked(src_chain_data_hash, deposit_tx_hash));
Request storage request = foreign_requests[src_chain_data_hash];
require( request.status == RequestStatus.Released, "Invalid status" );
require( data_hash == request.data_hash, "Datahash mismatch" );
request.deposit_tx_link = deposit_tx_link;
request.release_tx_link = release_tx_link;
pending_audit_records -= 1;
request.status = RequestStatus.Completed;
emit Complete_Release_Tx_Link(request_id, deposit_tx_link, release_tx_link, info_hash);
}
function update_release_tx_link(uint request_id, string memory deposit_tx_link, string memory release_tx_link) external onlyAdmin {
Request storage request = requests[request_id];
request.deposit_tx_link = deposit_tx_link;
request.release_tx_link = release_tx_link;
emit Update_Release_Tx_Link(request_id, deposit_tx_link, release_tx_link);
}
function _get_data_hash(
uint request_id,
address to,
uint src_chain_id,
uint dest_chain_id,
uint amount,
uint fee_amount,
uint timestamp
) pure public returns (bytes32) {
return keccak256(abi.encodePacked(
request_id,
to,
src_chain_id,
dest_chain_id,
amount,
fee_amount,
timestamp
));
}
function add_auditor(address auditor) external onlyAdmin {
for(uint i = 0; i < auditors.length; i += 1) {
if(auditors[i] == auditor)
revert("Already exists");
}
auditors.push(auditor);
}
function delete_auditor(address auditor) external onlyAdmin {
uint i = 0;
for(; i < auditors.length; i += 1) {
if(auditors[i] == auditor)
break;
}
require(i < auditors.length, "Not an auditor");
auditors[i] = auditors[auditors.length - 1];
auditors.pop();
}
function isAuditor(address auditor) public view returns(bool) {
uint i = 0;
for(; i < auditors.length; i += 1) {
if(auditors[i] == auditor)
return true;
}
return false;
}
function add_verifier(address verifier) external onlyAdmin {
for(uint i = 0; i < verifiers.length; i += 1) {
if(verifiers[i] == verifier)
revert("Already exists");
}
verifiers.push(verifier);
}
function delete_verifier(address verifier) external onlyAdmin {
uint i = 0;
for(; i < verifiers.length; i += 1) {
if(verifiers[i] == verifier)
break;
}
require(i < verifiers.length, "Not an verifier");
verifiers[i] = verifiers[verifiers.length - 1];
verifiers.pop();
}
function isVerifier(address verifier) public view returns(bool) {
uint i = 0;
for(; i < verifiers.length; i += 1) {
if(verifiers[i] == verifier)
return true;
}
return false;
}
function add_bridge_executor(address executor, uint operating_limit, address fee_wallet) external onlyAdmin {
for(uint i = 0; i < bridge_executors.length; i += 1) {
if(bridge_executors[i] == executor)
revert("Already exists");
}
bridge_executors.push(executor);
operating_limits[executor] = operating_limit;
fee_wallets[executor] = fee_wallet;
}
function isBridgeExecutor(address executor) public view returns(bool) {
uint i = 0;
for(; i < bridge_executors.length; i += 1) {
if(bridge_executors[i] == executor)
return true;
}
return false;
}
function set_operating_limit(address executor, uint operating_limit) external onlyAdmin {
require(isBridgeExecutor(executor), "Not a bridge executor");
operating_limits[executor] = operating_limit;
}
function set_fee(uint dest_chain_id, uint _fee_percent, uint _minimum_fee_amount) external onlyAdmin {
fee_percent[dest_chain_id] = _fee_percent;
minimum_fee_amount[dest_chain_id] = _minimum_fee_amount;
emit Set_Fee(_fee_percent, _minimum_fee_amount);
}
function set_penalty_wallet(address _penalty_wallet) external onlyAdmin {
penalty_wallet = _penalty_wallet;
}
function set_admin(address _admin) external onlyAdmin {
admin = _admin;
}
function add_penalty_amount(uint amount, bytes32 info_hash) external noGas onlyAuditor {
penalty_amount += amount;
emit Add_Penalty_Amount(amount, info_hash);
}
function subtract_penalty_amount(uint amount, bytes32 info_hash) external noGas onlyAuditor {
require(penalty_amount >= amount, "over penalty amount");
penalty_amount -= amount;
emit Subtract_Penalty_Amount(amount, info_hash);
}
function set_use_no_gas(bool flag) external onlyAdmin {
use_no_gas = flag;
}
function withdrawByAdmin(address token, uint amount) external onlyAdmin {
IERC20(token).transfer(msg.sender, amount);
emit Withdraw_By_Admin(token, amount);
}
fallback() external payable {
}
receive() external payable {
}
function withdraw_ETH(uint amount) external onlyAdmin {
payable(msg.sender).transfer(amount);
}
}
{
"compilationTarget": {
"contracts/WjxnBscBridge.sol": "WjxnBscBridge"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 20
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"Add_Penalty_Amount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"request_id","type":"uint256"},{"indexed":false,"internalType":"string","name":"deposit_tx_hash","type":"string"},{"indexed":false,"internalType":"string","name":"release_tx_hash","type":"string"},{"indexed":false,"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"Complete_Release_Tx_Link","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"request_id","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"data_hash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee_amount","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"src_chain_id","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"dest_chain_id","type":"uint64"},{"indexed":false,"internalType":"uint128","name":"deposit_timestamp","type":"uint128"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"}],"name":"Reject_Bridge_Transaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"request_id","type":"uint256"}],"name":"Reject_Request","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"}],"name":"Release","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee_percent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minimum_fee_amount","type":"uint256"}],"name":"Set_Fee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"Subtract_Penalty_Amount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"request_id","type":"uint256"},{"indexed":false,"internalType":"string","name":"deposit_tx_hash","type":"string"},{"indexed":false,"internalType":"string","name":"release_tx_hash","type":"string"}],"name":"Update_Release_Tx_Link","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"}],"name":"Verify_Data_Hash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw_By_Admin","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"_get_data_hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"auditor","type":"address"}],"name":"add_auditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint256","name":"operating_limit","type":"uint256"},{"internalType":"address","name":"fee_wallet","type":"address"}],"name":"add_bridge_executor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"add_penalty_amount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"verifier","type":"address"}],"name":"add_verifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auditors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bridge_executors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"string","name":"deposit_tx_hash","type":"string"},{"internalType":"string","name":"deposit_tx_link","type":"string"},{"internalType":"string","name":"release_tx_link","type":"string"},{"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"complete_release_tx_link","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"auditor","type":"address"}],"name":"delete_auditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"verifier","type":"address"}],"name":"delete_verifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fee_percent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fee_wallets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"foreign_requests","outputs":[{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deposit_timestamp","type":"uint256"},{"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"},{"internalType":"bytes32","name":"data_hash","type":"bytes32"},{"internalType":"enum WjxnBscBridge.RequestStatus","name":"status","type":"uint8"},{"internalType":"string","name":"deposit_tx_hash","type":"string"},{"internalType":"string","name":"deposit_tx_link","type":"string"},{"internalType":"string","name":"release_tx_link","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"auditor","type":"address"}],"name":"isAuditor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"executor","type":"address"}],"name":"isBridgeExecutor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"verifier","type":"address"}],"name":"isVerifier","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"max_pending_audit_records","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minimum_fee_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operating_limits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penalty_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penalty_wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pending_audit_records","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"proccessed_txd_hashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"string","name":"deposit_tx_hash","type":"string"}],"name":"reject_bridge_transaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"string","name":"deposit_tx_hash","type":"string"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deposit_timestamp","type":"uint256"},{"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"},{"internalType":"bytes32","name":"data_hash","type":"bytes32"},{"internalType":"enum WjxnBscBridge.RequestStatus","name":"status","type":"uint8"},{"internalType":"string","name":"deposit_tx_hash","type":"string"},{"internalType":"string","name":"deposit_tx_link","type":"string"},{"internalType":"string","name":"release_tx_link","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"set_admin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"_fee_percent","type":"uint256"},{"internalType":"uint256","name":"_minimum_fee_amount","type":"uint256"}],"name":"set_fee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint256","name":"operating_limit","type":"uint256"}],"name":"set_operating_limit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_penalty_wallet","type":"address"}],"name":"set_penalty_wallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"flag","type":"bool"}],"name":"set_use_no_gas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"info_hash","type":"bytes32"}],"name":"subtract_penalty_amount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"string","name":"deposit_tx_link","type":"string"},{"internalType":"string","name":"release_tx_link","type":"string"}],"name":"update_release_tx_link","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"use_no_gas","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"verifiers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"request_id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"src_chain_id","type":"uint256"},{"internalType":"uint256","name":"dest_chain_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee_amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes32","name":"src_chain_data_hash","type":"bytes32"},{"internalType":"string","name":"deposit_tx_hash","type":"string"}],"name":"verify_data_hash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw_ETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wjxn","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]