diff --git a/package.json b/package.json index f59cb82..5655d51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinfello/agent-cli", - "version": "0.1.4", + "version": "0.1.5", "description": "", "type": "module", "main": "dist/index.js", diff --git a/src/scope.ts b/src/scope.ts index 1fc4003..d516f0f 100644 --- a/src/scope.ts +++ b/src/scope.ts @@ -14,6 +14,7 @@ export interface RawScope { tokenId?: string targets?: string[] selectors?: string[] + valueLte?: { maxValue: string } } export function parseScope(raw: RawScope): DelegationScope { @@ -79,6 +80,9 @@ export function parseScope(raw: RawScope): DelegationScope { type: 'functionCall', targets: (raw.targets ?? []).map((t) => t as Hex), selectors: (raw.selectors ?? []).map((s) => s as Hex), + ...(raw.valueLte?.maxValue + ? { valueLte: { maxValue: BigInt(raw.valueLte.maxValue) } } + : {}), } default: