@@ -45,13 +45,13 @@ contract LibBlobTest is Test {
45
45
function testDecodeAccount () public view {
46
46
// No approvals
47
47
bytes memory data =
48
- hex "890052000eb194f8e1ae525fd5dcfab0800000000040f6191068a0a01a000151804b00010f0cf064dd59200000 " ;
48
+ hex "890052000eb194f8e1ae525fd5dcfab0800000000040f6190258a0a01a000151804b00010f0cf064dd59200000 " ;
49
49
CreditAccount memory account = data.decodeAccount ();
50
50
assertEq (account.capacityUsed, 0 );
51
51
assertEq (account.creditFree, 5000000000000000000000000000000000000000 );
52
52
assertEq (account.creditCommitted, 0 );
53
53
assertEq (account.creditSponsor, address (0 ));
54
- assertEq (account.lastDebitEpoch, 4200 );
54
+ assertEq (account.lastDebitEpoch, 600 );
55
55
assertEq (account.approvalsTo.length , 0 );
56
56
assertEq (account.approvalsFrom.length , 0 );
57
57
assertEq (account.maxTtl, 86400 );
@@ -60,35 +60,35 @@ contract LibBlobTest is Test {
60
60
// With all fields set: approvals to two different accounts, approvals from one account, and all optionals (set
61
61
// credit limit, gas fee limit, and ttl)
62
62
data =
63
- hex "890652000eb61887b895080136932adf5bcc4800004b006dc6853317160400000056040a15d34aaf54267db7d7c367839aaf71a00a2c6a65193b4ea2782c663431306663786a75766c3275657a3633707636646d36627a766c33727561666379327466766264617a7069854c0052b7d2dcc80cd2e400000045003b9aca001949ba4b000f60a131ed58b468000045003b9aca00782c663431306674667376613769326b77366d65326b346c6335626e367a7833616d33626a673436367667376a6985f6f6f64040a1782c663431306663786a75766c3275657a3633707636646d36627a766c33727561666379327466766264617a706985f6f6f64045002faf08001a000151804b00010f6034abfb0e425a07 " ;
63
+ hex "891152000eb316287ea5e336f1a66fbd7e21c000004c000135afae88fd38f250000056040a15d34aaf54267db7d7c367839aaf71a00a2c6a65190518a256040a15d34aaf54267db7d7c367839aaf71a00a2c6a65855400047bf19673df52e37f2410011d10000000000045003b9aca001915764b00c941498854fdb20000004056040a9965507d1a55bcc2695c58ba16fb37d819b0a4dc85f6f6f64040a156040a14dc79964da2c08b23698b3d3cc7ca32193d995585f6f6f640401a000151804b00010f28b1d2070cc7ee37 " ;
64
64
account = data.decodeAccount ();
65
- assertEq (account.capacityUsed, 6 );
66
- assertEq (account.creditFree, 5005999999999999352418000000000000000000 );
67
- assertEq (account.creditCommitted, 518400000000000000000000 );
65
+ assertEq (account.capacityUsed, 17 );
66
+ assertEq (account.creditFree, 5001999999999998531056000000000000000000 );
67
+ assertEq (account.creditCommitted, 1462452000000000000000000 );
68
68
assertEq (account.creditSponsor, 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 );
69
- assertEq (account.lastDebitEpoch, 15182 );
69
+ assertEq (account.lastDebitEpoch, 1304 );
70
70
assertEq (account.approvalsTo.length , 2 );
71
71
assertEq (account.approvalsFrom.length , 1 );
72
72
assertEq (account.maxTtl, 86400 );
73
- assertEq (account.gasAllowance, 5005999998796482894343 );
73
+ assertEq (account.gasAllowance, 5001999999735404424759 );
74
74
assertEq (account.approvalsTo[0 ].addr, 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 );
75
- assertEq (account.approvalsTo[0 ].approval.creditLimit, 100000000000000000000000000 );
75
+ assertEq (account.approvalsTo[0 ].approval.creditLimit, 100000000000000000000000000000000000000000000 );
76
76
assertEq (account.approvalsTo[0 ].approval.gasFeeLimit, 1000000000 );
77
- assertEq (account.approvalsTo[0 ].approval.expiry, 18874 );
78
- assertEq (account.approvalsTo[0 ].approval.creditUsed, 72618000000000000000000 );
79
- assertEq (account.approvalsTo[0 ].approval.gasFeeUsed, 1000000000 );
77
+ assertEq (account.approvalsTo[0 ].approval.expiry, 5494 );
78
+ assertEq (account.approvalsTo[0 ].approval.creditUsed, 950400000000000000000000 );
79
+ assertEq (account.approvalsTo[0 ].approval.gasFeeUsed, 0 );
80
80
assertEq (account.approvalsTo[1 ].addr, 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc );
81
81
assertEq (account.approvalsTo[1 ].approval.creditLimit, 0 );
82
82
assertEq (account.approvalsTo[1 ].approval.gasFeeLimit, 0 );
83
83
assertEq (account.approvalsTo[1 ].approval.expiry, 0 );
84
84
assertEq (account.approvalsTo[1 ].approval.creditUsed, 0 );
85
85
assertEq (account.approvalsTo[1 ].approval.gasFeeUsed, 0 );
86
- assertEq (account.approvalsFrom[0 ].addr, 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 );
86
+ assertEq (account.approvalsFrom[0 ].addr, 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 );
87
87
assertEq (account.approvalsFrom[0 ].approval.creditLimit, 0 );
88
88
assertEq (account.approvalsFrom[0 ].approval.gasFeeLimit, 0 );
89
89
assertEq (account.approvalsFrom[0 ].approval.expiry, 0 );
90
90
assertEq (account.approvalsFrom[0 ].approval.creditUsed, 0 );
91
- assertEq (account.approvalsFrom[0 ].approval.gasFeeUsed, 800000000 );
91
+ assertEq (account.approvalsFrom[0 ].approval.gasFeeUsed, 0 );
92
92
}
93
93
94
94
function testEncodeApproveCreditParams () public pure {
0 commit comments