autonity / aut

A command-line RPC client for Autonity
MIT License
11 stars 10 forks source link

`aut protocol get-unbonding-req` result - doffers from json-rpc call result #76

Closed cmjc closed 1 year ago

cmjc commented 1 year ago

If I call this function from rpc and autcli I get different results with the same start and end IDs: I am passing in 0 and 2.

curl to JSON-RPC:

jay@Jays-MacBook-Pro docs.autonity.org-legacy % curl -X GET 'https://rpc1.piccadilly.autonity.org:8545/'  --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0", "method":"aut_getBondingReq", "params":[0,2], "id":1}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "delegator": "0x75474ac55768fab6fe092191eea8016b955072f5",
      "delegatee": "0x32f3493ef14c28419a98ff20de8a033cf9e6ab97",
      "amount": 10000,
      "startBlock": 0
    },
    {
      "delegator": "0x821bc352e77d885906b47001863f75e15c114f70",
      "delegatee": "0x31870f96212787d181b3b2771f58af2bed0019aa",
      "amount": 10000,
      "startBlock": 0
    }
  ]
}

autcli:

ubuntu@vps-c7c3e8c7:~/TEST/autcli$ aut protocol get-unbonding-req -r https://rpc1.piccadilly.autonity.org:8545 0 2
[
  {
    "delegator": "0xB17b5DD3fD63c736e538172A640ab0510E608a80",
    "delegatee": "0x32F3493Ef14c28419a98Ff20dE8A033cf9e6aB97",
    "amount": 11,
    "start_block": 486499
  },
  {
    "delegator": "0xB17b5DD3fD63c736e538172A640ab0510E608a80",
    "delegatee": "0x31870f96212787D181B3B2771F58AF2BeD0019Aa",
    "amount": 11,
    "start_block": 486499
  }
]
dtebbs commented 1 year ago

The aut command in your snippet is using the get-unbonding-req (i.e. UNbonding, not bonding.) get-bonding-req 0 2 seems to get matching results.

cmjc commented 1 year ago

It was late...closing. Sorry.