gf.dex create [ "useraccount", "gf.eth", "8,ETH", "3.2500 GFT" ]
Contract | Action | [ User | Token Account | Token Symbol | Token Price ]
gf.eth transfer '[ "useraccount", "gf.dex", "10.10000000 ETH", "add_balance" ]'
Contract | Action | [ User | Exchange Account | Transfer Amount | Memo with Deposit Identifier ]
gf.dex deposit '[ "useraccount", "gf.eth", "20.0000 GFL" ]'
Exchange Contract | Action | [ User | Token Account | Amount ]
eosio.token transfer '[ "useraccount", "gf.eth", "0.6000 GFL", "gf.trx" ]'
Contract | Action | [ User | Exchange Account | Exchange Amount | Memo with "Token Account for Exchange" parameters ]
gf.dex withdraw '[ "useraccount", "gf.eth", " 0.10000000 ETH"]'
Exchange Contract | Action | [ User | Contract | Withdrawal Amount from the balance table `balance.quantity` ]
{
"account": "useraccount",
"contract": "gf.eth",
"ticker": "8,ETH",
"price": "665.0000 GFL"
}
After creation, the pool is available in the pools table:
"rows": [{
"contract": "gf.eth",
"owner": "poolowneracc",
"ticker": "6,ETH",
"price": "72.4164 GFL",
"v_price": "7241641917",
"token": "23.04200094 ETH",
"v_token": 230420009486,
"market": "1668.6260 GFL",
"v_market": "166862600000",
"lp": 9167.968574
}
]
add_balance
balance
https://history.dev.globalforce.io/v1/chain/get_table_rows?code=gf.dex&scope=useraccount&table=balance&json=true&lower_bound=useraccount&limit=2
"rows": [{
"contract": "gf.eth",
"quantity": "4995.26000034 ETH",
},{
"contract": "eosio.token",
"quantity": "1100.0000 GFL"
}
]
{
"account": "tokenrerere2",
"contract": "gf.eth",
"market": "105.0000 GFL"
}
After adding to the pool, a new object is added to the pooled table
pooled
https://history.dev.globalforce.io/v1/chain/get_table_rows?code=gf.dex&scope=gf.eth&table=pooled&index_position=2&key_type=i64&json=true&lower_bound=testdexacco1&limit=10
"rows": [{
"owner": "gf",
"lp": "15253.4527 LP",
"timestamp": 1708004454
}
]
{
"account": "tokenrerere2",
"contract": "gf.eth",
"quantity": "5.0000 LP"
}
outpool '[ "tokenrerere2", "gf.eth", 5.00 ]'
{
"account": "useraccount",
"contract": "eosio.token",
"quantity": "1.0000 GFL"
}
withdraw '[ "tokenrerere2", "eosio.token", "1.0000 GFL" ]'
``Contract | Action | [ User | Token Account | Token Symbol | Token Price ]`` ``Contract | Action | [ User | Exchange Account | Transfer Amount | Memo with Depo