Skip to content

XVSProxyOFTSrc

XVSProxyOFTSrc at token-bridge v2.7.0 is the non-upgradeable BNB Chain source bridge. It locks native BNB-chain XVS on outbound transfers and releases that same token on inbound transfers. outboundAmount tracks the locked supply attributed to remote chains.

XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions, focusing on the source side of these transactions. It monitors the total amount transferred to other chains, ensuring it complies with defined limits, and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.

Total amount that is transferred from this chain to other chains.

uint256 outboundAmount

Only call it when there is no way to recover the failed message. dropFailedMessage must be called first if transaction is from remote->local chain to avoid double spending.

function fallbackWithdraw(address to_, uint256 amount_) external
NameTypeDescription
to_addressThe address to withdraw to
amount_uint256The amount of withdrawal
  • Emits FallbackWithdraw, once done with transfer.
  • Only owner.

Reconciles an owner-approved amount into bridge custody, increases outboundAmount, and transfers the dust-adjusted XVS amount from the depositor. This is an operational recovery function, not a user bridge entry point.

function fallbackDeposit(address depositor_, uint256 amount_) external
NameTypeDescription
depositor_addressAddress supplying XVS to bridge custody
amount_uint256Requested amount before shared-decimal dust removal
  • Only the bridge owner.

Clear failed messages from the storage.

function dropFailedMessage(uint16 srcChainId_, bytes srcAddress_, uint64 nonce_) external
NameTypeDescription
srcChainId_uint16Chain id of source
srcAddress_bytesAddress of source followed by current bridge address
nonce_uint64Nonce_ of the transaction
  • Emits DropFailedMessage on clearance of failed message.
  • Only owner.

Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).

function circulatingSupply() public view returns (uint256)
NameTypeDescription
[0]uint256Returns difference in total supply and the outbound amount.