mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
Add tests for Ethereum transaction signing
Simple almost-real-world transactions as generated by web3.js.
This commit is contained in:
parent
24886d327f
commit
9cb8828d44
54
tests/sys/zuse/ethereum/signing.hoon
Normal file
54
tests/sys/zuse/ethereum/signing.hoon
Normal file
@ -0,0 +1,54 @@
|
||||
/+ *test
|
||||
|%
|
||||
::NOTE results for test cases generated with web3.js
|
||||
::
|
||||
++ test-signing-transaction-1
|
||||
%+ expect-eq
|
||||
!> %+ sign-transaction:ethereum
|
||||
:* 123
|
||||
1.000
|
||||
5.000
|
||||
0x56db.68f2.9203.ff44.a803.
|
||||
faa2.404a.44ec.bb7a.7480
|
||||
500.000
|
||||
0x0
|
||||
0x1
|
||||
==
|
||||
0xa44d.e241.6ee6.beb2.f323.fab4.8b43.2925.
|
||||
c978.5808.d33a.6ca6.d7ba.00b4.5e93.70c3
|
||||
!> 0xf864.7b82.03e8.8213.8894.56db.68f2.9203.ff44.
|
||||
a803.faa2.404a.44ec.bb7a.7480.8307.a120.8025.
|
||||
a050.d101.dd9f.9d29.face.b804.7d09.c512.5b42.
|
||||
aed4.edfc.7328.717f.db68.98d1.faee.61a0.74d2.
|
||||
2d46.9844.dc9b.98f7.e987.62b8.f18a.20ea.a951.
|
||||
7191.4fb5.1652.d913.7d0c.24dc
|
||||
::
|
||||
++ test-signing-transaction-2
|
||||
%+ expect-eq
|
||||
!> %+ sign-transaction:ethereum
|
||||
:* 42
|
||||
1.000
|
||||
5.000
|
||||
0x56db.68f2.9203.ff44.a803.
|
||||
faa2.404a.44ec.bb7a.7480
|
||||
0
|
||||
0xa0d3.253f.0000.0000.0000.0000.0000.0000.
|
||||
0000.0000.0000.0000.0000.0000.0000.0000.
|
||||
0000.0005.0000.0000.0000.0000.0000.0000.
|
||||
0000.0000.0000.0000.0000.0000.0000.0000.
|
||||
0000.0000
|
||||
0x60
|
||||
==
|
||||
0xa44d.e241.6ee6.beb2.f323.fab4.8b43.2925.
|
||||
c978.5808.d33a.6ca6.d7ba.00b4.5e93.70c3
|
||||
!> 0xf8.a72a.8203.e882.1388.9456.db68.f292.03ff.
|
||||
44a8.03fa.a240.4a44.ecbb.7a74.8080.b844.a0d3.
|
||||
253f.0000.0000.0000.0000.0000.0000.0000.0000.
|
||||
0000.0000.0000.0000.0000.0000.0000.0005.0000.
|
||||
0000.0000.0000.0000.0000.0000.0000.0000.0000.
|
||||
0000.0000.0000.0000.0000.0000.81e3.a065.a92e.
|
||||
4bd2.e49c.e05e.eb79.3bc2.ba83.a58a.b9b4.c82d.
|
||||
dcf7.12fc.3667.bb5a.cb13.94a0.382f.0c95.7ef4.
|
||||
20dd.dfaa.e6f8.beaa.09c1.f162.a5a8.37a3.7237.
|
||||
77c2.9c6a.7a05.65a5
|
||||
--
|
Loading…
Reference in New Issue
Block a user