From ff3e674eebde7bd50c6623f9a886f5260eff08b2 Mon Sep 17 00:00:00 2001 From: Nimatstar Date: Sun, 10 May 2026 20:57:59 +0100 Subject: [PATCH 1/2] feat: add VaultError enum stub --- contracts/vault_router/src/error.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 contracts/vault_router/src/error.rs diff --git a/contracts/vault_router/src/error.rs b/contracts/vault_router/src/error.rs new file mode 100644 index 0000000..4dafe71 --- /dev/null +++ b/contracts/vault_router/src/error.rs @@ -0,0 +1,11 @@ +#![allow(unused)] +use soroban_sdk::contracterror; + +#[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum VaultError { + InvalidTier = 1, + BelowMinDeposit = 2, + LockNotExpired = 3, +} \ No newline at end of file From 5ee1ae2dff401e88ead21ef212233ce8d7c8f9b1 Mon Sep 17 00:00:00 2001 From: Nimatstar Date: Sun, 10 May 2026 20:58:00 +0100 Subject: [PATCH 2/2] feat: add YieldLadderError stubs --- sdks/typescript/src/errors.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sdks/typescript/src/errors.ts diff --git a/sdks/typescript/src/errors.ts b/sdks/typescript/src/errors.ts new file mode 100644 index 0000000..741f4ce --- /dev/null +++ b/sdks/typescript/src/errors.ts @@ -0,0 +1,14 @@ +export class YieldLadderError extends Error { + constructor(message: string) { + super(message); + this.name = 'YieldLadderError'; + } +} + +export class LockNotExpiredError extends YieldLadderError { + constructor() { super('Lock period has not expired yet'); this.name = 'LockNotExpiredError'; } +} + +export class BelowMinDepositError extends YieldLadderError { + constructor() { super('Amount is below the minimum deposit'); this.name = 'BelowMinDepositError'; } +} \ No newline at end of file