ARCx
Search…
Direct Contract Interaction
A work in progress for directly interacting with ARC contracts via Etherscan

Get Exact Debt and Balance

Read Contract - getPosition() Response:
1
tuple : Address
2
val1
3
val2
4
val3
5
Collateral Amount
6
val5
7
Debt Amount
Copied!

Open / Borrow / Repay / Liquidate

    1.
    Get Exact Debt and Balance from above instructions.
    2.
    Get Vault_ID from "My Positions" page "Position #" column.
    3.
    Write as Proxy - 2. operateAction()
      1.
      This takes fields (operation, params).
        1.
        See below for how they are defined.
        2.
        Make sure assets have been approved in UI for now (etherscan instructions to come)
1
operation values:
2
0 : Open Position
3
1 : Borrow
4
2 : Repay
5
3 : Liquidate
6
7
params:
8
[Vault_ID,Amount1,Amount2]
9
// Must be in square brackts
10
// No spaces
11
// All numbers in quotes
12
// Vault ID normal size, not in WEI
13
// Both amounts in WEI
Copied!
Repay Example: operateAction(2, [Vault Number, Repay Amount, Withdraw Amount])
Borrow Example: operateAction(1, [Vault Number, Deposit Amount, Borrow Amount])
With Values Example for Repay 1 LINK-USD, Withdraw 1 LINK: operation: 2 params: ["99999","1000000000000000","1000000000000000"]
Last modified 9mo ago