Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Add an RPC endpoint to fetch the scheduled transactions#4470

Merged
heifner merged 6 commits intoEOSIO:release/1.1from
wanderingbort:feature/get_scheduled_transactions
Jul 14, 2018
Merged

Add an RPC endpoint to fetch the scheduled transactions#4470
heifner merged 6 commits intoEOSIO:release/1.1from
wanderingbort:feature/get_scheduled_transactions

Conversation

@wanderingbort
Copy link
Copy Markdown
Contributor

This adds an RPC endpoint /v1/chain/get_scheduled_transactions which will produce a list of the scheduled but not yet executed/failed/expired transactions according to the chain data.

Inputs can include:

{ 
   "lower_bound" : ISO timestamp or transaction Id for the first entry desired
   "limit" : the maximum number of transactions to return
   "json" : true/false whether the packed transaction is converted to json 
}

the result is an object with:

{
   "transactions" : [ .. an array of the qualifying scheduled transactions .. ] 
   "more" : the transaction id to use as a lower bound for the next "page" of results
}

For example:

$ curl -d '{"limit":5,"json":false}' 'http://localhost/v1/chain/get_scheduled_transactions' | json_pp

{
   "transactions" : [
      {
         "delay_until" : "2018-07-03T17:49:54.500",
         "published" : "2018-06-30T17:49:54.500",
         "sender_id" : "0xa09864ff499bbd660000000000000000",
         "trx_id" : "80e87f10f8cb5588d465a97bb1605f06dd77ab3683b94363224c819f39a17c6d",
         "payer" : "guytqmjzgmge",
         "sender" : "eosio",
         "expiration" : "2018-07-03T17:59:54.500",
         "transaction" : "c3c2375b15e5948e1ca7000080e90f00010000000000ea305500000000a4a997ba01a09864ff499bbd6600000000a8ed323208a09864ff499bbd6600"
      },
      {
         "transaction" : "22c3375bd4e558de27ca000080e90f00010000000000ea305500000000a4a997ba01a09861f74c98856700000000a8ed323208a09861f74c98856700",
         "expiration" : "2018-07-03T18:01:30.000",
         "sender" : "eosio",
         "payer" : "gy2tknbrgage",
         "published" : "2018-06-30T17:51:30.000",
         "delay_until" : "2018-07-03T17:51:30.000",
         "sender_id" : "0xa09861f74c9885670000000000000000",
         "trx_id" : "53c18bdcb0b2e4053ddd992af6cb4bef1dfd7a42db2c714c090f95b8897022c5"
      },
      {
         "sender" : "eosio",
         "expiration" : "2018-07-03T18:05:00.500",
         "transaction" : "f5c3375b79e7361c33da000080e90f00010000000000ea305500000000a4a997ba01a09861fe4f94076100000000a8ed323208a09861fe4f94076100",
         "published" : "2018-06-30T17:55:00.500",
         "delay_until" : "2018-07-03T17:55:00.500",
         "trx_id" : "17a4d33a3e19c9ae9525ce77ce887f0bb09508c67a5acad87cd5c83f3b892875",
         "sender_id" : "0xa09861fe4f9407610000000000000000",
         "payer" : "g43tcnzygage"
      },
      {
         "sender_id" : "0xa09863fe4f9a88620000000000000000",
         "published" : "2018-06-30T17:55:03.500",
         "delay_until" : "2018-07-03T17:55:03.500",
         "trx_id" : "d89b04b0ce2af3fae12b064602f978f06086061c2ba7af1336b1a6071e25c98b",
         "payer" : "ge4donzygige",
         "sender" : "eosio",
         "expiration" : "2018-07-03T18:05:03.500",
         "transaction" : "f8c3375b7fe7cf21a8ff000080e90f00010000000000ea305500000000a4a997ba01a09863fe4f9a886200000000a8ed323208a09863fe4f9a886200"
      },
      {
         "published" : "2018-06-30T17:58:05.500",
         "sender_id" : "0xa0a662f64e9bbe650000000000000000",
         "delay_until" : "2018-07-03T17:58:05.500",
         "trx_id" : "3c1910fd6e9f980d9216fb8c057cf22403c59ffc32731e61de436b12cd4c4c0a",
         "payer" : "gqzdqnrqgene",
         "sender" : "eosio",
         "expiration" : "2018-07-03T18:08:05.500",
         "transaction" : "aec4375bebe853e9f16c000080e90f00010000000000ea305500000000a4a997ba01a0a662f64e9bbe6500000000a8ed323208a0a662f64e9bbe6500"
      }
   ],
   "more" : "8f67a8e5856c7377c35172876ea0070aeb3538018f73351413db8d1dad83a981"
}

@wanderingbort wanderingbort requested a review from dskvr July 3, 2018 17:50
@wanderingbort wanderingbort added this to the Version 1.1 milestone Jul 3, 2018
Copy link
Copy Markdown
Contributor

@heifner heifner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed a few improvements via DM.

@wanderingbort wanderingbort mentioned this pull request Jul 13, 2018
14 tasks
@heifner heifner merged commit c879b6a into EOSIO:release/1.1 Jul 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants