Returns an Ethers.js transaction object of the vote transaction.
Create a delegate signature for Venus Governance using EIP-712. The
signature can be created without burning gas. Anyone can post it to the
blockchain using the delegateBySig method, which does have gas costs.
The address to delegate the user's voting rights to.
Returns an object that contains the v, r, and s
components of an Ethereum signature as hexadecimal strings.
Create a transaction to delegate Venus Governance voting rights to an address.
The address in which to delegate voting rights to.
Returns an Ethers.js transaction object of the vote transaction.
Delegate voting rights in Venus Governance using an EIP-712 signature.
The address to delegate the user's voting rights to.
The contract state required to match the signature. This can be retrieved from the VENUS contract's public nonces mapping.
The time at which to expire the signature. A block timestamp as seconds since the unix epoch.
An object that contains the v, r, and, s values of an EIP-712 signature.
Returns an Ethers.js transaction object of the vote transaction.
Get the mintable VAI amount of address.
The address in which to get mintable VAI amount.
Returns a string of the numeric amount of mintable VAI. The value is scaled up by 18 decimal places.
Get the VAI mint rate.
Returns a string of the numeric VAI mint rate.
Get the amount of VENUS tokens accrued but not yet claimed by an address.
The address in which to find the VENUS accrued.
Returns a string of the numeric accruement of VENUS. The value is scaled up by 18 decimal places.
Get the balance of VENUS tokens held by an address.
The address in which to find the VENUS balance.
Returns a string of the numeric balance of VENUS. The value is scaled up by 18 decimal places.
Mint VAI in the Venus Protocol.
A string, number, or BigNumber
object of the amount of an asset to mintVAI. Use the mantissa boolean in
the options parameter to indicate if this value is scaled up (so there
are no decimals) or in its natural scale.
Returns an Ethers.js transaction object of the mintVAI transaction.
Get the mintVAIGuardianPaused.
Returns a string of the boolean mintVAIGuardianPaused.
Get the minted VAI amount of the address.
The address in which to get the minted VAI amount.
Returns a string of the numeric amount of minted VAI. The value is scaled up by 18 decimal places.
Get the minted VAI amount of the address.
The address in which to get the minted VAI amount.
Returns a string of the numeric amount of minted VAI. The value is scaled up by 18 decimal places.
Repay VAI in the Venus Protocol.
A string, number, or BigNumber
object of the amount of an asset to repay. Use the mantissa boolean in
the options parameter to indicate if this value is scaled up (so there
are no decimals) or in its natural scale.
Returns an Ethers.js transaction object of the repayVAI transaction.
Get the repayVAIGuardianPaused.
Returns a string of the boolean repayVAIGuardianPaused.
Applies the EIP-55 checksum to an Ethereum address.
The Ethereum address to apply the checksum.
Returns a string of the Ethereum address.
Get the vaiController.
Returns a string of the vaiController address.
Get the vaiMintRate.
Returns a string of the numeric vaiMintRate.
Create a transaction to claim accrued VENUS tokens for the user.
const venus = new Venus(window.ethereum); (async function() { console.log('Claiming Venus...'); const trx = await venus.claimVenus(); console.log('Ethers.js transaction object', trx); })().catch(console.error);