For the complete documentation index, see llms.txt. This page is also available as Markdown.

VTreasury

This page documents the BNB-specific legacy VTreasury source in venus-protocol v10.3.0, an Ownable contract that can receive native BNB and hold BEP-20 tokens.

If the requested withdrawal exceeds the live balance, this implementation withdraws the available balance rather than reverting for an excessive amount.

Solidity API

fallback

To receive BNB

function() external payable

withdrawTreasuryBEP20

Withdraws up to the available balance of a BEP-20 token. Only the live owner can call this function.

function withdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress) external

Parameters

Name
Type
Description

tokenAddress

address

The address of treasury token

withdrawAmount

uint256

Requested amount; capped to the contract's token balance

withdrawAddress

address

Recipient of the withdrawn tokens


withdrawTreasuryBNB

Withdraws up to the available native BNB balance. Only the live owner can call this function.

Parameters

Name
Type
Description

withdrawAmount

uint256

Requested amount; capped to the contract's BNB balance

withdrawAddress

address payable

Recipient of the withdrawn BNB


Last updated