mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Move call data generation to lib.
This commit is contained in:
parent
2f4ce78d4e
commit
b10b27e0a7
@ -64,25 +64,11 @@
|
||||
::
|
||||
++ ta-read
|
||||
|= cal=ships:function
|
||||
=- %+ ta-request `id
|
||||
:+ %eth-call
|
||||
[~ ships:contracts ~ ~ ~ (encode-call dat)]
|
||||
[%label %latest]
|
||||
::TODO probably turn the below into a lib arm
|
||||
^- [id=@t dat=call-data]
|
||||
?- -.cal
|
||||
%ships
|
||||
:- (crip "ships({(scow %p who.cal)})")
|
||||
['ships(uint32)' ~[uint+`@`who.cal]]
|
||||
::
|
||||
%get-spawned
|
||||
:- (crip "getSpawned({(scow %p who.cal)})")
|
||||
['getSpawned(uint32)' ~[uint+`@`who.cal]]
|
||||
::
|
||||
%dns-domains
|
||||
:- (crip "dnsDomains({(scow %ud ind.cal)})")
|
||||
['dnsDomains(uint8)' ~[uint+ind.cal]]
|
||||
==
|
||||
=+ (ships:function-to-call cal)
|
||||
%+ ta-request `id
|
||||
:+ %eth-call
|
||||
[~ ships:contracts ~ ~ ~ (encode-call dat)]
|
||||
[%label %latest]
|
||||
::
|
||||
++ ta-read-ships
|
||||
|= who=(list @p)
|
||||
|
@ -94,4 +94,24 @@
|
||||
++ shipname
|
||||
;~(pfix sig fed:ag)
|
||||
--
|
||||
::
|
||||
++ function-to-call
|
||||
|%
|
||||
++ ships
|
||||
|= cal=ships:function
|
||||
^- [id=@t dat=call-data]
|
||||
?- -.cal
|
||||
%ships
|
||||
:- (crip "ships({(scow %p who.cal)})")
|
||||
['ships(uint32)' ~[uint+`@`who.cal]]
|
||||
::
|
||||
%get-spawned
|
||||
:- (crip "getSpawned({(scow %p who.cal)})")
|
||||
['getSpawned(uint32)' ~[uint+`@`who.cal]]
|
||||
::
|
||||
%dns-domains
|
||||
:- (crip "dnsDomains({(scow %ud ind.cal)})")
|
||||
['dnsDomains(uint8)' ~[uint+ind.cal]]
|
||||
==
|
||||
--
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user