
[1m[46m RUN [49m[22m [36mv4.0.17 [39m[90m/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk[39m
      [2mCoverage enabled with [22m[33mv8[39m

[90mstdout[2m | src/clients/endUser.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

[90mstdout[2m | src/clients/community.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

[90mstdout[2m | src/clients/clients.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

[90mstdout[2m | src/utils/eventDecoder.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

[90mstdout[2m | src/clients/operator.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with ETH
[22m[39m💸 Funding 0x1111111111111111111111111111111111111111 with 0.1 ETH...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with ETH
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with ETH
[22m[39m   ✅ ETH Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with Token
[22m[39m💸 Funding 0x1111111111111111111111111111111111111111 with 100 tokens...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with Token
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould fund with Token
[22m[39m   ✅ Token Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould ensure funding when below threshold
[22m[39m⚠️  ETH balance (1) below threshold (2.0)
💸 Funding 0x1111111111111111111111111111111111111111 with 1.0 ETH...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould ensure funding when below threshold
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould ensure funding when below threshold
[22m[39m   ✅ ETH Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m💸 Funding 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 0.1 ETH...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m   ✅ ETH Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m💸 Funding 0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB with 0.2 ETH...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund ETH
[22m[39m   ✅ ETH Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m💸 Funding 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 100 tokens...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m   ✅ Token Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m💸 Funding 0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB with 200 tokens...

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m   Transaction Sent: 0xhash

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould batch fund Token
[22m[39m   ✅ Token Funded.

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle ensure funding with token
[22m[39m✅ Sufficient ETH: 1 ETH

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle ensure funding with token
[22m[39m✅ Sufficient Token: 100

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle ETH funding errors
[22m[39m💸 Funding 0x1111111111111111111111111111111111111111 with 0.1 ETH...

[90mstderr[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle ETH funding errors
[22m[39m   ❌ ETH Funding Failed: Error: Network error
    at [90m/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk/[39msrc/utils/funding.test.ts:100:72
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
    at new Promise (<anonymous>)
    at runWithTimeout (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
    at Traces.$ (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
    at trace (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
    at runTest (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)

[90mstdout[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle Token funding errors
[22m[39m💸 Funding 0x1111111111111111111111111111111111111111 with 100 tokens...

[90mstderr[2m | src/utils/funding.test.ts[2m > [22m[2mFundingManager[2m > [22m[2mshould handle Token funding errors
[22m[39m   ❌ Token Funding Failed: Error: Insufficient balance
    at [90m/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk/[39msrc/utils/funding.test.ts:110:73
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
    at new Promise (<anonymous>)
    at runWithTimeout (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
    at Traces.$ (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
    at trace (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
    at runTest (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)

[90mstdout[2m | src/utils/keys.test.ts[2m > [22m[2mKeyManager[2m > [22m[2mshould save keys to env file
[22m[39m✅ Keys saved to /mock/.env (1 keys)

 [32m✓[39m src/utils/funding.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 286[2mms[22m[39m
[90mstdout[2m | src/utils/keys.test.ts[2m > [22m[2mKeyManager[2m > [22m[2mshould save and load keys from json file
[22m[39m✅ Keys saved to /mock/keys.json (1 keys)

[90mstdout[2m | src/utils/keys.test.ts[2m > [22m[2mKeyManager[2m > [22m[2mshould print keys with masked private key
[22m[39m
🔑 Generated Keys:
────────────────────────────────────────────────────────────────────────────────
1. Admin
   Address: 0xAddress
   Private Key: 0x12345678...34567890
────────────────────────────────────────────────────────────────────────────────

[90mstdout[2m | src/utils/keys.test.ts[2m > [22m[2mKeyManager[2m > [22m[2mshould print keys with full private key
[22m[39m
🔑 Generated Keys:
────────────────────────────────────────────────────────────────────────────────
1. Admin
   Address: 0xAddress
   Private Key: 0x1234567890123456789012345678901234567890
────────────────────────────────────────────────────────────────────────────────

 [32m✓[39m src/utils/keys.test.ts [2m([22m[2m10 tests[22m[2m)[22m[33m 312[2mms[22m[39m
[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mjoinAndActivate[2m > [22m[2mshould join community and fetch SBT
[22m[39m   SDK: Joining community 0x1111111111111111111111111111111111111111...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mjoinAndActivate[2m > [22m[2mshould join community and fetch SBT
[22m[39m   SDK: User joined. SBT ID: 123

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mexecuteGasless[2m > [22m[2mshould execute gasless transaction
[22m[39m   SDK: Executing gasless via AA 0xaa Sponsored by 0x1111111111111111111111111111111111111111

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mexecuteGasless[2m > [22m[2mshould execute gasless transaction
[22m[39m   SDK: Submitting UserOp 0...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mexecuteGaslessBatch[2m > [22m[2mshould execute gasless batch
[22m[39m   SDK: Executing gasless batch via AA 0xaa Sponsored by 0x1111111111111111111111111111111111111111

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mexecuteGaslessBatch[2m > [22m[2mshould execute gasless batch
[22m[39m   SDK: Submitting Batch UserOp 0...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mRequirements and Credits[2m > [22m[2mshould call onboard (alias for joinAndActivate)
[22m[39m👤 Onboarding user to community...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mRequirements and Credits[2m > [22m[2mshould call onboard (alias for joinAndActivate)
[22m[39m✅ User onboarded! SBT ID: 1

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould deploy new smart account
[22m[39m   🏭 Deploying Smart Account for 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould deploy new smart account
[22m[39m   ✅ Deployed at 0xNewAccount

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould deploy new smart account
[22m[39m   ⛽ Funding account with 0.1 ETH...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould skip deploy if already deployed
[22m[39m   ℹ️ Account 0xExisting already deployed.

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m🚀 Launching Community "Test"...
   Registry: Registering Role...

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m   ✅ Registered: 0xhash

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m   🏭 Deploying Token via Factory: 0x2a810409872AfC346F9B5b26571Fd6eC42EA4849

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m   📤 Deploy Token Tx: 0xhash

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m   🪙 Token Deployed: 0x0000000000000000000000000000000000000000
⚖️ Setting up Governance Rules...

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mlaunch[2m > [22m[2mshould launch community with token and governance
[22m[39m   ✅ Reputation Rule Set: 0xhash

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2monboardFully[2m > [22m[2mshould complete onboarding flow
[22m[39m   SDK: Fetching role config for entry burn...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould handle logic when smart account not deployed during batch
[22m[39m   SDK: Executing gasless batch via AA undefined Sponsored by 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould handle logic when smart account not deployed during batch
[22m[39m   SDK: Submitting Batch UserOp 0xhash...

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould handle execution errors in gasless batch
[22m[39m   SDK: Executing gasless batch via AA 0xhash Sponsored by 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

[90mstdout[2m | src/clients/endUser.test.ts[2m > [22m[2mEndUserClient[2m > [22m[2mSmart Account Management[2m > [22m[2mshould handle execution errors in gasless batch
[22m[39m   SDK: Submitting Batch UserOp 0xhash...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mEndUserClient[2m > [22m[2mshould execute gasless transaction
[22m[39m   SDK: Executing gasless via AA 0x1111111111111111111111111111111111111111 Sponsored by 0x1111111111111111111111111111111111111111

[90mstdout[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould measure transaction automatically
[22m[39m[Experiment: SuperPaymaster] Executing: test-task...

[90mstdout[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould measure transaction automatically
[22m[39m   ✅ Success! Gas: 50000 | Cost: 0.0001 ETH

 [32m✓[39m src/utils/testScenarios.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 43[2mms[22m[39m
[90mstdout[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould handle failed measureTx
[22m[39m[Experiment: EOA] Executing: test-task...

[90mstderr[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould handle failed measureTx
[22m[39m   ❌ Failed: test-task Error: tx failed
    at [90m/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk/[39msrc/clients/ExperimentClient.test.ts:37:42
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:145:11
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:915:26
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1243:20
    at new Promise (<anonymous>)
    at runWithTimeout (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1209:10)
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
    at Traces.$ (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
    at trace (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/vitest@4.0.17_@types+node@20.11.5_tsx@4.21.0_yaml@2.8.2/node_modules/[4mvitest[24m/dist/chunks/test.B8ej_ZHS.js:239:21)
    at runTest (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:12)

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mEndUserClient[2m > [22m[2mshould execute gasless transaction
[22m[39m   SDK: Submitting UserOp 0xhash...

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2monboardFully[2m > [22m[2mshould complete onboarding flow
[22m[39m   SDK: Approving GToken (Stake: 100, Burn: 0)...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mCommunityClient[2m > [22m[2mshould launch community
[22m[39m🚀 Launching Community "Test"...
   Registry: Registering Role...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mCommunityClient[2m > [22m[2mshould launch community
[22m[39m   ✅ Registered: 0xhash

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mCommunityClient[2m > [22m[2mshould launch community
[22m[39m   ℹ️  Found existing token at 0x1111111111111111111111111111111111111111

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mOperatorClient[2m > [22m[2mshould setup operator
[22m[39m⚙️ Setting up operator...
   SDK: Fetching role config for entry burn...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mOperatorClient[2m > [22m[2mshould setup operator
[22m[39m   SDK: Approving GToken (Stake: 100, Burn: 0)...

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mLaunch[2m > [22m[2mshould handle registration failure gracefully in launch
[22m[39m🚀 Launching Community "Test"...
   Registry: Registering Role...

[90mstdout[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mLaunch[2m > [22m[2mshould handle registration failure gracefully in launch
[22m[39m   ✅ Registered: 0xhash

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mOperatorClient[2m > [22m[2mshould setup operator
[22m[39m   SDK: Auto-generating roleData for roleId 0x1...
   SDK: Checking if role already granted...

[90mstdout[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould record latency in measureTx
[22m[39m[Experiment: AA] Executing: test...

[90mstdout[2m | src/clients/ExperimentClient.test.ts[2m > [22m[2mExperimentClient[2m > [22m[2mshould record latency in measureTx
[22m[39m   ✅ Success! Gas: 21000 | Cost: 0.000021 ETH

[90mstderr[2m | src/utils/eventDecoder.test.ts[2m > [22m[2meventDecoder[2m > [22m[2mshould skip invalid logs
[22m[39m   ⚠️ Skipping log with invalid data: { data: [32m'invalid'[39m, topics: [] }

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2monboardFully[2m > [22m[2mshould complete onboarding flow
[22m[39m   SDK: Auto-generating roleData for roleId 0x2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f...
   SDK: Checking if role already granted...

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2monboardFully[2m > [22m[2mshould complete onboarding flow
[22m[39m   SDK: Registering role 0x2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f...

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2monboardFully[2m > [22m[2mshould complete onboarding flow
[22m[39m   SDK: Depositing aPNTs via depositForOperator...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mOperatorClient[2m > [22m[2mshould setup operator
[22m[39m   ℹ️  Role already granted, skipping registration
   SDK: Depositing aPNTs via depositForOperator...

[90mstdout[2m | src/clients/clients.test.ts[2m > [22m[2mSDK L2 Clients[2m > [22m[2mOperatorClient[2m > [22m[2mshould setup operator
[22m[39m✅ Operator setup complete! Transactions: 2

[90mstdout[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2mAdvanced Setup[2m > [22m[2mshould deploy PaymasterV4
[22m[39m   SDK: Deploying Paymaster V4 (v4.2)...

 [32m✓[39m src/clients/ExperimentClient.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 54[2mms[22m[39m
[90mstdout[2m | src/utils/eventDecoder.test.ts[2m > [22m[2meventDecoder[2m > [22m[2mshould log decoded events
[22m[39m📡 [Test] Event: Event
   └─ amount: 100
   └─ user: 0x0000000000000000000000000000000000000001

 [32m✓[39m src/clients/endUser.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 52[2mms[22m[39m
 [32m✓[39m src/clients/clients.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 138[2mms[22m[39m
 [32m✓[39m src/utils/eventDecoder.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 93[2mms[22m[39m
 [32m✓[39m src/errors/AAStarError.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 26[2mms[22m[39m
 [32m✓[39m src/utils/errorHandler.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 10[2mms[22m[39m
[90mstderr[2m | src/clients/operator.test.ts[2m > [22m[2mOperatorClient[2m > [22m[2mOperator Status and Queries[2m > [22m[2mshould get operator status
[22m[39m   ⚠️ Failed to fetch V4 info from factory 0xb9bEECD1A582768711dE1EE7B0A1d582D9d72a6C: InvalidParamsRpcError: Invalid parameters were provided to the RPC method.
Double check you have provided the correct parameters.

URL: https://eth.merkle.io
Request body: {"method":"eth_getBalance","params":[null,"latest"]}

Details: Invalid params
Version: viem@2.43.3
    at withRetry.delay.count.count (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/buildRequest.js:44:31)
[90m    at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
    at attemptRetry (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/promise/withRetry.js:12:30) {
  details: [32m'Invalid params'[39m,
  docsPath: [90mundefined[39m,
  metaMessages: [
    [32m'URL: https://eth.merkle.io'[39m,
    [32m'Request body: {"method":"eth_getBalance","params":[null,"latest"]}'[39m
  ],
  shortMessage: [32m'Invalid parameters were provided to the RPC method.\n'[39m +
    [32m'Double check you have provided the correct parameters.'[39m,
  version: [32m'2.43.3'[39m,
  code: [33m-32602[39m,
  [cause]: RpcRequestError: RPC Request failed.
  
  URL: https://eth.merkle.io
  Request body: {"method":"eth_getBalance","params":[null,"latest"]}
  
  Details: Invalid params
  Version: viem@2.43.3
      at request (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/clients/transports/http.js:55:27)
  [90m    at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
      at withRetry.delay.count.count (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/buildRequest.js:28:24)
      at attemptRetry (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/promise/withRetry.js:12:30) {
    details: [32m'Invalid params'[39m,
    docsPath: [90mundefined[39m,
    metaMessages: [
      [32m'URL: https://eth.merkle.io'[39m,
      [32m'Request body: {"method":"eth_getBalance","params":[null,"latest"]}'[39m
    ],
    shortMessage: [32m'RPC Request failed.'[39m,
    version: [32m'2.43.3'[39m,
    code: [33m-32602[39m,
    data: [32m'invalid type: null, expected 20 bytes, represented as a hex string of length 40, an array of u8, or raw bytes at line 1 column 4'[39m,
    url: [32m'https://eth.merkle.io'[39m,
    [cause]: {
      code: [33m-32602[39m,
      data: [32m'invalid type: null, expected 20 bytes, represented as a hex string of length 40, an array of u8, or raw bytes at line 1 column 4'[39m,
      message: [32m'Invalid params'[39m
    }
  }
}

[90mstderr[2m | src/clients/community.test.ts[2m > [22m[2mCommunityClient[2m > [22m[2mLaunch[2m > [22m[2mshould handle registration failure gracefully in launch
[22m[39m   ⚠️ Token deployment step issues: ContractFunctionExecutionError: The contract function "getTokenAddress" returned no data ("0x").

This could be due to any of the following:
  - The contract does not have the function "getTokenAddress",
  - The parameters passed to the contract function may be invalid, or
  - The address is not a contract.
 
Contract Call:
  address:   0x2a810409872AfC346F9B5b26571Fd6eC42EA4849
  function:  getTokenAddress(address community)
  args:                     (0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.43.3
    at getContractError (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/errors/getContractError.js:33:12)
    at readContract (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/actions/public/readContract.js:58:15)
[90m    ... 3 lines matching cause stack trace ...[39m
    at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:915:20 {
  cause: ContractFunctionZeroDataError: The contract function "getTokenAddress" returned no data ("0x").
  
  This could be due to any of the following:
    - The contract does not have the function "getTokenAddress",
    - The parameters passed to the contract function may be invalid, or
    - The address is not a contract.
  
  Version: viem@2.43.3
      at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/errors/getContractError.js:16:20
      at getContractError (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/utils/errors/getContractError.js:32:7)
      at readContract (file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/viem@2.43.3_typescript@5.7.2/node_modules/[4mviem[24m/_esm/actions/public/readContract.js:58:15)
  [90m    at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
      at Object.launch [90m(/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk/[39msrc/clients/community.ts:153:43[90m)[39m
      at [90m/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/packages/sdk/[39msrc/clients/community.test.ts:108:14
      at file:///Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.17/node_modules/[4m@vitest/runner[24m/dist/index.js:915:20 {
    details: [90mundefined[39m,
    docsPath: [90mundefined[39m,
    metaMessages: [
      [32m'This could be due to any of the following:'[39m,
      [32m'  - The contract does not have the function "getTokenAddress",'[39m,
      [32m'  - The parameters passed to the contract function may be invalid, or'[39m,
      [32m'  - The address is not a contract.'[39m
    ],
    shortMessage: [32m'The contract function "getTokenAddress" returned no data ("0x").'[39m,
    version: [32m'2.43.3'[39m
  },
  details: [90mundefined[39m,
  docsPath: [32m'/docs/contract/readContract'[39m,
  metaMessages: [
    [32m'This could be due to any of the following:'[39m,
    [32m'  - The contract does not have the function "getTokenAddress",'[39m,
    [32m'  - The parameters passed to the contract function may be invalid, or'[39m,
    [32m'  - The address is not a contract.'[39m,
    [32m' '[39m,
    [32m'Contract Call:'[39m,
    [32m'  address:   0x2a810409872AfC346F9B5b26571Fd6eC42EA4849\n'[39m +
      [32m'  function:  getTokenAddress(address community)\n'[39m +
      [32m'  args:                     (0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)'[39m
  ],
  shortMessage: [32m'The contract function "getTokenAddress" returned no data ("0x").'[39m,
  version: [32m'2.43.3'[39m,
  abi: [
    {
      type: [32m'constructor'[39m,
      inputs: [36m[Array][39m,
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'DEFAULT_SAFETY_FACTOR'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'MIN_SUGGESTED_AMOUNT'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'REGISTRY'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'SUPERPAYMASTER'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'aPNTsPriceUSD'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'communityToToken'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'deployedTokens'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'deployxPNTsToken'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getAPNTsPrice'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getAllTokens'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getDeployedCount'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getDepositBreakdown'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getIndustryMultiplier'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getPredictionParams'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'getTokenAddress'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'hasToken'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'industryMultipliers'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'owner'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'predictDepositAmount'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'predictions'[39m,
      inputs: [36m[Array][39m,
      outputs: [36m[Array][39m,
      stateMutability: [32m'view'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'renounceOwnership'[39m,
      inputs: [],
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'setIndustryMultiplier'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'setSuperPaymasterAddress'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'transferOwnership'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'updateAPNTsPrice'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'updatePrediction'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'updatePredictionCustom'[39m,
      inputs: [36m[Array][39m,
      outputs: [],
      stateMutability: [32m'nonpayable'[39m
    },
    {
      type: [32m'function'[39m,
      name: [32m'version'[39m,
      inputs: [],
      outputs: [36m[Array][39m,
      stateMutability: [32m'pure'[39m
    },
    {
      type: [32m'event'[39m,
      name: [32m'APNTsPriceUpdated'[39m,
      inputs: [36m[Array][39m,
      anonymous: [33mfalse[39m
    },
    {
      type: [32m'event'[39m,
      name: [32m'IndustryMultiplierSet'[39m,
      inputs: [36m[Array][39m,
      anonymous: [33mfalse[39m
    },
    {
      type: [32m'event'[39m,
      name: [32m'OwnershipTransferred'[39m,
      inputs: [36m[Array][39m,
      anonymous: [33mfalse[39m
    },
    {
      type: [32m'event'[39m,
      name: [32m'PredictionUpdated'[39m,
      inputs: [36m[Array][39m,
      anonymous: [33mfalse[39m
    },
    {
      type: [32m'event'[39m,
      name: [32m'xPNTsTokenDeployed'[39m,
      inputs: [36m[Array][39m,
      anonymous: [33mfalse[39m
    },
    { type: [32m'error'[39m, name: [32m'AlreadyDeployed'[39m, inputs: [36m[Array][39m },
    { type: [32m'error'[39m, name: [32m'InvalidAddress'[39m, inputs: [36m[Array][39m },
    { type: [32m'error'[39m, name: [32m'InvalidParameters'[39m, inputs: [] },
    { type: [32m'error'[39m, name: [32m'OwnableInvalidOwner'[39m, inputs: [36m[Array][39m },
    {
      type: [32m'error'[39m,
      name: [32m'OwnableUnauthorizedAccount'[39m,
      inputs: [36m[Array][39m
    }
  ],
  args: [ [32m'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'[39m ],
  contractAddress: [32m'0x2a810409872AfC346F9B5b26571Fd6eC42EA4849'[39m,
  formattedArgs: [90mundefined[39m,
  functionName: [32m'getTokenAddress'[39m,
  sender: [90mundefined[39m
}

 [32m✓[39m src/clients/operator.test.ts [2m([22m[2m10 tests[22m[2m)[22m[33m 962[2mms[22m[39m
       [33m[2m✓[22m[39m should get operator status [33m 873[2mms[22m[39m
 [32m✓[39m src/clients/community.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 1029[2mms[22m[39m
       [33m[2m✓[22m[39m should handle registration failure gracefully in launch [33m 930[2mms[22m[39m
[90mstdout[2m | src/clients/admin.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

 [32m✓[39m src/utils/roleData.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 21[2mms[22m[39m
 [32m✓[39m src/utils/userOp.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 16[2mms[22m[39m
[90mstdout[2m | src/errors/decoder.test.ts
[22m[39m[SDK] Loaded contract config from: config.anvil.json

 [32m✓[39m src/clients/admin.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 25[2mms[22m[39m
 [32m✓[39m src/errors/decoder.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 9[2mms[22m[39m

[2m Test Files [22m [1m[32m15 passed[39m[22m[90m (15)[39m
[2m      Tests [22m [1m[32m128 passed[39m[22m[90m (128)[39m
[2m   Start at [22m 23:54:12
[2m   Duration [22m 6.86s[2m (transform 2.00s, setup 0ms, import 26.62s, tests 3.08s, environment 16ms)[22m

[34m % [39m[2mCoverage report from [22m[33mv8[39m
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   90.75 |    75.92 |   97.39 |   92.05 |                   
 clients           |   86.19 |    62.72 |   96.15 |   87.69 |                   
  ...mentClient.ts |     100 |       75 |     100 |     100 | 66-67             
  admin.ts         |   91.66 |       25 |     100 |   89.74 | 39-43             
  community.ts     |   82.14 |     62.5 |     100 |    82.5 | ...91-301,311-312 
  endUser.ts       |   84.21 |    63.79 |     100 |   86.89 | ...49-353,385,463 
  operator.ts      |   86.91 |    62.79 |   83.33 |   89.42 | ...47-248,327-328 
 errors            |     100 |    91.07 |     100 |     100 |                   
  AAStarError.ts   |     100 |      100 |     100 |     100 |                   
  decoder.ts       |     100 |    90.56 |     100 |     100 | 18,27,43,66,75    
 utils             |   95.77 |    83.51 |   98.21 |   97.04 |                   
  errorHandler.ts  |   97.91 |    78.57 |    90.9 |   97.91 | 163               
  eventDecoder.ts  |   95.45 |     87.5 |     100 |   95.23 | 47                
  funding.ts       |   95.38 |    68.75 |     100 |   95.38 | 214-220           
  keys.ts          |   95.74 |    86.36 |     100 |   95.34 | 60,78             
  roleData.ts      |     100 |      100 |     100 |     100 |                   
  testScenarios.ts |   90.62 |    80.95 |     100 |     100 | 88-101            
  userOp.ts        |   96.55 |    83.72 |     100 |   98.14 | 169               
-------------------|---------|----------|---------|---------|-------------------
