Delegate
  • Overview
  • Delegating a wallet
  • Comparison with Others
  • FAQ
  • Audits
  • Integrate In Your Project
    • Smart Contract Examples
    • Token Ownership Claiming
  • Upgrade to V2
    • V2 is a Separate Contract
    • V1 → V2 migration
    • Batching
    • Subdelegations
  • Advanced Use Cases
    • Shadow Delegation
  • Delegate Market
    • Overview
    • FAQ
  • Gaming
    • Delegate for Gaming
  • Technical Documentation
    • Delegate Registry
      • Contract Addresses
      • IDelegateRegistry.sol
    • Javascript SDK
      • Installation / Importing
      • Setup
      • Check Delegations
        • checkDelegateForAll
        • checkDelegateForContract
        • checkDelegateForERC721
        • checkDelegateForERC1155
        • checkDelegateForERC20
      • Fetch Delegations
      • Delegate/Revoke
        • delegateAll
        • delegateContract
        • delegateERC721
        • delegateERC1155
        • delegateERC20
    • REST API
      • v2
      • v1
  • Resources
    • Media Kit
    • Github
    • Twitter
    • Live Stats
  • V1 Registry (Legacy)
    • Technical Documentation
Powered by GitBook
On this page
  1. Technical Documentation
  2. Javascript SDK
  3. Delegate/Revoke

delegateERC20

Allow the delegate to act on behalf of `msg.sender` for a specific amount of ERC20 tokens

delegateERC20( to: string, contract: string, rights: string, amount: number ) ⇒ Promise< TransactionHash >

Returns the transaction hash of the submitted delegation.

to

The address to act as delegate

contract

The contract whose rights are being delegated

rights

Specific subdelegation rights granted to the delegate, pass "" to encompass all rights

amount

The amount of that token id to delegate, > 0 delegates and 0 revokes

Usage Example

const to = "0x0000000000000000000000000000000000000003";
const from = "0x0000000000000000000000000000000000000001";
const contract = "0x0000000000000000000000000000000000000002";
const amount = 1;
await v2.delegateERC20(to, contract, "", amount);

PreviousdelegateERC1155NextREST API

Last updated 1 year ago