forked from svanas/delphereum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web3.eth.tx.tests.pas
59 lines (49 loc) · 1.66 KB
/
web3.eth.tx.tests.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{******************************************************************************}
{ }
{ Delphereum }
{ }
{ Copyright(c) 2018 Stefan van As <[email protected]> }
{ Github Repository <https://github.com/svanas/delphereum> }
{ }
{ Distributed under Creative Commons NonCommercial (aka CC BY-NC) license. }
{ }
{******************************************************************************}
unit web3.eth.tx.tests;
{$I web3.inc}
interface
uses
// DUnitX
DUnitX.TestFramework;
type
[TestFixture]
TTests = class
public
[Test]
procedure TestCase1;
end;
implementation
uses
// Delphi
System.SysUtils,
// web3
web3,
web3.eth.tx;
procedure TTests.TestCase1;
begin
Assert.AreEqual(
web3.eth.tx.signTransaction(
Mainnet,
9,
'4646464646464646464646464646464646464646464646464646464646464646',
'0x3535353535353535353535353535353535353535',
1000000000000000000,
'',
20000000000,
21000
).ToLower,
'0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83'
);
end;
initialization
TDUnitX.RegisterTestFixture(TTests);
end.