mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
naive: changed-dns test
This commit is contained in:
parent
f0f1f4db9f
commit
e21754f9af
@ -1,8 +1,5 @@
|
|||||||
/+ *test, naive, ethereum, azimuth, *naive-transactions
|
/+ *test, naive, ethereum, azimuth, *naive-transactions
|
||||||
::
|
::
|
||||||
:: TODO: Write gate that takes several skim-tx:naive and turns
|
|
||||||
:: them into a single batch
|
|
||||||
::
|
|
||||||
|%
|
|%
|
||||||
++ n |=([=^state:naive =^input:naive] (%*(. naive lac |) verifier 1.337 +<))
|
++ n |=([=^state:naive =^input:naive] (%*(. naive lac |) verifier 1.337 +<))
|
||||||
::
|
::
|
||||||
@ -11,7 +8,8 @@
|
|||||||
:: the log-name here is the head of the topics list, so topics
|
:: the log-name here is the head of the topics list, so topics
|
||||||
:: is actually a lest as found in naive.hoon. the changed-dns
|
:: is actually a lest as found in naive.hoon. the changed-dns
|
||||||
:: event has no additional topics, which requires the gate here
|
:: event has no additional topics, which requires the gate here
|
||||||
:: to take an empty list.
|
:: to take an empty list. TODO: does this create an issue with
|
||||||
|
:: the rollup RPC or lib/ethereum?
|
||||||
++ log
|
++ log
|
||||||
|= [log-name=@ux data=@ux topics=(list @)]
|
|= [log-name=@ux data=@ux topics=(list @)]
|
||||||
^- ^input:naive
|
^- ^input:naive
|
||||||
@ -3164,38 +3162,37 @@
|
|||||||
:: raw data from transaction
|
:: raw data from transaction
|
||||||
:: https://etherscan.io/tx/0x51a26c3b100ad1c7aa8d593068df60465046d437edc3e939fadee4056791fd13#eventlog
|
:: https://etherscan.io/tx/0x51a26c3b100ad1c7aa8d593068df60465046d437edc3e939fadee4056791fd13#eventlog
|
||||||
::
|
::
|
||||||
:: TODO: this shouldn't start with a 1 but I'm not sure how else
|
=/ data %- crip
|
||||||
:: to pass leading zeroes in for data.log
|
;: weld
|
||||||
=/ data=@ux 0x1000.0000.0000.0000.0000.0000.0000.
|
"0x000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0060.0000.0000.0000.0000.0000.
|
"60000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.00a0.0000.0000.0000.
|
"a0000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.00e0.0000.
|
"e0000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"0975726269742e6f7267000000000000"
|
||||||
0009.7572.6269.742e.6f72.6700.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"0975726269742e6f7267000000000000"
|
||||||
0000.0000.0000.0000.0009.7572.6269.
|
"00000000000000000000000000000000"
|
||||||
742e.6f72.6700.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"0975726269742e6f7267000000000000"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
"00000000000000000000000000000000"
|
||||||
0000.0009.7572.6269.742e.6f72.6700.
|
"00"
|
||||||
0000.0000.0000.0000.0000.0000.0000.
|
==
|
||||||
0000.0000.0000.0000
|
|
||||||
::
|
::
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> ~
|
!> `(list @t)`['urbit.org' 'urbit.org' 'urbit.org' ~]
|
||||||
::
|
::
|
||||||
!>
|
!>
|
||||||
=| =^state:naive
|
=| =^state:naive
|
||||||
=^ f state (init-marbud state)
|
=^ f state (init-marbud state)
|
||||||
=^ f state (n state (changed-dns:l1 data))
|
=^ f state (n state (changed-dns:l1 (hex-to-num:ethereum data)))
|
||||||
state
|
dns.state
|
||||||
::
|
::
|
||||||
++ test-approval-for-all
|
++ test-approval-for-all
|
||||||
=| operators=(jug address address)
|
=| operators=(jug address address)
|
||||||
|
Loading…
Reference in New Issue
Block a user