Join the Rootstock Discord Community to get the latest updates from the Rootstock Ecosystem!

RIF Multisig SDK - Receive ERC20 token

It is important to understand that in order to receive funds, the Multisig account address (instead of the owner's address) must be used as the receiver.

  • A) Get the Multisig account address

    const safeSdk = await safeFactory.createSafe({
      owners: ['0x1234...', '0xabcd...', '0x0987...'],
      threshold: 2
    })
    
    // address to use as fund receiver
    const multisigAccountAddress = safeSdk.getAddress()

    {:.snippet__code.snippet__code--lightgreen}

  • B) Transfer ERC20 tokens

    • Assuming we have an ERC20-compliant contract:
    const erc20Token: Contract;
    // address to use as fund receiver
    const multisigAccountAddress = safeSdk.getAddress()
    
    const valueToSend = BigNumber.from("1000000000")
    await erc20Token.transfer(multisigAccountAddress, valueToSend)

    {:.snippet__code.snippet__code--lightgreen}

Receive updates

Get the latest updates from the Rootstock ecosystem

Loading...