From 0982bed64bf806b903ae4a70acfb3d1e31041508 Mon Sep 17 00:00:00 2001 From: PedroAraoz Date: Wed, 28 Jan 2026 17:36:45 -0300 Subject: [PATCH 1/2] examples: rename to use functions --- README.md | 2 +- examples/01-simple-transfer/manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 8 +- .../manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 8 +- .../manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 10 +- .../manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 12 +- .../05-invest-aave-idle-balance/manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 14 +- .../manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 16 +- .../manifest.yaml | 4 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 22 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 10 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 10 +- examples/10-rebalancing-tokens/manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 18 +- examples/11-automated-refunds/.env.sample | 2 +- examples/11-automated-refunds/package.json | 2 +- .../{create-config.ts => create-trigger.ts} | 26 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 8 +- ...nfig.json => tsconfig.create-trigger.json} | 2 +- .../12-dollar-cost-averaging/manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 12 +- .../manifest.bridge.yaml | 2 +- .../13-bridge-and-invest-aave/package.json | 6 +- ...fig.invest.ts => create-trigger.invest.ts} | 33 +- .../13-bridge-and-invest-aave/src/invest.ts | 4 +- .../tests/bridge.spec.ts | 8 +- .../tests/invest.spec.ts | 18 +- ...nfig.json => tsconfig.create-trigger.json} | 2 +- examples/14-fee-collection/manifest.yaml | 2 +- .../src/{task.ts => function.ts} | 0 .../tests/{task.spec.ts => function.spec.ts} | 16 +- yarn.lock | 432 +++++++++--------- 49 files changed, 361 insertions(+), 364 deletions(-) rename examples/01-simple-transfer/src/{task.ts => function.ts} (100%) rename examples/01-simple-transfer/tests/{task.spec.ts => function.spec.ts} (87%) rename examples/02-simple-transfer-with-inputs/src/{task.ts => function.ts} (100%) rename examples/02-simple-transfer-with-inputs/tests/{task.spec.ts => function.spec.ts} (88%) rename examples/03-transfer-balance-threshold/src/{task.ts => function.ts} (100%) rename examples/03-transfer-balance-threshold/tests/{task.spec.ts => function.spec.ts} (89%) rename examples/04-transfer-balance-threshold-with-oracles/src/{task.ts => function.ts} (100%) rename examples/04-transfer-balance-threshold-with-oracles/tests/{task.spec.ts => function.spec.ts} (87%) rename examples/05-invest-aave-idle-balance/src/{task.ts => function.ts} (100%) rename examples/05-invest-aave-idle-balance/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/06-withdraw-from-aave-balance-threshold/src/{task.ts => function.ts} (100%) rename examples/06-withdraw-from-aave-balance-threshold/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/07-withdraw-from-aave-swap-and-transfer/src/{task.ts => function.ts} (100%) rename examples/07-withdraw-from-aave-swap-and-transfer/tests/{task.spec.ts => function.spec.ts} (88%) rename examples/08-relevant-tokens-query/src/{task.ts => function.ts} (100%) rename examples/08-relevant-tokens-query/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/09-subgraph-query/src/{task.ts => function.ts} (100%) rename examples/09-subgraph-query/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/10-rebalancing-tokens/src/{task.ts => function.ts} (100%) rename examples/10-rebalancing-tokens/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/11-automated-refunds/src/{create-config.ts => create-trigger.ts} (65%) rename examples/11-automated-refunds/src/{task.ts => function.ts} (100%) rename examples/11-automated-refunds/tests/{task.spec.ts => function.spec.ts} (90%) rename examples/11-automated-refunds/{tsconfig.create-config.json => tsconfig.create-trigger.json} (92%) rename examples/12-dollar-cost-averaging/src/{task.ts => function.ts} (100%) rename examples/12-dollar-cost-averaging/tests/{task.spec.ts => function.spec.ts} (89%) rename examples/13-bridge-and-invest-aave/src/{create-config.invest.ts => create-trigger.invest.ts} (70%) rename examples/13-bridge-and-invest-aave/{tsconfig.create-config.json => tsconfig.create-trigger.json} (91%) rename examples/14-fee-collection/src/{task.ts => function.ts} (100%) rename examples/14-fee-collection/tests/{task.spec.ts => function.spec.ts} (90%) diff --git a/README.md b/README.md index b8affa2..23e48aa 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## Content -This repository provides working examples of tasks that can be automated using Mimic Protocol. +This repository provides working examples of functions that can be automated using Mimic Protocol. ## Setup diff --git a/examples/01-simple-transfer/manifest.yaml b/examples/01-simple-transfer/manifest.yaml index 83f21c1..76a4bfa 100644 --- a/examples/01-simple-transfer/manifest.yaml +++ b/examples/01-simple-transfer/manifest.yaml @@ -1,3 +1,3 @@ version: 1.0.0 name: Simple transfer -description: Automated task to execute transfers of 1 USDC with 0.1 USDC fee +description: Automated function to execute transfers of 1 USDC with 0.1 USDC fee diff --git a/examples/01-simple-transfer/src/task.ts b/examples/01-simple-transfer/src/function.ts similarity index 100% rename from examples/01-simple-transfer/src/task.ts rename to examples/01-simple-transfer/src/function.ts diff --git a/examples/01-simple-transfer/tests/task.spec.ts b/examples/01-simple-transfer/tests/function.spec.ts similarity index 87% rename from examples/01-simple-transfer/tests/task.spec.ts rename to examples/01-simple-transfer/tests/function.spec.ts index f8e568b..1279555 100644 --- a/examples/01-simple-transfer/tests/task.spec.ts +++ b/examples/01-simple-transfer/tests/function.spec.ts @@ -1,9 +1,9 @@ import { OpType } from '@mimicprotocol/sdk' -import { Context, runTask, Transfer } from '@mimicprotocol/test-ts' +import { Context, runFunction, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: '0x756f45e3fa69347a9a973a725e3c98bc4db0b5a0', @@ -12,7 +12,7 @@ describe('Task', () => { } it('produces the expected intents', async () => { - const result = await runTask(taskDir, context) + const result = await runFunction(functionDir, context) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/02-simple-transfer-with-inputs/manifest.yaml b/examples/02-simple-transfer-with-inputs/manifest.yaml index 1b1f512..bf2cb57 100644 --- a/examples/02-simple-transfer-with-inputs/manifest.yaml +++ b/examples/02-simple-transfer-with-inputs/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Simple transfer with inputs -description: Automated task to execute parameterized transfers +description: Automated function to execute parameterized transfers inputs: - chainId: uint32 - token: address diff --git a/examples/02-simple-transfer-with-inputs/src/task.ts b/examples/02-simple-transfer-with-inputs/src/function.ts similarity index 100% rename from examples/02-simple-transfer-with-inputs/src/task.ts rename to examples/02-simple-transfer-with-inputs/src/function.ts diff --git a/examples/02-simple-transfer-with-inputs/tests/task.spec.ts b/examples/02-simple-transfer-with-inputs/tests/function.spec.ts similarity index 88% rename from examples/02-simple-transfer-with-inputs/tests/task.spec.ts rename to examples/02-simple-transfer-with-inputs/tests/function.spec.ts index 7385ecb..358f759 100644 --- a/examples/02-simple-transfer-with-inputs/tests/task.spec.ts +++ b/examples/02-simple-transfer-with-inputs/tests/function.spec.ts @@ -1,5 +1,5 @@ import { fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, Transfer } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -36,7 +36,7 @@ describe('Task', () => { ] it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/03-transfer-balance-threshold/manifest.yaml b/examples/03-transfer-balance-threshold/manifest.yaml index c0648b6..6a33279 100644 --- a/examples/03-transfer-balance-threshold/manifest.yaml +++ b/examples/03-transfer-balance-threshold/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Transfer based on threshold -description: Automated task to execute parameterized transfers based on balance threshold +description: Automated function to execute parameterized transfers based on balance threshold inputs: - chainId: uint32 - token: address diff --git a/examples/03-transfer-balance-threshold/src/task.ts b/examples/03-transfer-balance-threshold/src/function.ts similarity index 100% rename from examples/03-transfer-balance-threshold/src/task.ts rename to examples/03-transfer-balance-threshold/src/function.ts diff --git a/examples/03-transfer-balance-threshold/tests/task.spec.ts b/examples/03-transfer-balance-threshold/tests/function.spec.ts similarity index 89% rename from examples/03-transfer-balance-threshold/tests/task.spec.ts rename to examples/03-transfer-balance-threshold/tests/function.spec.ts index 891ebc1..112f392 100644 --- a/examples/03-transfer-balance-threshold/tests/task.spec.ts +++ b/examples/03-transfer-balance-threshold/tests/function.spec.ts @@ -1,5 +1,5 @@ import { fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, Transfer } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -50,7 +50,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -77,7 +77,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('does not produce any intent', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.intents).to.be.empty }) diff --git a/examples/04-transfer-balance-threshold-with-oracles/manifest.yaml b/examples/04-transfer-balance-threshold-with-oracles/manifest.yaml index 8c25554..befb9e3 100644 --- a/examples/04-transfer-balance-threshold-with-oracles/manifest.yaml +++ b/examples/04-transfer-balance-threshold-with-oracles/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Transfer based on USD threshold -description: Automated task to execute parameterized transfers based on balance threshold in USD +description: Automated function to execute parameterized transfers based on balance threshold in USD inputs: - chainId: uint32 - token: address diff --git a/examples/04-transfer-balance-threshold-with-oracles/src/task.ts b/examples/04-transfer-balance-threshold-with-oracles/src/function.ts similarity index 100% rename from examples/04-transfer-balance-threshold-with-oracles/src/task.ts rename to examples/04-transfer-balance-threshold-with-oracles/src/function.ts diff --git a/examples/04-transfer-balance-threshold-with-oracles/tests/task.spec.ts b/examples/04-transfer-balance-threshold-with-oracles/tests/function.spec.ts similarity index 87% rename from examples/04-transfer-balance-threshold-with-oracles/tests/task.spec.ts rename to examples/04-transfer-balance-threshold-with-oracles/tests/function.spec.ts index 8325b1a..e582f22 100644 --- a/examples/04-transfer-balance-threshold-with-oracles/tests/task.spec.ts +++ b/examples/04-transfer-balance-threshold-with-oracles/tests/function.spec.ts @@ -1,5 +1,5 @@ import { fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, TokenPriceQueryMock, Transfer } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, TokenPriceQueryMock, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -27,7 +27,7 @@ describe('Task', () => { const prices: TokenPriceQueryMock[] = [ { - request: { token: inputs.token, chainId: inputs.chainId }, + request: { token: { address: inputs.token, chainId: inputs.chainId } }, response: ['1000000000000000000'], // 1 token = 1 USD }, ] @@ -57,7 +57,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -87,7 +87,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('does not produce any intent', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.intents).to.be.empty diff --git a/examples/05-invest-aave-idle-balance/manifest.yaml b/examples/05-invest-aave-idle-balance/manifest.yaml index e7f7059..2969f28 100644 --- a/examples/05-invest-aave-idle-balance/manifest.yaml +++ b/examples/05-invest-aave-idle-balance/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Invest in AAVE idle balance -description: Automated task to invest in AAVE idle balance above certain threshold in USD +description: Automated function to invest in AAVE idle balance above certain threshold in USD inputs: - chainId: uint32 - aToken: address diff --git a/examples/05-invest-aave-idle-balance/src/task.ts b/examples/05-invest-aave-idle-balance/src/function.ts similarity index 100% rename from examples/05-invest-aave-idle-balance/src/task.ts rename to examples/05-invest-aave-idle-balance/src/function.ts diff --git a/examples/05-invest-aave-idle-balance/tests/task.spec.ts b/examples/05-invest-aave-idle-balance/tests/function.spec.ts similarity index 90% rename from examples/05-invest-aave-idle-balance/tests/task.spec.ts rename to examples/05-invest-aave-idle-balance/tests/function.spec.ts index be2a574..70424fb 100644 --- a/examples/05-invest-aave-idle-balance/tests/task.spec.ts +++ b/examples/05-invest-aave-idle-balance/tests/function.spec.ts @@ -1,5 +1,5 @@ import { EvmCallIntent, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, TokenPriceQueryMock } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, TokenPriceQueryMock } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -11,8 +11,8 @@ const AavePoolInterface = new Interface(AavePool) const AaveTokenInterface = new Interface(AaveToken) const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -33,11 +33,11 @@ describe('Task', () => { const prices: TokenPriceQueryMock[] = [ { - request: { token: inputs.aToken, chainId: inputs.chainId }, + request: { token: { address: inputs.aToken, chainId: inputs.chainId } }, response: ['1000000000000000000'], // 1 aOptUSDC = 1 USD }, { - request: { token: underlyingToken, chainId: inputs.chainId }, + request: { token: { address: underlyingToken, chainId: inputs.chainId } }, response: ['1000000000000000000'], // 1 USDC = 1 USD }, ] @@ -109,7 +109,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('does not produce any intent', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.intents).to.be.empty @@ -124,7 +124,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/06-withdraw-from-aave-balance-threshold/manifest.yaml b/examples/06-withdraw-from-aave-balance-threshold/manifest.yaml index 54bbd01..397c2ad 100644 --- a/examples/06-withdraw-from-aave-balance-threshold/manifest.yaml +++ b/examples/06-withdraw-from-aave-balance-threshold/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Withdraw from AAVE based on balance threshold -description: Automated task to withdraw from AAVE based on balance threshold in USD +description: Automated function to withdraw from AAVE based on balance threshold in USD inputs: - chainId: uint32 - aToken: address diff --git a/examples/06-withdraw-from-aave-balance-threshold/src/task.ts b/examples/06-withdraw-from-aave-balance-threshold/src/function.ts similarity index 100% rename from examples/06-withdraw-from-aave-balance-threshold/src/task.ts rename to examples/06-withdraw-from-aave-balance-threshold/src/function.ts diff --git a/examples/06-withdraw-from-aave-balance-threshold/tests/task.spec.ts b/examples/06-withdraw-from-aave-balance-threshold/tests/function.spec.ts similarity index 90% rename from examples/06-withdraw-from-aave-balance-threshold/tests/task.spec.ts rename to examples/06-withdraw-from-aave-balance-threshold/tests/function.spec.ts index 6440107..e3190e2 100644 --- a/examples/06-withdraw-from-aave-balance-threshold/tests/task.spec.ts +++ b/examples/06-withdraw-from-aave-balance-threshold/tests/function.spec.ts @@ -1,5 +1,5 @@ import { OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, Swap, TokenPriceQueryMock } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, Swap, TokenPriceQueryMock } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -9,8 +9,8 @@ import ERC20Abi from '../abis/ERC20.json' const AaveTokenInterface = new Interface(AaveToken) const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -30,11 +30,11 @@ describe('Task', () => { const prices: TokenPriceQueryMock[] = [ { - request: { token: inputs.aToken, chainId: inputs.chainId }, + request: { token: { address: inputs.aToken, chainId: inputs.chainId } }, response: ['1000000000000000000'], // 1 aOptUSDC = 1 USD }, { - request: { token: underlyingToken, chainId: inputs.chainId }, + request: { token: { address: underlyingToken, chainId: inputs.chainId } }, response: ['1000000000000000000'], // 1 USDC = 1 USD }, ] @@ -111,7 +111,7 @@ describe('Task', () => { const calls = buildCalls(recipientBalance, userBalance) it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -144,7 +144,7 @@ describe('Task', () => { const calls = buildCalls(recipientBalance, userBalance) it('does not produce any intent', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.intents).to.be.empty @@ -160,7 +160,7 @@ describe('Task', () => { const calls = buildCalls(recipientBalance, '0') // `userBalance` does not matter it('does not produce any intent', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.intents).to.be.empty diff --git a/examples/07-withdraw-from-aave-swap-and-transfer/manifest.yaml b/examples/07-withdraw-from-aave-swap-and-transfer/manifest.yaml index 9b923e9..b7187c0 100644 --- a/examples/07-withdraw-from-aave-swap-and-transfer/manifest.yaml +++ b/examples/07-withdraw-from-aave-swap-and-transfer/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 -name: Claim-Swap-Transfer Loop Task -description: This task is for demo purposes. It withdraws from AAVE, swaps for an AAVE token and transfer to deposit in loop +name: Claim-Swap-Transfer Loop Function +description: This function is for demo purposes. It withdraws from AAVE, swaps for an AAVE token and transfer to deposit in loop inputs: - maxFeeUsdt: string # e.g., '0.5' = 0.5 USDT - smartAccount: address diff --git a/examples/07-withdraw-from-aave-swap-and-transfer/src/task.ts b/examples/07-withdraw-from-aave-swap-and-transfer/src/function.ts similarity index 100% rename from examples/07-withdraw-from-aave-swap-and-transfer/src/task.ts rename to examples/07-withdraw-from-aave-swap-and-transfer/src/function.ts diff --git a/examples/07-withdraw-from-aave-swap-and-transfer/tests/task.spec.ts b/examples/07-withdraw-from-aave-swap-and-transfer/tests/function.spec.ts similarity index 88% rename from examples/07-withdraw-from-aave-swap-and-transfer/tests/task.spec.ts rename to examples/07-withdraw-from-aave-swap-and-transfer/tests/function.spec.ts index 55d2119..53bb1ba 100644 --- a/examples/07-withdraw-from-aave-swap-and-transfer/tests/task.spec.ts +++ b/examples/07-withdraw-from-aave-swap-and-transfer/tests/function.spec.ts @@ -4,7 +4,7 @@ import { Context, EvmCallQueryMock, RelevantTokensQueryMock, - runTask, + runFunction, Swap, TokenPriceQueryMock, Transfer, @@ -18,8 +18,8 @@ import ERC20Abi from '../abis/ERC20.json' const AavePoolInterface = new Interface(AavePool) const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = Chains.Optimism @@ -50,15 +50,15 @@ describe('Task', () => { const prices: TokenPriceQueryMock[] = [ { - request: { token: tokens.aUSDC, chainId }, + request: { token: { address: tokens.aUSDC, chainId } }, response: ['1000000'], }, { - request: { token: tokens.USDC, chainId }, + request: { token: { address: tokens.USDC, chainId } }, response: ['1000000'], }, { - request: { token: tokens.USDT, chainId }, + request: { token: { address: tokens.USDT, chainId } }, response: ['1000000'], }, ] @@ -118,7 +118,7 @@ describe('Task', () => { }) it('produces claim, swap, and transfer', async () => { - const result = await runTask(taskDir, context, { inputs, relevantTokens, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, relevantTokens, prices, calls }) const claimIntent = result.intents.find((i) => i.op === OpType.EvmCall) const swapIntent = result.intents.find((i) => i.op === OpType.Swap) @@ -140,7 +140,7 @@ describe('Task', () => { }) it('only produces a claim intent', async () => { - const result = await runTask(taskDir, context, { inputs, relevantTokens, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, relevantTokens, prices, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -170,7 +170,7 @@ describe('Task', () => { }) it('only produces a swap intent', async () => { - const result = await runTask(taskDir, context, { inputs, relevantTokens, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, relevantTokens, prices, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -194,7 +194,7 @@ describe('Task', () => { }) it('only produces a transfer intent', async () => { - const result = await runTask(taskDir, context, { inputs, relevantTokens, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, relevantTokens, prices, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -216,7 +216,7 @@ describe('Task', () => { }) it('does not produce any intents', async () => { - const result = await runTask(taskDir, context, { inputs, relevantTokens, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, relevantTokens, prices, calls }) expect(result.success).to.be.true expect(result.intents).to.be.empty }) diff --git a/examples/08-relevant-tokens-query/src/task.ts b/examples/08-relevant-tokens-query/src/function.ts similarity index 100% rename from examples/08-relevant-tokens-query/src/task.ts rename to examples/08-relevant-tokens-query/src/function.ts diff --git a/examples/08-relevant-tokens-query/tests/task.spec.ts b/examples/08-relevant-tokens-query/tests/function.spec.ts similarity index 90% rename from examples/08-relevant-tokens-query/tests/task.spec.ts rename to examples/08-relevant-tokens-query/tests/function.spec.ts index ce18517..9eccb3e 100644 --- a/examples/08-relevant-tokens-query/tests/task.spec.ts +++ b/examples/08-relevant-tokens-query/tests/function.spec.ts @@ -1,5 +1,5 @@ import { NATIVE_TOKEN_ADDRESS, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { EvmCallQueryMock, RelevantTokensQueryMock, runTask, Transfer } from '@mimicprotocol/test-ts' +import { EvmCallQueryMock, RelevantTokensQueryMock, runFunction, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = 1 const USDC = randomEvmAddress() @@ -59,7 +59,7 @@ describe('Task', () => { ] it('produces the expected intents for multiple tokens', async () => { - const result = await runTask(taskDir, context, { inputs, calls, relevantTokens }) + const result = await runFunction(functionDir, context, { inputs, calls, relevantTokens }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -106,7 +106,7 @@ describe('Task', () => { ] it('does not produce any intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, relevantTokens }) + const result = await runFunction(functionDir, context, { inputs, calls, relevantTokens }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) expect(result.intents).to.be.empty diff --git a/examples/09-subgraph-query/src/task.ts b/examples/09-subgraph-query/src/function.ts similarity index 100% rename from examples/09-subgraph-query/src/task.ts rename to examples/09-subgraph-query/src/function.ts diff --git a/examples/09-subgraph-query/tests/task.spec.ts b/examples/09-subgraph-query/tests/function.spec.ts similarity index 90% rename from examples/09-subgraph-query/tests/task.spec.ts rename to examples/09-subgraph-query/tests/function.spec.ts index f2541aa..9ed9c0d 100644 --- a/examples/09-subgraph-query/tests/task.spec.ts +++ b/examples/09-subgraph-query/tests/function.spec.ts @@ -1,5 +1,5 @@ import { OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, SubgraphQueryMock, Swap } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, SubgraphQueryMock, Swap } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const context: Context = { user: randomEvmAddress(), @@ -72,7 +72,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, subgraphQueries }) + const result = await runFunction(functionDir, context, { inputs, calls, subgraphQueries }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -101,7 +101,7 @@ describe('Task', () => { const calls = buildCalls(balance) it('throws an error', async () => { - const result = await runTask(taskDir, context, { inputs, calls, subgraphQueries }) + const result = await runFunction(functionDir, context, { inputs, calls, subgraphQueries }) expect(result.success).to.be.false expect(result.logs).to.have.lengthOf(1) diff --git a/examples/10-rebalancing-tokens/manifest.yaml b/examples/10-rebalancing-tokens/manifest.yaml index 3d4bc1f..bcda2ea 100644 --- a/examples/10-rebalancing-tokens/manifest.yaml +++ b/examples/10-rebalancing-tokens/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Rebalance to USD target ratios (3 tokens) -description: Automated task that rebalances a 3-token portfolio to target basis-point weights using USD valuations and slippage-protected swaps +description: Automated function that rebalances a 3-token portfolio to target basis-point weights using USD valuations and slippage-protected swaps inputs: - chainId: uint32 - tokenA: address diff --git a/examples/10-rebalancing-tokens/src/task.ts b/examples/10-rebalancing-tokens/src/function.ts similarity index 100% rename from examples/10-rebalancing-tokens/src/task.ts rename to examples/10-rebalancing-tokens/src/function.ts diff --git a/examples/10-rebalancing-tokens/tests/task.spec.ts b/examples/10-rebalancing-tokens/tests/function.spec.ts similarity index 90% rename from examples/10-rebalancing-tokens/tests/task.spec.ts rename to examples/10-rebalancing-tokens/tests/function.spec.ts index d492d90..b29906b 100644 --- a/examples/10-rebalancing-tokens/tests/task.spec.ts +++ b/examples/10-rebalancing-tokens/tests/function.spec.ts @@ -1,5 +1,5 @@ import { Chains, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { EvmCallQueryMock, runTask, Swap } from '@mimicprotocol/test-ts' +import { EvmCallQueryMock, runFunction, Swap } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = Chains.Optimism @@ -81,9 +81,9 @@ describe('Task', () => { describe('when there are some balances', () => { // Prices: BTC=$60k, ETH=$3k, DAI=$1 — all with 1e18 USD precision const prices = [ - { request: { token: WBTC, chainId }, response: ['60000000000000000000000'] }, // 60000 * 1e18 - { request: { token: WETH, chainId }, response: ['3000000000000000000000'] }, // 3000 * 1e18 - { request: { token: DAI, chainId }, response: ['1000000000000000000'] }, // 1 * 1e18 + { request: { token: { address: WBTC, chainId } }, response: ['60000000000000000000000'] }, // 60000 * 1e18 + { request: { token: { address: WETH, chainId } }, response: ['3000000000000000000000'] }, // 3000 * 1e18 + { request: { token: { address: DAI, chainId } }, response: ['1000000000000000000'] }, // 1 * 1e18 ] describe('when rebalancing is needed (ETH surplus → BTC & DAI deficits)', () => { @@ -103,7 +103,7 @@ describe('Task', () => { ) it('emits two swap intents with correct legs and slippage protections', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs, calls, prices }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -162,7 +162,7 @@ describe('Task', () => { ) it('does not produce any intents', async () => { - const result = await runTask(taskDir, context, { inputs: inputs, calls, prices }) + const result = await runFunction(functionDir, context, { inputs: inputs, calls, prices }) expect(result.success).to.be.true expect(result.intents).to.be.empty @@ -176,7 +176,7 @@ describe('Task', () => { const calls = buildErc20Calls('0', '0', '0') it('does not produce any intents', async () => { - const result = await runTask(taskDir, context, { inputs: inputs, calls: calls, prices: [] }) + const result = await runFunction(functionDir, context, { inputs: inputs, calls: calls, prices: [] }) expect(result.success).to.be.true expect(result.intents).to.be.empty diff --git a/examples/11-automated-refunds/.env.sample b/examples/11-automated-refunds/.env.sample index fa1daaa..162a1a0 100644 --- a/examples/11-automated-refunds/.env.sample +++ b/examples/11-automated-refunds/.env.sample @@ -1,2 +1,2 @@ PRIVATE_KEY= -TASK_CID= +FUNCTION_CID= diff --git a/examples/11-automated-refunds/package.json b/examples/11-automated-refunds/package.json index d211232..8df8df4 100644 --- a/examples/11-automated-refunds/package.json +++ b/examples/11-automated-refunds/package.json @@ -9,7 +9,7 @@ "codegen": "mimic codegen", "compile": "mimic compile", "test": "mimic test", - "create-config": "tsc -p tsconfig.create-config.json && tsx src/create-config.ts", + "create-trigger": "tsc -p tsconfig.create-trigger.json && tsx src/create-trigger.ts", "lint": "eslint ." }, "dependencies": { diff --git a/examples/11-automated-refunds/src/create-config.ts b/examples/11-automated-refunds/src/create-trigger.ts similarity index 65% rename from examples/11-automated-refunds/src/create-config.ts rename to examples/11-automated-refunds/src/create-trigger.ts index 45a718e..2313f97 100644 --- a/examples/11-automated-refunds/src/create-config.ts +++ b/examples/11-automated-refunds/src/create-trigger.ts @@ -2,7 +2,6 @@ import { config } from 'dotenv' config() import { Client, EthersSigner, getNextCronDate, HOUR, randomEvmAddress, Sort, TriggerType } from '@mimicprotocol/sdk' -import { Wallet } from 'ethers' import { inc } from 'semver' /* eslint-disable @typescript-eslint/explicit-function-return-type */ @@ -13,15 +12,15 @@ async function main() { const signer = EthersSigner.fromPrivateKey(process.env.PRIVATE_KEY) const client = new Client({ signer }) - // Get task manifest from deployed task - if (!process.env.TASK_CID) throw new Error('Missing TASK_CID in .env file') - const taskCid = process.env.TASK_CID - const manifest = await client.tasks.getManifest(taskCid) + // Get function manifest from deployed function + if (!process.env.FUNCTION_CID) throw new Error('Missing FUNCTION_CID in .env file') + const functionCid = process.env.FUNCTION_CID + const manifest = await client.functions.getManifest(functionCid) - // Increment config version - const latestConfig = await client.configs.get({ taskCid, sort: Sort.desc, limit: 1 }) - const version = latestConfig.length ? inc(latestConfig[0].version, 'patch') : '0.0.1' - if (!version) throw new Error('Invalid config version') + // Increment trigger version + const latestTrigger = await client.triggers.get({ functionCid, sort: Sort.desc, limit: 1 }) + const version = latestTrigger.length ? inc(latestTrigger[0].version, 'patch') : '0.0.1' + if (!version) throw new Error('Invalid trigger version') // Get inputs and calculate trigger values const { chainId, token, amount, recipient, maxFee } = getRefundData() @@ -29,13 +28,13 @@ async function main() { const deltaMs = HOUR * 1000 const endDate = getNextCronDate(schedule).getTime() + deltaMs + 1 // 1 AM UTC - // Submit the signed task config to Mimic Protocol for one-time execution - await client.configs.signAndCreate({ + // Submit the signed function trigger to Mimic Protocol for one-time execution + await client.triggers.signAndCreate({ description: `Refund execution - ${Date.now()}`, - taskCid, + functionCid, version, manifest, - trigger: { + config: { type: TriggerType.Cron, schedule, delta: '1h', @@ -44,7 +43,6 @@ async function main() { input: { chainId, token, amount, recipient, maxFee }, executionFeeLimit: '0', minValidations: 1, - signer: new Wallet(process.env.PRIVATE_KEY).address, }) } diff --git a/examples/11-automated-refunds/src/task.ts b/examples/11-automated-refunds/src/function.ts similarity index 100% rename from examples/11-automated-refunds/src/task.ts rename to examples/11-automated-refunds/src/function.ts diff --git a/examples/11-automated-refunds/tests/task.spec.ts b/examples/11-automated-refunds/tests/function.spec.ts similarity index 90% rename from examples/11-automated-refunds/tests/task.spec.ts rename to examples/11-automated-refunds/tests/function.spec.ts index 1ef8107..c387f5a 100644 --- a/examples/11-automated-refunds/tests/task.spec.ts +++ b/examples/11-automated-refunds/tests/function.spec.ts @@ -1,5 +1,5 @@ import { Chains, fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, Transfer } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, Transfer } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = Chains.Arbitrum @@ -38,7 +38,7 @@ describe('Task', () => { ] it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/11-automated-refunds/tsconfig.create-config.json b/examples/11-automated-refunds/tsconfig.create-trigger.json similarity index 92% rename from examples/11-automated-refunds/tsconfig.create-config.json rename to examples/11-automated-refunds/tsconfig.create-trigger.json index 5e834b9..5c59156 100644 --- a/examples/11-automated-refunds/tsconfig.create-config.json +++ b/examples/11-automated-refunds/tsconfig.create-trigger.json @@ -13,6 +13,6 @@ "skipLibCheck": true }, "include": [ - "src/create-config.ts" + "src/create-trigger.ts" ] } diff --git a/examples/12-dollar-cost-averaging/manifest.yaml b/examples/12-dollar-cost-averaging/manifest.yaml index 8b56dc4..112f658 100644 --- a/examples/12-dollar-cost-averaging/manifest.yaml +++ b/examples/12-dollar-cost-averaging/manifest.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: DCA -description: Dollar-cost averaging task that swaps tokenIn to tokenOut +description: Dollar-cost averaging function that swaps tokenIn to tokenOut inputs: - chainId: uint32 - tokenIn: address diff --git a/examples/12-dollar-cost-averaging/src/task.ts b/examples/12-dollar-cost-averaging/src/function.ts similarity index 100% rename from examples/12-dollar-cost-averaging/src/task.ts rename to examples/12-dollar-cost-averaging/src/function.ts diff --git a/examples/12-dollar-cost-averaging/tests/task.spec.ts b/examples/12-dollar-cost-averaging/tests/function.spec.ts similarity index 89% rename from examples/12-dollar-cost-averaging/tests/task.spec.ts rename to examples/12-dollar-cost-averaging/tests/function.spec.ts index edd4566..a14c272 100644 --- a/examples/12-dollar-cost-averaging/tests/task.spec.ts +++ b/examples/12-dollar-cost-averaging/tests/function.spec.ts @@ -1,5 +1,5 @@ import { Chains, fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, runTask, Swap, TokenPriceQueryMock } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, runFunction, Swap, TokenPriceQueryMock } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { Interface } from 'ethers' @@ -7,8 +7,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = Chains.Base const USDC = randomEvmAddress() @@ -31,11 +31,11 @@ describe('Task', () => { const prices: TokenPriceQueryMock[] = [ { - request: { token: USDC, chainId }, + request: { token: { address: USDC, chainId } }, response: [fp(1).toString()], // 1 USDC = 1 USD }, { - request: { token: WETH, chainId }, + request: { token: { address: WETH, chainId } }, response: [fp(4200).toString()], // 1 WETH = 4200 USD }, ] @@ -62,7 +62,7 @@ describe('Task', () => { ] it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, prices, calls }) + const result = await runFunction(functionDir, context, { inputs, prices, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/13-bridge-and-invest-aave/manifest.bridge.yaml b/examples/13-bridge-and-invest-aave/manifest.bridge.yaml index d6d6ee3..04d4bde 100644 --- a/examples/13-bridge-and-invest-aave/manifest.bridge.yaml +++ b/examples/13-bridge-and-invest-aave/manifest.bridge.yaml @@ -1,6 +1,6 @@ version: 1.0.0 name: Bridge USDC and emit an event -description: Bridge USDC between Arbitrum, Base and Optimism, and emit a custom event to trigger another task +description: Bridge USDC between Arbitrum, Base and Optimism, and emit a custom event to trigger another function inputs: - sourceChain: uint32 - destinationChain: uint32 diff --git a/examples/13-bridge-and-invest-aave/package.json b/examples/13-bridge-and-invest-aave/package.json index 7c5123c..e5294f0 100644 --- a/examples/13-bridge-and-invest-aave/package.json +++ b/examples/13-bridge-and-invest-aave/package.json @@ -10,12 +10,12 @@ "codegen:bridge": "yarn mimic codegen -m manifest.bridge.yaml -o ./src/types/bridge", "codegen:invest": "yarn mimic codegen -m manifest.invest.yaml -o ./src/types/invest", "compile": "yarn compile:bridge && yarn compile:invest", - "compile:bridge": "mimic compile -t src/bridge.ts -m manifest.bridge.yaml -o ./build/bridge", - "compile:invest": "mimic compile -t src/invest.ts -m manifest.invest.yaml -o ./build/invest", + "compile:bridge": "mimic compile -f src/bridge.ts -m manifest.bridge.yaml -o ./build/bridge", + "compile:invest": "mimic compile -f src/invest.ts -m manifest.invest.yaml -o ./build/invest", "deploy:bridge": "yarn codegen:bridge && yarn compile:bridge && mimic deploy --input ./build/bridge --output ./build/bridge --skip-compile", "deploy:invest": "yarn codegen:invest && yarn compile:invest && mimic deploy --input ./build/invest --output ./build/invest --skip-compile", "test": "yarn build && mimic test --skip-compile", - "create-config:invest": "tsc -p tsconfig.create-config.json && tsx src/create-config.invest.ts", + "create-trigger:invest": "tsc -p tsconfig.create-trigger.json && tsx src/create-trigger.invest.ts", "lint": "eslint ." }, "dependencies": { diff --git a/examples/13-bridge-and-invest-aave/src/create-config.invest.ts b/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts similarity index 70% rename from examples/13-bridge-and-invest-aave/src/create-config.invest.ts rename to examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts index c8ee3bd..98d1901 100644 --- a/examples/13-bridge-and-invest-aave/src/create-config.invest.ts +++ b/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts @@ -2,7 +2,7 @@ import { config } from 'dotenv' config() import { Chains, Client, EthersSigner, Sort, TriggerType } from '@mimicprotocol/sdk' -import { AbiCoder, Interface, keccak256, toUtf8Bytes, Wallet } from 'ethers' +import { AbiCoder, Interface, keccak256, toUtf8Bytes } from 'ethers' import { inc } from 'semver' import SettlerAbi from './abis/Settler.json' @@ -29,31 +29,31 @@ async function main(): Promise { const signer = EthersSigner.fromPrivateKey(PRIVATE_KEY) const client = new Client({ signer }) - // Get task manifest from deployed task - const manifest = await client.tasks.getManifest(INVEST_CID) + // Get function manifest from deployed function + const manifest = await client.functions.getManifest(INVEST_CID) // Set user topic to filter events const USER_TOPIC = AbiCoder.defaultAbiCoder().encode(['address'], [SMART_ACCOUNT]) - // Increment config version - const latestConfig = await client.configs.get({ taskCid: INVEST_CID, sort: Sort.desc, limit: 1 }) - const version = latestConfig.length > 0 ? inc(latestConfig[0].version.split('-')[0], 'patch') : '0.0.1' - if (!version) throw new Error('Invalid config version') + // Increment trigger version + const latestTrigger = await client.triggers.get({ functionCid: INVEST_CID, sort: Sort.desc, limit: 1 }) + const version = latestTrigger.length > 0 ? inc(latestTrigger[0].version.split('-')[0], 'patch') : '0.0.1' + if (!version) throw new Error('Invalid trigger version') // Set trigger based on a blockchain event - const trigger = { - type: TriggerType.Event as const, + const config = { + type: TriggerType.Event, contract: MIMIC_PROTOCOL_SETTLER, topics: [ [INTENT_EXECUTED_TOPIC], // The event emitted by the Settler - [USER_TOPIC], // Important: To prevent other users from triggering this task - [BRIDGED_TOPIC], // Emitted by the bridge task + [USER_TOPIC], // Important: To prevent other users from triggering this function + [BRIDGED_TOPIC], // Emitted by the bridge function ], delta: '1h', endDate: 0, // No end date } - // Submit one task config per chain + // Submit one function trigger per chain const chainIds = [Chains.Arbitrum, Chains.Base, Chains.Optimism] for (const chainId of chainIds) { const input = { @@ -63,18 +63,17 @@ async function main(): Promise { maxFee: '0.3', } - const config = await client.configs.signAndCreate({ + const trigger = await client.triggers.signAndCreate({ description: `Invest bridged amount in Aave (${chainId})`, - taskCid: INVEST_CID, + functionCid: INVEST_CID, version: `${version}-${chainId}`, manifest, - trigger: { ...trigger, chainId }, + config: { ...config, chainId }, input, executionFeeLimit: '0', minValidations: 1, - signer: new Wallet(PRIVATE_KEY).address, }) - console.log(`Created config on chain ${chainId}: ${config.sig}`) + console.log(`Created config on chain ${chainId}: ${trigger.sig}`) } } diff --git a/examples/13-bridge-and-invest-aave/src/invest.ts b/examples/13-bridge-and-invest-aave/src/invest.ts index d91ed49..0abcdbb 100644 --- a/examples/13-bridge-and-invest-aave/src/invest.ts +++ b/examples/13-bridge-and-invest-aave/src/invest.ts @@ -23,14 +23,14 @@ export default function main(): void { const aaveV3Pool = getAaveV3Pool(chainId) - const trigger = environment.getContext().trigger + const trigger = environment.getContext().triggerPayload if (trigger.type != TriggerType.EVENT) throw new Error('Trigger not event') const triggerData = trigger.getEventData() const event = IntentExecutedEvent.decode(triggerData.topics, triggerData.eventData) if (event.intent.user != smartAccount) throw new Error('Intent user not smart account') - // Get the token and the amount from the event emitted by the task that triggered this one + // Get the token and the amount from the event emitted by the function that triggered this one const tokenStr = evm.decode(new EvmDecodeParam('address', event.data.toHexString())) const token = Address.fromString(tokenStr) diff --git a/examples/13-bridge-and-invest-aave/tests/bridge.spec.ts b/examples/13-bridge-and-invest-aave/tests/bridge.spec.ts index 2db4edb..75fe94e 100644 --- a/examples/13-bridge-and-invest-aave/tests/bridge.spec.ts +++ b/examples/13-bridge-and-invest-aave/tests/bridge.spec.ts @@ -1,5 +1,5 @@ import { Chains, fp, OpType, randomEvmAddress } from '@mimicprotocol/sdk' -import { Context, EvmCallQueryMock, Inputs, runTask, Swap } from '@mimicprotocol/test-ts' +import { Context, EvmCallQueryMock, Inputs, runFunction, Swap } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { AbiCoder, Interface, keccak256, toUtf8Bytes } from 'ethers' @@ -8,7 +8,7 @@ import ERC20Abi from '../src/abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) describe('Bridge', () => { - const taskDir = './build/bridge' + const functionDir = './build/bridge' const sourceChain = Chains.Arbitrum const destinationChain = Chains.Optimism @@ -61,7 +61,7 @@ describe('Bridge', () => { const itThrowsAnError = (inputs: Inputs, error: string): void => { it('throws an error', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.false expect(result.intents).to.have.lengthOf(0) @@ -73,7 +73,7 @@ describe('Bridge', () => { describe('when the chains are supported', () => { describe('when the chains are different', () => { it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) diff --git a/examples/13-bridge-and-invest-aave/tests/invest.spec.ts b/examples/13-bridge-and-invest-aave/tests/invest.spec.ts index 91c98cd..3e2368a 100644 --- a/examples/13-bridge-and-invest-aave/tests/invest.spec.ts +++ b/examples/13-bridge-and-invest-aave/tests/invest.spec.ts @@ -8,7 +8,7 @@ import { randomSig, TriggerType, } from '@mimicprotocol/sdk' -import { Call, Context, EvmCallQueryMock, Inputs, runTask } from '@mimicprotocol/test-ts' +import { Call, Context, EvmCallQueryMock, Inputs, runFunction } from '@mimicprotocol/test-ts' import { expect } from 'chai' import { AbiCoder, Interface } from 'ethers' @@ -21,7 +21,7 @@ const ERC20Interface = new Interface(ERC20Abi) const SettlerInterface = new Interface(SettlerAbi) describe('Invest', () => { - const taskDir = './build/invest' + const functionDir = './build/invest' const chainId = Chains.Optimism const aavePool = '0x794a61358d6845594f94dc1db02a252b5b4814ad' @@ -34,7 +34,7 @@ describe('Invest', () => { const encodedAmounts = AbiCoder.defaultAbiCoder().encode(['uint256[]'], [[amount]]) const encodedToken = AbiCoder.defaultAbiCoder().encode(['address'], [USDC]) const encodedEvent = encodeEvent(smartAccount, encodedAmounts, encodedToken) - const trigger = { + const triggerPayload = { type: TriggerType.Event, data: encodeEventExecution({ address: settler, @@ -50,7 +50,7 @@ describe('Invest', () => { user: randomEvmAddress(), settlers: [{ address: settler, chainId }], timestamp: Date.now(), - trigger, + triggerPayload, } const inputs = { @@ -73,7 +73,7 @@ describe('Invest', () => { const itThrowsAnError = (context: Context, inputs: Inputs, error: string): void => { it('throws an error', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.false expect(result.intents).to.have.lengthOf(0) @@ -86,7 +86,7 @@ describe('Invest', () => { describe('when the trigger is event', () => { describe('when the event user is the smart account', () => { it('produces the expected intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls }) + const result = await runFunction(functionDir, context, { inputs, calls }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -128,8 +128,8 @@ describe('Invest', () => { }) }) - describe('when the trigger is not event', () => { - const cronContext = { ...context, trigger: { ...trigger, type: TriggerType.Cron } } + describe('when the triggerPayload is not event', () => { + const cronContext = { ...context, triggerPayload: { ...triggerPayload, type: TriggerType.Cron } } itThrowsAnError(cronContext, inputs, 'Trigger not event') }) @@ -154,7 +154,7 @@ export function encodeEvent(user: string, output: string, data: string): { topic '0x', // data [], // maxFees [], // events - randomSig(), // configSig + randomSig(), // triggerSig 0, // minValidations [], // validations ] diff --git a/examples/13-bridge-and-invest-aave/tsconfig.create-config.json b/examples/13-bridge-and-invest-aave/tsconfig.create-trigger.json similarity index 91% rename from examples/13-bridge-and-invest-aave/tsconfig.create-config.json rename to examples/13-bridge-and-invest-aave/tsconfig.create-trigger.json index 2500074..baa26ab 100644 --- a/examples/13-bridge-and-invest-aave/tsconfig.create-config.json +++ b/examples/13-bridge-and-invest-aave/tsconfig.create-trigger.json @@ -15,6 +15,6 @@ "emitDecoratorMetadata": true }, "include": [ - "src/create-config.invest.ts" + "src/create-trigger.invest.ts" ] } diff --git a/examples/14-fee-collection/manifest.yaml b/examples/14-fee-collection/manifest.yaml index 5b36759..35b92e9 100644 --- a/examples/14-fee-collection/manifest.yaml +++ b/examples/14-fee-collection/manifest.yaml @@ -1,5 +1,5 @@ version: 1.0.0 -name: Collect Task +name: Collect Function description: Swaps all user tokens for USDC and sends the USDC to a recipient inputs: - chainId: int32 diff --git a/examples/14-fee-collection/src/task.ts b/examples/14-fee-collection/src/function.ts similarity index 100% rename from examples/14-fee-collection/src/task.ts rename to examples/14-fee-collection/src/function.ts diff --git a/examples/14-fee-collection/tests/task.spec.ts b/examples/14-fee-collection/tests/function.spec.ts similarity index 90% rename from examples/14-fee-collection/tests/task.spec.ts rename to examples/14-fee-collection/tests/function.spec.ts index 920e114..fc3de7a 100644 --- a/examples/14-fee-collection/tests/task.spec.ts +++ b/examples/14-fee-collection/tests/function.spec.ts @@ -3,7 +3,7 @@ import { Context, EvmCallQueryMock, RelevantTokensQueryMock, - runTask, + runFunction, Swap, TokenPriceQueryMock, } from '@mimicprotocol/test-ts' @@ -14,8 +14,8 @@ import ERC20Abi from '../abis/ERC20.json' const ERC20Interface = new Interface(ERC20Abi) -describe('Task', () => { - const taskDir = './build' +describe('Function', () => { + const functionDir = './build' const chainId = Chains.Base const USDC = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' @@ -35,9 +35,9 @@ describe('Task', () => { } const prices: TokenPriceQueryMock[] = [ - { request: { token: USDC, chainId }, response: [fp(1).toString()] }, // 1 USDC = 1 USD - { request: { token: WETH, chainId }, response: [fp(50).toString()] }, // 1 WETH = 50 USD - { request: { token: WBTC, chainId }, response: [fp(100).toString()] }, // 1 WBTC = 100 USD + { request: { token: { address: USDC, chainId } }, response: [fp(1).toString()] }, // 1 USDC = 1 USD + { request: { token: { address: WETH, chainId } }, response: [fp(50).toString()] }, // 1 WETH = 50 USD + { request: { token: { address: WBTC, chainId } }, response: [fp(100).toString()] }, // 1 WBTC = 100 USD ] const calls: EvmCallQueryMock[] = [ @@ -93,7 +93,7 @@ describe('Task', () => { ] it('produces the expected intents for multiple tokens', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices, relevantTokens }) + const result = await runFunction(functionDir, context, { inputs, calls, prices, relevantTokens }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) @@ -153,7 +153,7 @@ describe('Task', () => { ] it('does not produce any intents', async () => { - const result = await runTask(taskDir, context, { inputs, calls, prices, relevantTokens }) + const result = await runFunction(functionDir, context, { inputs, calls, prices, relevantTokens }) expect(result.success).to.be.true expect(result.timestamp).to.be.equal(context.timestamp) expect(result.intents).to.be.empty diff --git a/yarn.lock b/yarn.lock index 054420e..0534a00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8,9 +8,9 @@ integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== "@babel/runtime@^7.25.0": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.4.tgz#a70226016fabe25c5783b2f22d3e1c9bc5ca3326" - integrity sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.6.tgz#d267a43cb1836dc4d182cce93ae75ba954ef6d2b" + integrity sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA== "@esbuild/aix-ppc64@0.27.2": version "0.27.2" @@ -142,14 +142,14 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz#9e585ab6086bef994c6e8a5b3a0481219ada862b" integrity sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ== -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.7.0", "@eslint-community/eslint-utils@^4.8.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" - integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.8.0", "@eslint-community/eslint-utils@^4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": +"@eslint-community/regexpp@^4.12.1", "@eslint-community/regexpp@^4.12.2": version "4.12.2" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== @@ -391,9 +391,9 @@ integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== "@mimicprotocol/cli@latest": - version "0.0.1-rc.32" - resolved "https://registry.yarnpkg.com/@mimicprotocol/cli/-/cli-0.0.1-rc.32.tgz#d02174d9d79ff783844a88b145348190eaefec93" - integrity sha512-DM76e5311CMzjBuUUCaAZLrNLP08xcZeqftr+4vZgRWNajQ6Gbu3KehG8Kxa1tPpBUwLI7F247PFPFJtvqayFQ== + version "0.0.1-rc.36" + resolved "https://registry.yarnpkg.com/@mimicprotocol/cli/-/cli-0.0.1-rc.36.tgz#a576cfc7cced2038eb44816d8150a3e83971eaec" + integrity sha512-n00mNVjfx6GKKpz+UqDkz6NEywQVNOo64Q7Pz/rzAlPySrR867ZvShzEkl67D28PEoxlBs4v5JOkrSbIt3b75Q== dependencies: "@inquirer/prompts" "^7.2.4" "@oclif/core" "^4.2.2" @@ -408,67 +408,67 @@ zod "^3.24.1" "@mimicprotocol/lib-ts@latest": - version "0.0.1-rc.32" - resolved "https://registry.yarnpkg.com/@mimicprotocol/lib-ts/-/lib-ts-0.0.1-rc.32.tgz#735d9c71e02c63fdd1f5375ce2292bdff88f5561" - integrity sha512-0VhEvrDBFz+V12kuPSxjfDjF+rlCWcWb3QSphgzI8Gu6bGkf9jHtM24rcUFcGKg11r0lPp4Fw5qF4rs4iJ0gTg== + version "0.0.1-rc.36" + resolved "https://registry.yarnpkg.com/@mimicprotocol/lib-ts/-/lib-ts-0.0.1-rc.36.tgz#979b5937e4d0e7437dfcc9e11c91029d8959760e" + integrity sha512-MNRDVH0V8cSFnQ6lFaiY/LZpQD8WBt0ibGZ2m6hx2BzYfXL3owNXILIyhnB/bJ1qBpT3D91rUb/3gnG31KjhMg== dependencies: as-base58 "^0.1.1" eslint-config-mimic "^0.0.3" json-as "1.1.7" visitor-as "0.11.4" -"@mimicprotocol/runner-node-darwin-arm64@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-darwin-arm64/-/runner-node-darwin-arm64-0.0.1-rc.8.tgz#5a74fa1752b832bccead66663e29a37c13add6ff" - integrity sha512-1QbCXekUqC9j3L41r8kebO/oWfFAZMEzRCFmQ9hTSesLjrhz2hP/sbJt4Do4WBoZ/zpA8rDW+TtknxbUtFrnDA== - -"@mimicprotocol/runner-node-darwin-x64@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-darwin-x64/-/runner-node-darwin-x64-0.0.1-rc.8.tgz#c5f5d303c46c03fe96bc462f98fcce3298907b88" - integrity sha512-hEpJ/T8xBprQfruy5lNV57uAJT+zonTtVh4kIpLpVQatgtcpEYnD7dZlf77zgtNid3BVIHL6akhrFwf1GJkCKg== - -"@mimicprotocol/runner-node-linux-arm64-gnu@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-arm64-gnu/-/runner-node-linux-arm64-gnu-0.0.1-rc.8.tgz#ef96c65dec77aece85edff902b05c3da46d37fab" - integrity sha512-aM5hzAgeiBXc7e6/BpCPucCdIr4OGiArNDKyKPCi36iYLQ/tGlXY5tHwQ8ByhsUvCP/O0kz+iEGbauOv/zDvtw== - -"@mimicprotocol/runner-node-linux-x64-gnu@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-x64-gnu/-/runner-node-linux-x64-gnu-0.0.1-rc.8.tgz#407393449703c7e9251e43b984c95ccfa47db1cd" - integrity sha512-caxiD1IXl2qfhNUzu3H5I8KQMQy7yggeZsRrmZlVMVl2TWvRdClgNiXRWchai/B0Orkchoy/8uNw1RsHmiPQtA== - -"@mimicprotocol/runner-node-linux-x64-musl@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-x64-musl/-/runner-node-linux-x64-musl-0.0.1-rc.8.tgz#f594ddd3330773394d7cedea31c0032382fc15e9" - integrity sha512-WLpFTOTD+0V7m5A6qCxwyfX4lXbYy2F0XjGpkfTPIfee+jRG7aQqCsvIp0NzBpI+neLLMu//SXgS5ADrpthXQQ== - -"@mimicprotocol/runner-node-win32-arm64-msvc@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-win32-arm64-msvc/-/runner-node-win32-arm64-msvc-0.0.1-rc.8.tgz#61e41cf9bfe5d7eda69d6934982440a0a26c8cfd" - integrity sha512-bwshHY0PgmXMtOIEtex8UYobR8Nq+tkROItyxFwNvqvqzgL2cvewyZ1QJl6+B5YcocI7kog4URnRMsdF+oLD4Q== - -"@mimicprotocol/runner-node-win32-x64-msvc@0.0.1-rc.8": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-win32-x64-msvc/-/runner-node-win32-x64-msvc-0.0.1-rc.8.tgz#86ae0d6716aa1d4a31adf65d4a44e94fda324fb0" - integrity sha512-DkF2drc7uHq84L70B6FU/X8BkBuj4zDluvGRzFJ94IWNL4zBkaJqrpKqL88tHANt+v1dzyQvJ10s1y9DVDGFvA== - -"@mimicprotocol/runner-node@^0.0.1-rc.7": - version "0.0.1-rc.8" - resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node/-/runner-node-0.0.1-rc.8.tgz#47c0f132763de7a676c0908789cbe608dbea4b74" - integrity sha512-RcUCShbh1+JSXyAFbb27g4y/NE0r7+7nxHGjeFk/U0qyiTFAZpiN2c7HBBVituE1gmilC8jQ3lzEJ7lcF5srOw== +"@mimicprotocol/runner-node-darwin-arm64@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-darwin-arm64/-/runner-node-darwin-arm64-0.0.1-rc.14.tgz#5eebff6872b02496bc88e9bdc4aff93d7304ac94" + integrity sha512-puFuzPwfMWNX6IHWU6O6oI240vJJBfhaQHv/A/TVg4sz/PSCKlGDw01CPJphnYg94EXBZbVmZvRFqRHpur3XhA== + +"@mimicprotocol/runner-node-darwin-x64@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-darwin-x64/-/runner-node-darwin-x64-0.0.1-rc.14.tgz#532e1d3ac8cedc4a281c68facbc184f977a2347a" + integrity sha512-Lzt6ASRAUPXoaE7nBK4OlK3QO1l/2plwbPi8nVohuJaABXOiBwIfokntZR3qgHWTExTJ98TuxoGlpOCreSYkrw== + +"@mimicprotocol/runner-node-linux-arm64-gnu@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-arm64-gnu/-/runner-node-linux-arm64-gnu-0.0.1-rc.14.tgz#e7abc5e190bd3dbb0bc8c3851636229b11bd4cb8" + integrity sha512-Tg7uO6PW20rdPaCFDSL4WaCEQ+KIaw7uhma9bW+7UYfZPvTTl+nTuB6iI2phufjGCUMKVXVPBoCtSV8YHf/12w== + +"@mimicprotocol/runner-node-linux-x64-gnu@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-x64-gnu/-/runner-node-linux-x64-gnu-0.0.1-rc.14.tgz#76c352c59b5b6ca470bfdd10a0fff675492b2741" + integrity sha512-d/0yRvkp++ay6A78Rg8s+Cecnn16zbglJjNCzN05kVMhPFmjCv/teEAVI//FmnbpEhI5WppnZ+vxFTdY+bHCKA== + +"@mimicprotocol/runner-node-linux-x64-musl@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-linux-x64-musl/-/runner-node-linux-x64-musl-0.0.1-rc.14.tgz#04cc31477d90842f3ca37a30f135822301160dbe" + integrity sha512-S+n+bwURJ9X253lxFduYZIsfZ6EWSTM2OSohqAPqh1OQPJ+Ei5r4AWyIwVBC30kFh80opm+GShWAZIeywUs9jw== + +"@mimicprotocol/runner-node-win32-arm64-msvc@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-win32-arm64-msvc/-/runner-node-win32-arm64-msvc-0.0.1-rc.14.tgz#f7c3f9491cf08ec42085b1305ecb339e6a927156" + integrity sha512-hlmvF7y7yj7RliqTGYEyMfhzfZH2PCFeRe6fapd4WrcHwJaVlz9Lu/MwTMf4e5gIAw/7qXjD2TwmJN0p+qP0SQ== + +"@mimicprotocol/runner-node-win32-x64-msvc@0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node-win32-x64-msvc/-/runner-node-win32-x64-msvc-0.0.1-rc.14.tgz#7ec62e93160dddf7a353a16abbc8c9ed8e41665a" + integrity sha512-7ZO6t8LuGW3swOXE5vNapIu5gZWIxTvu+Dpjz7Nuwp8Fhnihc8GH5wEFubVtrU+8B5qIHD297Ei6ISs5bc1UKg== + +"@mimicprotocol/runner-node@^0.0.1-rc.14": + version "0.0.1-rc.14" + resolved "https://registry.yarnpkg.com/@mimicprotocol/runner-node/-/runner-node-0.0.1-rc.14.tgz#4250e374db3717acd6578feb90716cf8301a2925" + integrity sha512-OyEayVUi26ZUj+9noLNG1nhrUb2ibr6JESzP/ZAVQIMwOorW+nQvK64CKFgCmtqB8xWYnqZPpcAYjn+HuL4r4Q== optionalDependencies: - "@mimicprotocol/runner-node-darwin-arm64" "0.0.1-rc.8" - "@mimicprotocol/runner-node-darwin-x64" "0.0.1-rc.8" - "@mimicprotocol/runner-node-linux-arm64-gnu" "0.0.1-rc.8" - "@mimicprotocol/runner-node-linux-x64-gnu" "0.0.1-rc.8" - "@mimicprotocol/runner-node-linux-x64-musl" "0.0.1-rc.8" - "@mimicprotocol/runner-node-win32-arm64-msvc" "0.0.1-rc.8" - "@mimicprotocol/runner-node-win32-x64-msvc" "0.0.1-rc.8" - -"@mimicprotocol/sdk@^0.0.1-rc.16", "@mimicprotocol/sdk@latest": - version "0.0.1-rc.26" - resolved "https://registry.yarnpkg.com/@mimicprotocol/sdk/-/sdk-0.0.1-rc.26.tgz#71e2d0478fac6b45a4f5a5e9ba72322d08f5290f" - integrity sha512-/4FCZ12InZbQ3esAs6lwwTN+oxSgfBoEAYbp4xfamQdZAJDRpDsbxcTXsnRdoFmhs5khK99s8RdfSaKBK3IsOg== + "@mimicprotocol/runner-node-darwin-arm64" "0.0.1-rc.14" + "@mimicprotocol/runner-node-darwin-x64" "0.0.1-rc.14" + "@mimicprotocol/runner-node-linux-arm64-gnu" "0.0.1-rc.14" + "@mimicprotocol/runner-node-linux-x64-gnu" "0.0.1-rc.14" + "@mimicprotocol/runner-node-linux-x64-musl" "0.0.1-rc.14" + "@mimicprotocol/runner-node-win32-arm64-msvc" "0.0.1-rc.14" + "@mimicprotocol/runner-node-win32-x64-msvc" "0.0.1-rc.14" + +"@mimicprotocol/sdk@^0.0.1-rc.33", "@mimicprotocol/sdk@latest": + version "0.0.1-rc.33" + resolved "https://registry.yarnpkg.com/@mimicprotocol/sdk/-/sdk-0.0.1-rc.33.tgz#ef48a118b9a5c052c05f34147c5d00ad29d80529" + integrity sha512-CgVTt8nwWvNI1G0MmsTwdCYwm82QYnqOHWTmOldyCf29gZWvfFQ8GXuXXm5vmQV8EYOj72bVGNPNJreT8e5M/g== dependencies: "@solana/web3.js" "^1.98.4" borsh "^2.0.0" @@ -477,12 +477,12 @@ zod "^3.23.8" "@mimicprotocol/test-ts@latest": - version "0.0.1-rc.29" - resolved "https://registry.yarnpkg.com/@mimicprotocol/test-ts/-/test-ts-0.0.1-rc.29.tgz#c15d0856573d4d00544600d41fb736cde81ba67c" - integrity sha512-WfUI3znVUq5s0UuKoSvbCow2XGqPym+FtvpoXpkK7UUCLp11dEhqlnskuQv+S0iYBXO2NiBK20pkGY+5Ir6i9Q== + version "0.0.1-rc.36" + resolved "https://registry.yarnpkg.com/@mimicprotocol/test-ts/-/test-ts-0.0.1-rc.36.tgz#04349f7714da83a62a29ce0e3de0621ade6a0188" + integrity sha512-crYngeKr7ia6v2FiH7LPLElsppJraxd4B2PdrXORB9k9mHSqC+bf3Z0nSaZZUy7ntLnRr77DyOweHhN7qQh1VQ== dependencies: - "@mimicprotocol/runner-node" "^0.0.1-rc.7" - "@mimicprotocol/sdk" "^0.0.1-rc.16" + "@mimicprotocol/runner-node" "^0.0.1-rc.14" + "@mimicprotocol/sdk" "^0.0.1-rc.33" ethers "^6.15.0" zod "^3.24.1" @@ -556,9 +556,9 @@ wrap-ansi "^7.0.0" "@oclif/plugin-not-found@^3.2.38": - version "3.2.73" - resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-3.2.73.tgz#16182e44b3e058972e6c2e380c66a5c9432f15bf" - integrity sha512-2bQieTGI9XNFe9hKmXQjJmHV5rZw+yn7Rud1+C5uLEo8GaT89KZbiLTJgL35tGILahy/cB6+WAs812wjw7TK6w== + version "3.2.74" + resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-3.2.74.tgz#04ba56f036b3b416d626b25f62d5d712331c652f" + integrity sha512-6RD/EuIUGxAYR45nMQg+nw+PqwCXUxkR6Eyn+1fvbVjtb9d+60OPwB77LCRUI4zKNI+n0LOFaMniEdSpb+A7kQ== dependencies: "@inquirer/prompts" "^7.10.1" "@oclif/core" "^4.8.0" @@ -627,9 +627,9 @@ superstruct "^2.0.2" "@swc/helpers@^0.5.11": - version "0.5.17" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.17.tgz#5a7be95ac0f0bf186e7e6e890e7a6f6cda6ce971" - integrity sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A== + version "0.5.18" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.18.tgz#feeeabea0d10106ee25aaf900165df911ab6d3b1" + integrity sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ== dependencies: tslib "^2.8.0" @@ -674,9 +674,9 @@ integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== "@types/node@*": - version "25.0.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.3.tgz#79b9ac8318f373fbfaaf6e2784893efa9701f269" - integrity sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA== + version "25.1.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.1.0.tgz#95cc584f1f478301efc86de4f1867e5875e83571" + integrity sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA== dependencies: undici-types "~7.16.0" @@ -693,9 +693,9 @@ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/node@^22.10.5": - version "22.19.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.19.3.tgz#8dfde7630d7a8528dc9b34db23d34f764467c02c" - integrity sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA== + version "22.19.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.19.7.tgz#434094ee1731ae76c16083008590a5835a8c39c1" + integrity sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw== dependencies: undici-types "~6.21.0" @@ -724,18 +724,18 @@ "@types/node" "*" "@typescript-eslint/eslint-plugin@^8.6.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.50.0.tgz#a6ce899690542e2affa9543306d2d3935740abb7" - integrity sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg== - dependencies: - "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.50.0" - "@typescript-eslint/type-utils" "8.50.0" - "@typescript-eslint/utils" "8.50.0" - "@typescript-eslint/visitor-keys" "8.50.0" - ignore "^7.0.0" + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.54.0.tgz#d8899e5c2eccf5c4a20d01c036a193753748454d" + integrity sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ== + dependencies: + "@eslint-community/regexpp" "^4.12.2" + "@typescript-eslint/scope-manager" "8.54.0" + "@typescript-eslint/type-utils" "8.54.0" + "@typescript-eslint/utils" "8.54.0" + "@typescript-eslint/visitor-keys" "8.54.0" + ignore "^7.0.5" natural-compare "^1.4.0" - ts-api-utils "^2.1.0" + ts-api-utils "^2.4.0" "@typescript-eslint/experimental-utils@^5.62.0": version "5.62.0" @@ -745,24 +745,24 @@ "@typescript-eslint/utils" "5.62.0" "@typescript-eslint/parser@^8.6.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.50.0.tgz#c35b28f686dbe08e81b9d6208ebc08912549f4ba" - integrity sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q== - dependencies: - "@typescript-eslint/scope-manager" "8.50.0" - "@typescript-eslint/types" "8.50.0" - "@typescript-eslint/typescript-estree" "8.50.0" - "@typescript-eslint/visitor-keys" "8.50.0" - debug "^4.3.4" + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.54.0.tgz#3d01a6f54ed247deb9982621f70e7abf1810bd97" + integrity sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA== + dependencies: + "@typescript-eslint/scope-manager" "8.54.0" + "@typescript-eslint/types" "8.54.0" + "@typescript-eslint/typescript-estree" "8.54.0" + "@typescript-eslint/visitor-keys" "8.54.0" + debug "^4.4.3" -"@typescript-eslint/project-service@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.50.0.tgz#1422366b7cc11fef8c6d87770884e608093423a4" - integrity sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ== +"@typescript-eslint/project-service@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.54.0.tgz#f582aceb3d752544c8e1b11fea8d95d00cf9adc6" + integrity sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.50.0" - "@typescript-eslint/types" "^8.50.0" - debug "^4.3.4" + "@typescript-eslint/tsconfig-utils" "^8.54.0" + "@typescript-eslint/types" "^8.54.0" + debug "^4.4.3" "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" @@ -772,39 +772,39 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.50.0.tgz#e0d6c838dc9044bc679724611b138cb34c81bddf" - integrity sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A== +"@typescript-eslint/scope-manager@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.54.0.tgz#307dc8cbd80157e2772c2d36216857415a71ab33" + integrity sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg== dependencies: - "@typescript-eslint/types" "8.50.0" - "@typescript-eslint/visitor-keys" "8.50.0" + "@typescript-eslint/types" "8.54.0" + "@typescript-eslint/visitor-keys" "8.54.0" -"@typescript-eslint/tsconfig-utils@8.50.0", "@typescript-eslint/tsconfig-utils@^8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.50.0.tgz#5c17537ad4c8a13bf6d7393035edaf91a1e13191" - integrity sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w== +"@typescript-eslint/tsconfig-utils@8.54.0", "@typescript-eslint/tsconfig-utils@^8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.54.0.tgz#71dd7ba1674bd48b172fc4c85b2f734b0eae3dbc" + integrity sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw== -"@typescript-eslint/type-utils@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.50.0.tgz#feb6f54f876980a258b14f1cb033f54fc545d37b" - integrity sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw== +"@typescript-eslint/type-utils@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.54.0.tgz#64965317dd4118346c2fa5ee94492892200e9fb9" + integrity sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA== dependencies: - "@typescript-eslint/types" "8.50.0" - "@typescript-eslint/typescript-estree" "8.50.0" - "@typescript-eslint/utils" "8.50.0" - debug "^4.3.4" - ts-api-utils "^2.1.0" + "@typescript-eslint/types" "8.54.0" + "@typescript-eslint/typescript-estree" "8.54.0" + "@typescript-eslint/utils" "8.54.0" + debug "^4.4.3" + ts-api-utils "^2.4.0" "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@8.50.0", "@typescript-eslint/types@^8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.50.0.tgz#ad8f1ad88ae0096f548c9cdf60da9b92832db96e" - integrity sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w== +"@typescript-eslint/types@8.54.0", "@typescript-eslint/types@^8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.54.0.tgz#c12d41f67a2e15a8a96fbc5f2d07b17331130889" + integrity sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -819,20 +819,20 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.50.0.tgz#2871d36617f81a127db905fa91b16d1a0251411b" - integrity sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ== +"@typescript-eslint/typescript-estree@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.54.0.tgz#3c7716905b2b811fadbd2114804047d1bfc86527" + integrity sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA== dependencies: - "@typescript-eslint/project-service" "8.50.0" - "@typescript-eslint/tsconfig-utils" "8.50.0" - "@typescript-eslint/types" "8.50.0" - "@typescript-eslint/visitor-keys" "8.50.0" - debug "^4.3.4" - minimatch "^9.0.4" - semver "^7.6.0" + "@typescript-eslint/project-service" "8.54.0" + "@typescript-eslint/tsconfig-utils" "8.54.0" + "@typescript-eslint/types" "8.54.0" + "@typescript-eslint/visitor-keys" "8.54.0" + debug "^4.4.3" + minimatch "^9.0.5" + semver "^7.7.3" tinyglobby "^0.2.15" - ts-api-utils "^2.1.0" + ts-api-utils "^2.4.0" "@typescript-eslint/utils@5.62.0": version "5.62.0" @@ -848,15 +848,15 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.50.0.tgz#107f20a5747eab5db988c5f6ad462b59851cdd1f" - integrity sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg== +"@typescript-eslint/utils@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.54.0.tgz#c79a4bcbeebb4f571278c0183ed1cb601d84c6c8" + integrity sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA== dependencies: - "@eslint-community/eslint-utils" "^4.7.0" - "@typescript-eslint/scope-manager" "8.50.0" - "@typescript-eslint/types" "8.50.0" - "@typescript-eslint/typescript-estree" "8.50.0" + "@eslint-community/eslint-utils" "^4.9.1" + "@typescript-eslint/scope-manager" "8.54.0" + "@typescript-eslint/types" "8.54.0" + "@typescript-eslint/typescript-estree" "8.54.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -866,12 +866,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@8.50.0": - version "8.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.50.0.tgz#79d1c95474e08f844dbe13370715cfb9b7e21363" - integrity sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q== +"@typescript-eslint/visitor-keys@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.54.0.tgz#0e4b50124b210b8600b245dd66cbad52deb15590" + integrity sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA== dependencies: - "@typescript-eslint/types" "8.50.0" + "@typescript-eslint/types" "8.54.0" eslint-visitor-keys "^4.2.1" acorn-jsx@^5.3.2: @@ -1090,9 +1090,9 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" axios@^1.7.9: - version "1.13.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687" - integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== + version "1.13.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.4.tgz#15d109a4817fb82f73aea910d41a2c85606076bc" + integrity sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg== dependencies: follow-redirects "^1.15.6" form-data "^4.0.4" @@ -1343,9 +1343,9 @@ concat-map@0.0.1: integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== cron-parser@^5.3.1: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-5.4.0.tgz#5bb9cd9bc3c14971d179aff2d4cc41053e302b0e" - integrity sha512-HxYB8vTvnQFx4dLsZpGRa0uHp6X3qIzS3ZJgJ9v6l/5TJMgeWQbLkR5yiJ5hOxGbc9+jCADDnydIe15ReLZnJA== + version "5.5.0" + resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-5.5.0.tgz#7706b441f5761b60a915c2661de2ee64194bd407" + integrity sha512-oML4lKUXxizYswqmxuOCpgFS8BNUJpIu6k/2HVHyaL8Ynnf3wdf9tkns0yRdJLSIjkJ+b0DXHMZEHGpMwjnPww== dependencies: luxon "^3.7.1" @@ -1445,9 +1445,9 @@ delayed-stream@~1.0.0: integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== diff@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" - integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + version "5.2.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.2.tgz#0a4742797281d09cfa699b79ea32d27723623bad" + integrity sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A== dir-glob@^3.0.1: version "3.0.1" @@ -1745,12 +1745,12 @@ eslint-plugin-no-secrets@^1.0.2: integrity sha512-FjgyBaEkQK6hrdKf0V1TnKbY3dxXmw8S7tjfHs/BMIgFGNYhzFccxbZSJtDCPHTQTSiBtdLwRlOmSF81toII4w== eslint-plugin-prettier@^5.2.1: - version "5.5.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz#9d61c4ea11de5af704d4edf108c82ccfa7f2e61c" - integrity sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg== + version "5.5.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.5.tgz#9eae11593faa108859c26f9a9c367d619a0769c0" + integrity sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw== dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" + prettier-linter-helpers "^1.0.1" + synckit "^0.11.12" eslint-plugin-react@^7.36.1: version "7.37.5" @@ -1857,9 +1857,9 @@ espree@^10.0.1, espree@^10.4.0: eslint-visitor-keys "^4.2.1" esquery@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" - integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + version "1.7.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d" + integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g== dependencies: estraverse "^5.1.0" @@ -1899,9 +1899,9 @@ ethers@^6.13.5, ethers@^6.15.0: ws "8.17.1" eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + version "5.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.4.tgz#a86d66170433712dde814707ac52b5271ceb1feb" + integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw== eyes@^0.1.8: version "0.1.8" @@ -1957,9 +1957,9 @@ fastest-levenshtein@^1.0.7: integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== fastq@^1.6.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" - integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== dependencies: reusify "^1.0.4" @@ -2241,9 +2241,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" iconv-lite@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.1.tgz#d4af1d2092f2bb05aab6296e5e7cd286d2f15432" - integrity sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw== + version "0.7.2" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.2.tgz#d0bdeac3f12b4835b7359c2ad89c422a4d1cc72e" + integrity sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" @@ -2257,7 +2257,7 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== -ignore@^7.0.0: +ignore@^7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== @@ -2556,9 +2556,9 @@ jake@^10.8.5: picocolors "^1.1.1" jayson@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.2.0.tgz#b71762393fa40bc9637eaf734ca6f40d3b8c0c93" - integrity sha512-VfJ9t1YLwacIubLhONk0KFeosUBwstRWQ0IRT1KDjEjnVnSOVHC3uwugyV7L0c7R9lpVyrUGT2XWiBA1UTtpyg== + version "4.3.0" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.3.0.tgz#22eb8f3dcf37a5e893830e5451f32bde6d1bde4d" + integrity sha512-AauzHcUcqs8OBnCHOkJY280VaTiCm57AbuO7lqzcw7JapGj50BisE3xhksye4zlTSR1+1tAz67wLTl8tEH1obQ== dependencies: "@types/connect" "^3.4.33" "@types/node" "^12.12.54" @@ -2665,9 +2665,9 @@ lodash.merge@^4.6.2: integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + version "4.17.23" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.23.tgz#f113b0378386103be4f6893388c73d0bde7f2c5a" + integrity sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w== log-symbols@^4.1.0: version "4.1.0" @@ -2745,7 +2745,7 @@ minimatch@^5.0.1, minimatch@^5.1.6: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4, minimatch@^9.0.5: +minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -2980,17 +2980,17 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== +prettier-linter-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz#6a31f88a4bad6c7adda253de12ba4edaea80ebcd" + integrity sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg== dependencies: fast-diff "^1.1.2" prettier@^3.3.3: - version "3.7.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.7.4.tgz#d2f8335d4b1cec47e1c8098645411b0c9dff9c0f" - integrity sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA== + version "3.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.8.1.tgz#edf48977cf991558f4fcbd8a3ba6015ba2a3a173" + integrity sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg== prop-types@^15.8.1: version "15.8.1" @@ -3105,9 +3105,9 @@ reusify@^1.0.4: integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== rpc-websockets@^9.0.2: - version "9.3.2" - resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.3.2.tgz#26b4d7ebaf8e53422528619a3c314e83590d85bf" - integrity sha512-VuW2xJDnl1k8n8kjbdRSWawPRkwaVqUQNjE1TdeTawf0y0abGhtVJFTXCLfgpgGDBkO/Fj6kny8Dc/nvOW78MA== + version "9.3.3" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.3.3.tgz#b6be8b217f2a19bbc5fc184ef492e992b524556b" + integrity sha512-OkCsBBzrwxX4DoSv4Zlf9DgXKRB0MzVfCFg5MC+fNnf9ktr4SMWjsri0VNZQlDbCnGcImT6KNEv4ZoxktQhdpA== dependencies: "@swc/helpers" "^0.5.11" "@types/uuid" "^8.3.4" @@ -3170,7 +3170,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7, semver@^7.6.0, semver@^7.7.3: +semver@^7.3.7, semver@^7.7.3: version "7.7.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== @@ -3413,10 +3413,10 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.11" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.11.tgz#c0b619cf258a97faa209155d9cd1699b5c998cb0" - integrity sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw== +synckit@^0.11.12: + version "0.11.12" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.12.tgz#abe74124264fbc00a48011b0d98bdc1cffb64a7b" + integrity sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ== dependencies: "@pkgr/core" "^0.2.9" @@ -3445,10 +3445,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-api-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" - integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== +ts-api-utils@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.4.0.tgz#2690579f96d2790253bdcf1ca35d569ad78f9ad8" + integrity sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA== ts-mixer@^6.0.2: version "6.0.4" @@ -3670,9 +3670,9 @@ which-collection@^1.0.2: is-weakset "^2.0.3" which-typed-array@^1.1.16, which-typed-array@^1.1.19: - version "1.1.19" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.19.tgz#df03842e870b6b88e117524a4b364b6fc689f956" - integrity sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw== + version "1.1.20" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122" + integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg== dependencies: available-typed-arrays "^1.0.7" call-bind "^1.0.8" @@ -3745,9 +3745,9 @@ ws@^7.5.10: integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== ws@^8.5.0: - version "8.18.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" - integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== + version "8.19.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.19.0.tgz#ddc2bdfa5b9ad860204f5a72a4863a8895fd8c8b" + integrity sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg== y18n@^5.0.5: version "5.0.8" From fd2e348fedd3ea5d6b9ef844fbaf25237409be53 Mon Sep 17 00:00:00 2001 From: PedroAraoz Date: Wed, 28 Jan 2026 18:40:09 -0300 Subject: [PATCH 2/2] review changes --- examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts b/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts index 98d1901..0e52ff0 100644 --- a/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts +++ b/examples/13-bridge-and-invest-aave/src/create-trigger.invest.ts @@ -73,7 +73,7 @@ async function main(): Promise { executionFeeLimit: '0', minValidations: 1, }) - console.log(`Created config on chain ${chainId}: ${trigger.sig}`) + console.log(`Created trigger on chain ${chainId}: ${trigger.sig}`) } }