Skip to content

Commit 444b849

Browse files
committed
feat(sdk-coin-apt): added logic for fee payer signing
TICKET: COIN-2838
1 parent 9d1ff23 commit 444b849

File tree

8 files changed

+124
-41
lines changed

8 files changed

+124
-41
lines changed

modules/sdk-coin-apt/src/lib/iface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ export interface TransferTxData {
2121
gasUnitPrice: number;
2222
gasUsed: number;
2323
expirationTime: number;
24+
feePayer: string;
2425
}

modules/sdk-coin-apt/src/lib/transaction/transaction.ts

Lines changed: 68 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
AccountAddress,
1313
AccountAuthenticatorEd25519,
1414
Aptos,
15-
APTOS_COIN,
1615
AptosConfig,
1716
DEFAULT_MAX_GAS_AMOUNT,
1817
Ed25519PublicKey,
@@ -23,22 +22,24 @@ import {
2322
RawTransaction,
2423
SignedTransaction,
2524
SimpleTransaction,
26-
TransactionAuthenticatorEd25519,
25+
TransactionAuthenticatorFeePayer,
2726
} from '@aptos-labs/ts-sdk';
2827
import { DEFAULT_GAS_UNIT_PRICE, SECONDS_PER_WEEK, UNAVAILABLE_TEXT } from '../constants';
2928
import utils from '../utils';
3029
import BigNumber from 'bignumber.js';
3130

3231
export abstract class Transaction extends BaseTransaction {
3332
protected _rawTransaction: RawTransaction;
34-
protected _signature: Signature;
33+
protected _senderSignature: Signature;
34+
protected _feePayerSignature: Signature;
3535
protected _sender: string;
3636
protected _recipient: TransactionRecipient;
3737
protected _sequenceNumber: number;
3838
protected _maxGasAmount: number;
3939
protected _gasUnitPrice: number;
4040
protected _gasUsed: number;
4141
protected _expirationTime: number;
42+
protected _feePayerAddress: string;
4243

4344
static EMPTY_PUBLIC_KEY = Buffer.alloc(32);
4445
static EMPTY_SIGNATURE = Buffer.alloc(64);
@@ -50,7 +51,13 @@ export abstract class Transaction extends BaseTransaction {
5051
this._gasUsed = 0;
5152
this._expirationTime = Math.floor(Date.now() / 1e3) + SECONDS_PER_WEEK;
5253
this._sequenceNumber = 0;
53-
this._signature = {
54+
this._senderSignature = {
55+
publicKey: {
56+
pub: Hex.fromHexInput(Transaction.EMPTY_PUBLIC_KEY).toString(),
57+
},
58+
signature: Transaction.EMPTY_SIGNATURE,
59+
};
60+
this._feePayerSignature = {
5461
publicKey: {
5562
pub: Hex.fromHexInput(Transaction.EMPTY_PUBLIC_KEY).toString(),
5663
},
@@ -120,6 +127,14 @@ export abstract class Transaction extends BaseTransaction {
120127
this._expirationTime = value;
121128
}
122129

130+
get feePayerAddress(): string {
131+
return this._feePayerAddress;
132+
}
133+
134+
set feePayerAddress(value: string) {
135+
this._feePayerAddress = value;
136+
}
137+
123138
set transactionType(transactionType: TransactionType) {
124139
this._type = transactionType;
125140
}
@@ -136,19 +151,38 @@ export abstract class Transaction extends BaseTransaction {
136151
}
137152

138153
serialize(): string {
139-
const publicKeyBuffer = utils.getBufferFromHexString(this._signature.publicKey.pub);
140-
const publicKey = new Ed25519PublicKey(publicKeyBuffer);
154+
const senderPublicKeyBuffer = utils.getBufferFromHexString(this._senderSignature.publicKey.pub);
155+
const senderPublicKey = new Ed25519PublicKey(senderPublicKeyBuffer);
141156

142-
const signature = new Ed25519Signature(this._signature.signature);
157+
const senderSignature = new Ed25519Signature(this._senderSignature.signature);
158+
const senderAuthenticator = new AccountAuthenticatorEd25519(senderPublicKey, senderSignature);
159+
160+
const feePayerPublicKeyBuffer = utils.getBufferFromHexString(this._feePayerSignature.publicKey.pub);
161+
const feePayerPublicKey = new Ed25519PublicKey(feePayerPublicKeyBuffer);
162+
163+
const feePayerSignature = new Ed25519Signature(this._feePayerSignature.signature);
164+
const feePayerAuthenticator = new AccountAuthenticatorEd25519(feePayerPublicKey, feePayerSignature);
165+
166+
const txnAuthenticator = new TransactionAuthenticatorFeePayer(senderAuthenticator, [], [], {
167+
address: AccountAddress.fromString(this._feePayerAddress),
168+
authenticator: feePayerAuthenticator,
169+
});
143170

144-
const txnAuthenticator = new TransactionAuthenticatorEd25519(publicKey, signature);
145171
const signedTxn = new SignedTransaction(this._rawTransaction, txnAuthenticator);
146172
return signedTxn.toString();
147173
}
148174

149-
addSignature(publicKey: PublicKey, signature: Buffer): void {
175+
addSenderSignature(publicKey: PublicKey, signature: Buffer): void {
150176
this._signatures = [signature.toString('hex')];
151-
this._signature = { publicKey, signature };
177+
this._senderSignature = { publicKey, signature };
178+
}
179+
180+
addFeePayerSignature(publicKey: PublicKey, signature: Buffer): void {
181+
this._feePayerSignature = { publicKey, signature };
182+
}
183+
184+
addFeePayerAddress(address: string): void {
185+
this._feePayerAddress = address;
152186
}
153187

154188
async build(): Promise<void> {
@@ -197,9 +231,15 @@ export abstract class Transaction extends BaseTransaction {
197231
this._rawTransaction = rawTxn;
198232

199233
this.loadInputsAndOutputs();
200-
const authenticator = signedTxn.authenticator as TransactionAuthenticatorEd25519;
201-
const signature = Buffer.from(authenticator.signature.toUint8Array());
202-
this.addSignature({ pub: authenticator.public_key.toString() }, signature);
234+
const authenticator = signedTxn.authenticator as any;
235+
this._feePayerAddress = authenticator.fee_payer.address.toString();
236+
const senderSignature = Buffer.from(authenticator.sender.signature.toUint8Array());
237+
this.addSenderSignature({ pub: authenticator.sender.public_key.toString() }, senderSignature);
238+
const feePayerSignature = Buffer.from(authenticator.fee_payer.authenticator.signature.toUint8Array());
239+
this.addFeePayerSignature(
240+
{ pub: authenticator.fee_payer.authenticator.public_key.toString() },
241+
feePayerSignature
242+
);
203243
} catch (e) {
204244
console.error('invalid signed transaction', e);
205245
throw new Error('invalid signed transaction');
@@ -229,8 +269,7 @@ export abstract class Transaction extends BaseTransaction {
229269
const simpleTxn = await aptos.transaction.build.simple({
230270
sender: senderAddress,
231271
data: {
232-
function: '0x1::coin::transfer',
233-
typeArguments: [APTOS_COIN],
272+
function: '0x1::aptos_account::transfer',
234273
functionArguments: [recipientAddress, this.recipient.amount],
235274
},
236275
options: {
@@ -248,13 +287,22 @@ export abstract class Transaction extends BaseTransaction {
248287
}
249288

250289
private generateTxnId() {
251-
if (!this._signature || !this._signature.publicKey || !this._signature.signature) {
290+
if (
291+
!this._senderSignature ||
292+
!this._senderSignature.publicKey ||
293+
!this._senderSignature.signature ||
294+
!this._feePayerSignature.publicKey ||
295+
!this._feePayerSignature.signature
296+
) {
252297
return;
253298
}
254299
const transaction = new SimpleTransaction(this._rawTransaction);
255-
const publicKey = new Ed25519PublicKey(utils.getBufferFromHexString(this._signature.publicKey.pub));
256-
const signature = new Ed25519Signature(this._signature.signature);
257-
const senderAuthenticator = new AccountAuthenticatorEd25519(publicKey, signature);
258-
this._id = generateUserTransactionHash({ transaction, senderAuthenticator });
300+
const senderPublicKey = new Ed25519PublicKey(utils.getBufferFromHexString(this._senderSignature.publicKey.pub));
301+
const senderSignature = new Ed25519Signature(this._senderSignature.signature);
302+
const senderAuthenticator = new AccountAuthenticatorEd25519(senderPublicKey, senderSignature);
303+
const feePayerPublicKey = new Ed25519PublicKey(utils.getBufferFromHexString(this._feePayerSignature.publicKey.pub));
304+
const feePayerSignature = new Ed25519Signature(this._feePayerSignature.signature);
305+
const feePayerAuthenticator = new AccountAuthenticatorEd25519(feePayerPublicKey, feePayerSignature);
306+
this._id = generateUserTransactionHash({ transaction, senderAuthenticator, feePayerAuthenticator });
259307
}
260308
}

modules/sdk-coin-apt/src/lib/transaction/transferTransaction.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { Transaction } from './transaction';
22
import { AptTransactionExplanation, TransferTxData } from '../iface';
33
import { TransactionRecipient, TransactionType } from '@bitgo/sdk-core';
4-
import { generateSigningMessage, RAW_TRANSACTION_SALT } from '@aptos-labs/ts-sdk';
4+
import {
5+
AccountAddress,
6+
FeePayerRawTransaction,
7+
generateSigningMessage,
8+
RAW_TRANSACTION_WITH_DATA_SALT,
9+
} from '@aptos-labs/ts-sdk';
510

611
export class TransferTransaction extends Transaction {
712
constructor(coinConfig) {
@@ -10,7 +15,12 @@ export class TransferTransaction extends Transaction {
1015
}
1116

1217
public get signablePayload(): Buffer {
13-
return Buffer.from(generateSigningMessage(this._rawTransaction.bcsToBytes(), RAW_TRANSACTION_SALT));
18+
const feePayerRawTxn = new FeePayerRawTransaction(
19+
this._rawTransaction,
20+
[],
21+
AccountAddress.fromString(this._feePayerAddress)
22+
);
23+
return Buffer.from(generateSigningMessage(feePayerRawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT));
1424
}
1525

1626
/** @inheritDoc */
@@ -52,6 +62,7 @@ export class TransferTransaction extends Transaction {
5262
gasUnitPrice: this.gasUnitPrice,
5363
gasUsed: this.gasUsed,
5464
expirationTime: this.expirationTime,
65+
feePayer: this.feePayerAddress,
5566
};
5667
}
5768
}

modules/sdk-coin-apt/src/lib/transactionBuilder.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ export abstract class TransactionBuilder extends BaseTransactionBuilder {
8080
}
8181

8282
/** @inheritDoc */
83-
addSignature(publicKey: BasePublicKey, signature: Buffer): void {
84-
this.transaction.addSignature(publicKey, signature);
83+
addSenderSignature(publicKey: BasePublicKey, signature: Buffer): void {
84+
this.transaction.addSenderSignature(publicKey, signature);
85+
}
86+
87+
addFeePayerSignature(publicKey: BasePublicKey, signature: Buffer): void {
88+
this.transaction.addFeePayerSignature(publicKey, signature);
8589
}
8690

8791
/** @inheritdoc */
@@ -151,4 +155,8 @@ export abstract class TransactionBuilder extends BaseTransactionBuilder {
151155
this.validateValue(new BigNumber(gasData.maxGasAmount));
152156
this.validateValue(new BigNumber(gasData.gasUnitPrice));
153157
}
158+
159+
addFeePayerAddress(address: string): void {
160+
this.transaction.addFeePayerAddress(address);
161+
}
154162
}

modules/sdk-coin-apt/test/resources/apt.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ export const sender2 = {
2525
publicKey: '0x2121dcd098069ae535697dd019cfd8677ca7aba0adac1d1959cbce6dc54b1259',
2626
};
2727

28+
export const sender3 = {
29+
address: '0x1aed808916ab9b1b30b07abb53561afd46847285ce28651221d406173a372449',
30+
publicKey: '0xf73836f42257240e43d439552471fc9dbcc3f1af5bd0b4ed83f44b5f66146442',
31+
};
32+
33+
export const feePayer = {
34+
address: '0xdbc87a1c816d9bcd06b683c37e80c7162e4d48da7812198b830e4d5d8e0629f2',
35+
privateKey: '0x51a9507d9127841a1465189188d93065cb26bad3bec05d3c8f28e9c1fc35bda0',
36+
publicKey: '0x5223396c531f13e031a9f0cb26d459d799a52e51be9a1cb9e871afb4c31f91ff',
37+
};
38+
2839
export const recipients: Recipient[] = [
2940
{
3041
address: addresses.validAddresses[0],
@@ -48,7 +59,7 @@ export const invalidRecipients: Recipient[] = [
4859
];
4960

5061
export const TRANSFER =
51-
'0xc8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d09170000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d0300000000006400000000000000207c7667000000000200202121dcd098069ae535697dd019cfd8677ca7aba0adac1d1959cbce6dc54b12594010f340ec153b724c4dc1c9a435d0fafed1775d851c1e8d965925a7879550c69a4677925d9198334a72ae7ce8998226ff0a83743c7ba8a2831136c072bf21c404';
62+
'0x1aed808916ab9b1b30b07abb53561afd46847285ce28651221d406173a37244992000000000000000200000000000000000000000000000000000000000000000000000000000000010d6170746f735f6163636f756e74087472616e73666572000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d0300000000006400000000000000979390670000000002030020f73836f42257240e43d439552471fc9dbcc3f1af5bd0b4ed83f44b5f6614644240caeb90efd4b7ecd922c97bb3163e6a9de1fbb2ee0fc0d56af484f4af9b0015c5831341550af29b3686713b6657c821d894635fe13c7933f06ee043728f040b090000dbc87a1c816d9bcd06b683c37e80c7162e4d48da7812198b830e4d5d8e0629f200205223396c531f13e031a9f0cb26d459d799a52e51be9a1cb9e871afb4c31f91ff4013e7e8a1325ee5f656c93baa3d0206a1d9bd6da5abdc6f5d9b8bbbb0926ddac68f3e57a915dd217d2d43e776a6cc01af72f895ea712acc836d30349f29a3c606';
5263

5364
export const INVALID_TRANSFER =
5465
'AAAAAAAAAAAAA6e7361637469bc4a58e500b9e64cb6547ee9b403000000000000002064ba1fb2f2fbd2938a350015d601f4db89cd7e8e2370d0dd9ae3ac4f635c1581111b8a49f67370bc4a58e500b9e64cb6462e39b802000000000000002064ba1fb2f2fbd2938a350015d601f4db89cd7e8e2370d0dd9ae3ac47aa1ff81f01c4173a804406a365e69dfb297d4eaaf002546ebd016400000000000000cba4a48bb0f8b586c167e5dcefaa1c5e96ab3f0836d6ca08f2081732944d1e5b6b406a4a462e39b8030000000000000020b9490ede63215262c434e03f606d9799f3ba704523ceda184b386d47aa1ff81f01000000000000006400000000000000';

modules/sdk-coin-apt/test/unit/apt.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('APT:', function () {
104104
describe('Parse and Explain Transactions: ', () => {
105105
const transferInputsResponse = [
106106
{
107-
address: testData.sender2.address,
107+
address: testData.sender3.address,
108108
amount: testData.AMOUNT.toString(),
109109
},
110110
];
@@ -145,7 +145,7 @@ describe('APT:', function () {
145145
'sender',
146146
'type',
147147
],
148-
id: '0x43ea7697550d5effb68c47488fd32a7756ee418e8d2be7d6b7f634f3ac0d7766',
148+
id: '0x9ec764992194c4b4095289a61073e91cf5404d5bedb5a42ab8bf16d07353332b',
149149
outputs: [
150150
{
151151
address: '0xf7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad9',
@@ -156,7 +156,7 @@ describe('APT:', function () {
156156
changeOutputs: [],
157157
changeAmount: '0',
158158
fee: { fee: '0' },
159-
sender: '0xc8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d09',
159+
sender: '0x1aed808916ab9b1b30b07abb53561afd46847285ce28651221d406173a372449',
160160
type: 0,
161161
});
162162
});

modules/sdk-coin-apt/test/unit/transferBuilder.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe('Apt Transfer Transaction', () => {
2020
});
2121
txBuilder.sequenceNumber(14);
2222
txBuilder.expirationTime(1736246155);
23+
txBuilder.addFeePayerAddress(testData.feePayer.address);
2324
const tx = (await txBuilder.build()) as TransferTransaction;
2425
should.equal(tx.sender, testData.sender2.address);
2526
should.equal(tx.recipient.address, testData.recipients[0].address);
@@ -44,7 +45,7 @@ describe('Apt Transfer Transaction', () => {
4445
const rawTx = tx.toBroadcastFormat();
4546
should.equal(utils.isValidRawTransaction(rawTx), true);
4647
rawTx.should.equal(
47-
'0xc8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d090e0000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d03000000000064000000000000008b037d670000000002002000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
48+
'0xc8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d090e000000000000000200000000000000000000000000000000000000000000000000000000000000010d6170746f735f6163636f756e74087472616e73666572000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d03000000000064000000000000008b037d670000000002030020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dbc87a1c816d9bcd06b683c37e80c7162e4d48da7812198b830e4d5d8e0629f2002000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
4849
);
4950
});
5051

@@ -54,7 +55,7 @@ describe('Apt Transfer Transaction', () => {
5455
should.equal(tx.type, TransactionType.Send);
5556
tx.inputs.length.should.equal(1);
5657
tx.inputs[0].should.deepEqual({
57-
address: testData.sender2.address,
58+
address: testData.sender3.address,
5859
value: testData.recipients[0].amount,
5960
coin: 'tapt',
6061
});
@@ -64,11 +65,11 @@ describe('Apt Transfer Transaction', () => {
6465
value: testData.recipients[0].amount,
6566
coin: 'tapt',
6667
});
67-
should.equal(tx.id, '0x43ea7697550d5effb68c47488fd32a7756ee418e8d2be7d6b7f634f3ac0d7766');
68+
should.equal(tx.id, '0x9ec764992194c4b4095289a61073e91cf5404d5bedb5a42ab8bf16d07353332b');
6869
should.equal(tx.maxGasAmount, 200000);
6970
should.equal(tx.gasUnitPrice, 100);
70-
should.equal(tx.sequenceNumber, 23);
71-
should.equal(tx.expirationTime, 1735818272);
71+
should.equal(tx.sequenceNumber, 146);
72+
should.equal(tx.expirationTime, 1737528215);
7273
should.equal(tx.type, TransactionType.Send);
7374
const rawTx = tx.toBroadcastFormat();
7475
should.equal(utils.isValidRawTransaction(rawTx), true);
@@ -86,11 +87,12 @@ describe('Apt Transfer Transaction', () => {
8687
});
8788
txBuilder.sequenceNumber(14);
8889
txBuilder.expirationTime(1736246155);
90+
txBuilder.addFeePayerAddress(testData.feePayer.address);
8991
const tx = (await txBuilder.build()) as TransferTransaction;
9092
const signablePayload = tx.signablePayload;
9193
should.equal(
9294
signablePayload.toString('hex'),
93-
'b5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b193c8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d090e0000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d03000000000064000000000000008b037d670000000002'
95+
'5efa3c4f02f83a0f4b2d69fc95c607cc02825cc4e7be536ef0992df050d9e67c01c8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d090e000000000000000200000000000000000000000000000000000000000000000000000000000000010d6170746f735f6163636f756e74087472616e73666572000220f7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad908e803000000000000400d03000000000064000000000000008b037d67000000000200dbc87a1c816d9bcd06b683c37e80c7162e4d48da7812198b830e4d5d8e0629f2'
9496
);
9597
});
9698

@@ -105,6 +107,7 @@ describe('Apt Transfer Transaction', () => {
105107
});
106108
txBuilder.sequenceNumber(14);
107109
txBuilder.expirationTime(1736246155);
110+
txBuilder.addFeePayerAddress(testData.feePayer.address);
108111
const tx = (await txBuilder.build()) as TransferTransaction;
109112
const toJson = tx.toJson();
110113
should.equal(toJson.sender, testData.sender2.address);
@@ -116,22 +119,23 @@ describe('Apt Transfer Transaction', () => {
116119
should.equal(toJson.maxGasAmount, 200000);
117120
should.equal(toJson.gasUnitPrice, 100);
118121
should.equal(toJson.expirationTime, 1736246155);
122+
should.equal(toJson.feePayer, testData.feePayer.address);
119123
});
120124

121125
it('should build a signed tx and validate its toJson', async function () {
122126
const txBuilder = factory.from(testData.TRANSFER);
123127
const tx = (await txBuilder.build()) as TransferTransaction;
124128
const toJson = tx.toJson();
125-
should.equal(toJson.id, '0x43ea7697550d5effb68c47488fd32a7756ee418e8d2be7d6b7f634f3ac0d7766');
126-
should.equal(toJson.sender, '0xc8f02d25aa698b3e9fbd8a08e8da4c8ee261832a25a4cde8731b5ec356537d09');
129+
should.equal(toJson.id, '0x9ec764992194c4b4095289a61073e91cf5404d5bedb5a42ab8bf16d07353332b');
130+
should.equal(toJson.sender, '0x1aed808916ab9b1b30b07abb53561afd46847285ce28651221d406173a372449');
127131
should.deepEqual(toJson.recipient, {
128132
address: '0xf7405c28a02cf5bab4ea4498240bb3579db45951794eb1c843bef0534c093ad9',
129133
amount: '1000',
130134
});
131-
should.equal(toJson.sequenceNumber, 23);
135+
should.equal(toJson.sequenceNumber, 146);
132136
should.equal(toJson.maxGasAmount, 200000);
133137
should.equal(toJson.gasUnitPrice, 100);
134-
should.equal(toJson.expirationTime, 1735818272);
138+
should.equal(toJson.expirationTime, 1737528215);
135139
});
136140
});
137141

0 commit comments

Comments
 (0)