Skip to content

Conversation

@yingyangxu2026
Copy link
Collaborator

Description

This pr is adding validation for inputs currency and currencyToken., includes:

  • On Aeneid : Input parameters currency / currencyToken accepts WIP or MERC20.
  • On Mainnet: Input parameters currency / currencyToken accepts WIP.

WIP address: 0x1514000000000000000000000000000000000000
MERC20 address: 0xF2104833d386a2734a4eB3B8ad6FC6812F29E38E

Test Plan

Add unit tests for the modified APIs.

@yingyangxu2026 yingyangxu2026 changed the title Tssdk 135 feat: Add validation for inputs currency and currencyToken. Jan 16, 2026
"0x1514000000000000000000000000000000000000" as Address, // WIP
],
} as const satisfies Record<SupportedChainIds, readonly Address[]>;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try using a function instead object? Can you wrap the error into the function instead layout many places?

});

describe("Test groupClient.collectRoyalties", () => {
describe("TSSDK-135(Add validation for inputs currency and currencyToken.) Test groupClient.collectRoyalties", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as the above one.

expect(oov3Contract).to.equal(mockAddress);
});

describe("TSSDK-135(Add validation for inputs currency and currencyToken.) getMinimumBond", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as the above one.

});

describe("commercialUse", () => {
describe("TSSDK-135(Add validation for inputs currency and currencyToken.) commercialUse", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the similar issues.

export const mockAddress = "0x73fcb515cee99e4991465ef586cfe2b072ebb513";
// Use addresses that are whitelisted in `allowedCurrenciesByChain` for unit tests that exercise currency checks.
export const mockERC20 = "0xF2104833d386a2734a4eB3B8ad6FC6812F29E38E";
export const mockAddress = "0x1514000000000000000000000000000000000000";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly get WIP from "./constants/common"

"eslint-config-turbo": "^1.13.4",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-turbo": "^1.13.4",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please focus on the ticket feature. We don't need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants