Skip to content

Commit fe75b45

Browse files
committed
feat(tests): add serialization/deserialization test for SetTransactionFee action
1 parent ebcb1aa commit fe75b45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

governance/xc_admin/packages/xc_admin_common/src/__tests__/GovernancePayload.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
DataSource,
3333
SetDataSources,
3434
} from "../governance_payload/SetDataSources";
35+
import { SetTransactionFee } from "../governance_payload/SetTransactionFee";
3536

3637
test("GovernancePayload ser/de", (done) => {
3738
jest.setTimeout(60000);
@@ -424,6 +425,12 @@ function governanceActionArb(): Arbitrary<PythGovernanceAction> {
424425
Buffer.from(token),
425426
);
426427
});
428+
} else if (header.action === "SetTransactionFee") {
429+
return fc
430+
.record({ v: fc.bigUintN(64), e: fc.bigUintN(64) })
431+
.map(({ v, e }) => {
432+
return new SetTransactionFee(header.targetChainId, v, e);
433+
});
427434
} else {
428435
throw new Error("Unsupported action type");
429436
}

0 commit comments

Comments
 (0)