mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
roller-rpc: add get points per ownership address
This commit is contained in:
parent
82f959ebd2
commit
b07774c0d9
@ -149,9 +149,14 @@
|
|||||||
(process-rpc id +.params method)
|
(process-rpc id +.params method)
|
||||||
?+ method [~ ~(method error:json-rpc id)]
|
?+ method [~ ~(method error:json-rpc id)]
|
||||||
%get-point `(get-point id +.params point:scry)
|
%get-point `(get-point id +.params point:scry)
|
||||||
%get-ships `(get-ships id +.params points:scry)
|
%get-ships `(get-ships id +.params ships:scry)
|
||||||
%cancel-transaction (cancel-tx id +.params)
|
%cancel-transaction (cancel-tx id +.params)
|
||||||
%get-spawned `(get-spawned id +.params spawned:scry)
|
%get-spawned `(get-spawned id +.params spawned:scry)
|
||||||
|
%get-owned-points `(get-ships id +.params owned:scry)
|
||||||
|
%get-transferring-for `(get-ships id +.params transfers:scry)
|
||||||
|
%get-manager-for `(get-ships id +.params manager:scry)
|
||||||
|
%get-voting-for `(get-ships id +.params voting:scry)
|
||||||
|
%get-spawning-for `(get-ships id +.params spawning:scry)
|
||||||
%get-all-pending `(all:pending id +.params all:pending:scry)
|
%get-all-pending `(all:pending id +.params all:pending:scry)
|
||||||
%get-pending-by-ship `(ship:pending id +.params ship:pending:scry)
|
%get-pending-by-ship `(ship:pending id +.params ship:pending:scry)
|
||||||
%get-pending-by-address `(addr:pending id +.params addr:pending:scry)
|
%get-pending-by-address `(addr:pending id +.params addr:pending:scry)
|
||||||
@ -173,11 +178,11 @@
|
|||||||
(~(scry agentio bowl) %roller /point/(scot %p ship)/noun)
|
(~(scry agentio bowl) %roller /point/(scot %p ship)/noun)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ points
|
++ ships
|
||||||
|= =address:naive
|
|= =address:naive
|
||||||
.^ (list ship)
|
.^ (list ship)
|
||||||
%gx
|
%gx
|
||||||
(~(scry agentio bowl) %roller /points/(scot %ux address)/noun)
|
(~(scry agentio bowl) %roller /ships/(scot %ux address)/noun)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ spawned
|
++ spawned
|
||||||
@ -187,6 +192,41 @@
|
|||||||
(~(scry agentio bowl) %roller /spawned/(scot %p ship)/noun)
|
(~(scry agentio bowl) %roller /spawned/(scot %p ship)/noun)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ owned
|
||||||
|
|= =address:naive
|
||||||
|
.^ (list ship)
|
||||||
|
%gx
|
||||||
|
(~(scry agentio bowl) %roller /owned/(scot %ux address)/noun)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ transfers
|
||||||
|
|= =address:naive
|
||||||
|
.^ (list ship)
|
||||||
|
%gx
|
||||||
|
(~(scry agentio bowl) %roller /transfers/(scot %ux address)/noun)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ manager
|
||||||
|
|= =address:naive
|
||||||
|
.^ (list ship)
|
||||||
|
%gx
|
||||||
|
(~(scry agentio bowl) %roller /manager/(scot %ux address)/noun)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ voting
|
||||||
|
|= =address:naive
|
||||||
|
.^ (list ship)
|
||||||
|
%gx
|
||||||
|
(~(scry agentio bowl) %roller /voting/(scot %ux address)/noun)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ spawning
|
||||||
|
|= =address:naive
|
||||||
|
.^ (list ship)
|
||||||
|
%gx
|
||||||
|
(~(scry agentio bowl) %roller /spawning/(scot %ux address)/noun)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ pending
|
++ pending
|
||||||
|%
|
|%
|
||||||
++ all
|
++ all
|
||||||
|
@ -155,9 +155,14 @@
|
|||||||
:: /x/spawned/[~ship] -> %noun (list [ship address])
|
:: /x/spawned/[~ship] -> %noun (list [ship address])
|
||||||
:: /x/next-batch -> %atom time
|
:: /x/next-batch -> %atom time
|
||||||
:: /x/point/[~ship] -> %noun point:naive
|
:: /x/point/[~ship] -> %noun point:naive
|
||||||
:: /x/points/[0xadd.ress] -> %noun (list [ship point:naive])
|
:: /x/ships/[0xadd.ress] -> %noun (list ship)
|
||||||
:: /x/config -> %noun config
|
:: /x/config -> %noun config
|
||||||
:: /x/chain-id -> %atom @
|
:: /x/chain-id -> %atom @
|
||||||
|
:: /x/owned -> %noun (list ship)
|
||||||
|
:: /x/transfers -> %noun (list ship)
|
||||||
|
:: /x/manager -> %noun (list ship)
|
||||||
|
:: /x/voting -> %noun (list ship)
|
||||||
|
:: /x/spawning -> %noun (list ship)
|
||||||
::
|
::
|
||||||
++ on-peek
|
++ on-peek
|
||||||
|= =path
|
|= =path
|
||||||
@ -172,9 +177,14 @@
|
|||||||
[%x %spawned @ ~] (spawned i.t.t.path)
|
[%x %spawned @ ~] (spawned i.t.t.path)
|
||||||
[%x %next-batch ~] ``atom+!>(next-batch)
|
[%x %next-batch ~] ``atom+!>(next-batch)
|
||||||
[%x %point @ ~] (point i.t.t.path)
|
[%x %point @ ~] (point i.t.t.path)
|
||||||
[%x %points @ ~] (points i.t.t.path)
|
[%x %points @ ~] (ships i.t.t.path)
|
||||||
[%x %config ~] config
|
[%x %config ~] config
|
||||||
[%x %chain-id ~] ``atom+!>(chain-id)
|
[%x %chain-id ~] ``atom+!>(chain-id)
|
||||||
|
[%x %owned @ ~] (points-proxy %own i.t.t.path)
|
||||||
|
[%x %transfers @ ~] (points-proxy %transfer i.t.t.path)
|
||||||
|
[%x %manager @ ~] (points-proxy %manage i.t.t.path)
|
||||||
|
[%x %voting @ ~] (points-proxy %vote i.t.t.path)
|
||||||
|
[%x %spawning @ ~] (points-proxy %spawn i.t.t.path)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ pending-by
|
++ pending-by
|
||||||
@ -261,7 +271,7 @@
|
|||||||
``noun+!>(*(unit point:naive))
|
``noun+!>(*(unit point:naive))
|
||||||
``noun+!>((get:orm:naive points.pre u.ship))
|
``noun+!>((get:orm:naive points.pre u.ship))
|
||||||
::
|
::
|
||||||
++ points
|
++ ships
|
||||||
|= wat=@t
|
|= wat=@t
|
||||||
:+ ~ ~
|
:+ ~ ~
|
||||||
:- %noun
|
:- %noun
|
||||||
@ -285,6 +295,15 @@
|
|||||||
contract
|
contract
|
||||||
chain-id
|
chain-id
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
++ points-proxy
|
||||||
|
|= [=proxy:naive wat=@t]
|
||||||
|
:+ ~ ~
|
||||||
|
:- %noun
|
||||||
|
!> ^- (list ship)
|
||||||
|
?~ addr=(slaw %ux wat)
|
||||||
|
~
|
||||||
|
~(tap in (~(get ju own) [proxy u.addr]))
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|
Loading…
Reference in New Issue
Block a user