Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clients/ts/src/bridge/generated/errors/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export const BRIDGE_ERROR__INVALID_SCALER_EXPONENT = 0x319f; // 12703
export const BRIDGE_ERROR__MINT_IS_NOT_FROM_TOKEN2022 = 0x31a0; // 12704
/** MintIsNotWrappedTokenPda: Mint is not a valid wrapped token PDA */
export const BRIDGE_ERROR__MINT_IS_NOT_WRAPPED_TOKEN_PDA = 0x31a1; // 12705
/** UriTooLong: Token metadata uri is too long */
export const BRIDGE_ERROR__URI_TOO_LONG = 0x31a2; // 12706
/** InvalidThreshold: Threshold must be <= number of signers */
export const BRIDGE_ERROR__INVALID_THRESHOLD = 0x3200; // 12800
/** TooManySigners: Too many signers (max 32) */
Expand Down Expand Up @@ -150,6 +152,7 @@ export type BridgeError =
| typeof BRIDGE_ERROR__UNAUTHORIZED_CONFIG_UPDATE
| typeof BRIDGE_ERROR__UNAUTHORIZED_INITIALIZATION
| typeof BRIDGE_ERROR__UNUSED_PROOF_ELEMENTS_REMAINING
| typeof BRIDGE_ERROR__URI_TOO_LONG
| typeof BRIDGE_ERROR__ZERO_ADDRESS;

let bridgeErrorMessages: Record<BridgeError, string> | undefined;
Expand Down Expand Up @@ -199,6 +202,7 @@ if (process.env.NODE_ENV !== 'production') {
[BRIDGE_ERROR__UNAUTHORIZED_CONFIG_UPDATE]: `Unauthorized to update configuration`,
[BRIDGE_ERROR__UNAUTHORIZED_INITIALIZATION]: `Only the upgrade authority can initialize the bridge`,
[BRIDGE_ERROR__UNUSED_PROOF_ELEMENTS_REMAINING]: `Unused proof elements remaining`,
[BRIDGE_ERROR__URI_TOO_LONG]: `Token metadata uri is too long`,
[BRIDGE_ERROR__ZERO_ADDRESS]: `Zero address`,
};
}
Expand Down
1 change: 1 addition & 0 deletions clients/ts/src/bridge/generated/instructions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ export * from './setPauseStatus';
export * from './setWindowDuration';
export * from './transferGuardian';
export * from './wrapToken';
export * from './wrapTokenV2';
28 changes: 4 additions & 24 deletions clients/ts/src/bridge/generated/instructions/wrapToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,9 @@ export type WrapTokenInstructionData = {
name: string;
/** The symbol/ticker of the token (e.g., "WBTC") */
symbol: string;
/**
* The 20-byte address of the corresponding token contract on Base (EVM address bytes).
* This allows the bridge to identify which Base token this Solana token represents.
*/
/** The 20-byte address of the corresponding token contract on Base (EVM address bytes). */
remoteToken: ReadonlyUint8Array;
/**
* The scaling exponent used to convert between token amounts on different chains.
* This handles cases where tokens have differing decimal precision on Base vs Solana.
* For example, when Base token has 18 decimals and the Solana wrapped mint has 9,
* this value conveys the decimal relationship so bridging logic can scale amounts.
* The exact conversion is performed by the EVM-side contract; Solana propagates this
* value but does not apply arithmetic with it.
*/
/** The scaling exponent used to convert between token amounts on different chains. */
scalerExponent: number;
};

Expand All @@ -124,19 +114,9 @@ export type WrapTokenInstructionDataArgs = {
name: string;
/** The symbol/ticker of the token (e.g., "WBTC") */
symbol: string;
/**
* The 20-byte address of the corresponding token contract on Base (EVM address bytes).
* This allows the bridge to identify which Base token this Solana token represents.
*/
/** The 20-byte address of the corresponding token contract on Base (EVM address bytes). */
remoteToken: ReadonlyUint8Array;
/**
* The scaling exponent used to convert between token amounts on different chains.
* This handles cases where tokens have differing decimal precision on Base vs Solana.
* For example, when Base token has 18 decimals and the Solana wrapped mint has 9,
* this value conveys the decimal relationship so bridging logic can scale amounts.
* The exact conversion is performed by the EVM-side contract; Solana propagates this
* value but does not apply arithmetic with it.
*/
/** The scaling exponent used to convert between token amounts on different chains. */
scalerExponent: number;
};

Expand Down
Loading