Returns an Ethers.js transaction object of the vote transaction.
Create a delegate signature for Compound 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 Compound 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 Compound 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 COMP 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 amount of COMP tokens accrued but not yet claimed by an address.
The address in which to find the COMP accrued.
Returns a string of the numeric accruement of COMP. The value is scaled up by 18 decimal places.
Get the balance of COMP tokens held by an address.
The address in which to find the COMP balance.
Returns a string of the numeric balance of COMP. The value is scaled up by 18 decimal places.
Applies the EIP-55 checksum to an Ethereum address.
The Ethereum address to apply the checksum.
Returns a string of the Ethereum address.
Create a transaction to claim accrued COMP tokens for the user.
const compound = new Compound(window.ethereum); (async function() { console.log('Claiming COMP...'); const trx = await compound.claimComp(); console.log('Ethers.js transaction object', trx); })().catch(console.error);