dKargo Docs
dKargo.ioWhitepaper
Docs ENG
Docs ENG
  • Welcome to dKargo
  • Run dKargo Node
    • Chain RPC
    • Installation Guide
    • Types of Chain Node
    • Full Node
    • Archive Full Node
    • Validator Node
  • Wallet Setup
    • Connectiong to MetaMask
    • Creating a wallet
    • Importing a Wallet
    • Adding the dKargo Network
  • Validator Operations
    • Validator Staking
    • Staking
    • Unstaking
    • Claim
  • Deploy Contract
    • How to deploy a contract
    • Deploying a Contract Using Remix-IDE
    • Deploying a Contract Using Hardhat
    • Deploying a Contract Using Foundry
  • ERC-20 BRIDGING
    • ERC-20 Bridging
    • Standard Gateway
    • Generic-custom Gateway
    • Custom Gateway
  • DKA Bridging
    • DKA Bridging
    • DKA Deposit
    • DKA Withdraw
  • Faucet
    • Faucet for Testnet Tokens
    • Claiming Testnet Tokens
  • Chain Snapshot
    • Download the Latest Chain Snapshot
  • Contract Address
    • Contract Address List
  • Bug Bounty
    • Bug Bounty Program
Powered by GitBook
On this page
  • STEP 1 - Withdrawing DKA
  • STEP 2: Checking Withdrawal Status
  • STEP 3: Claiming DKA
  1. DKA Bridging

DKA Withdraw

PreviousDKA DepositNextFaucet for Testnet Tokens

Last updated 2 months ago

The withdrawal refers to transferring DKA from dKargo Chain (L3) to Arbitrum Chain (L2).

This process is executed in multiple steps through the collaboration of the deployed on Arbitrum and the dKargo sequencer.

STEP 1 - Withdrawing DKA

The DKA withdrawal process is executed using the withdrawEth() method of the ArbSys precompile contract.

The DKA withdrawn from dKargo Chain (L3) is burned, and the corresponding L2 DKA in the bridge contract is processed through the next steps before being sent to the user.

const res = await dkaBridge.withdraw({
  childSigner,
  amount,
  destinationAddress: parentSigner.address,
  from: childSigner.address,
});

const receipt = await res.wait();
console.log(`withdraw DKA L3 tx hash: ${receipt.transactionHash}`)

STEP 2: Checking Withdrawal Status

After submitting a withdrawal request, the DKA on L2 can only be claimed after a dispute period of approximately 6.4 days. During this period, the withdrawal status remains pending.

const timeToWaitMs = 1000 * 60
const message = await receipt.getChildToParentMessages(parentProvider);

// Waiting until the 6.4-day dispute period passes.
await message[0].waitUntilReadyToExecute(childProvider, timeToWaitMs);

STEP 3: Claiming DKA

The user can then finalize the withdrawal by claiming the requested DKA through the Outbox contract.

const message = await receipt.getChildToParentMessages(parentSigner);
const res = await message[0].execute(childProvider);
const executeReceipt = await res.wait();
console.log(`claim DKA L2 tx hash: ${executeReceipt.transactionHash}`)

The withdrawal status can be checked on .

Once the dispute period ends, the user becomes eligible to claim the withdrawn DKA from the .

bridge contract
dScanner's L3 ➔ L2 Transactions page.
bridge contract