-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from pimlicolabs/feat/kinto-e2e
Feat/Kinto-E2E
- Loading branch information
Showing
9 changed files
with
623 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Run Kinto-E2E Tests | ||
env: | ||
KINTO_RPC: ${{ secrets.KINTO_RPC }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
kinto-e2e: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Install and build alto | ||
run: pnpm install && pnpm build | ||
|
||
- name: Install test dependencies | ||
run: cd test/kinto-e2e && pnpm install . | ||
|
||
- name: Start tests | ||
run: cd test/kinto-e2e && pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Kinto E2E Tests | ||
|
||
E2E tests for Kinto L2, the tests are performed by re-simulating succesfully mined userOperations. Each test case will setup a Alto and Anvil instance at that block height and resubmit the userOperation using either `eth_sendUserOperation` or `pimlico_sendCompressedUserOperation`. | ||
|
||
## Running The Tests | ||
|
||
``` | ||
pnpm run test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"dangerous-skip-user-operation-validation": true, | ||
"network-name": "local", | ||
"log-environment": "production", | ||
"enable-debug-endpoints": true, | ||
"entrypoints": "0x2843C269D2a64eCfA63548E8B3Fc0FD23B7F70cb", | ||
"api-version": "v1,v2", | ||
"min-balance": "0", | ||
"bundle-bulker-address": "0x8d2D899402ed84b6c0510bB1ad34ee436ADDD20d", | ||
"per-op-inflator-address": "0xfE3857666264Cf6394eDbAfF8907C2B1448D831b", | ||
"max-block-range": 1000, | ||
"safe-mode": false, | ||
"port": 4337, | ||
"log-level": "info", | ||
"public-client-log-level": "error", | ||
"wallet-client-log-level": "error", | ||
"polling-interval": 100, | ||
"network-name": "0.0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "kinto-e2e", | ||
"scripts": { | ||
"test": "ts-node src/index.ts" | ||
}, | ||
"dependencies": { | ||
"@viem/anvil": "^0.0.10", | ||
"kinto-e2e": "link:", | ||
"permissionless": "0.0.36", | ||
"ts-node": "^10.9.2", | ||
"viem": "^2.0.0", | ||
"wait-port": "^1.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
export const handleOpsAbi = [ | ||
{ | ||
inputs: [ | ||
{ | ||
components: [ | ||
{ | ||
internalType: "address", | ||
name: "sender", | ||
type: "address" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "nonce", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "initCode", | ||
type: "bytes" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "callData", | ||
type: "bytes" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "callGasLimit", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "verificationGasLimit", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "preVerificationGas", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "maxFeePerGas", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "maxPriorityFeePerGas", | ||
type: "uint256" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "paymasterAndData", | ||
type: "bytes" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "signature", | ||
type: "bytes" | ||
} | ||
], | ||
internalType: "struct UserOperation[]", | ||
name: "ops", | ||
type: "tuple[]" | ||
}, | ||
{ | ||
internalType: "address payable", | ||
name: "beneficiary", | ||
type: "address" | ||
} | ||
], | ||
name: "handleOps", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function" | ||
} | ||
] as const | ||
|
||
export const BundleBulkerAbi = [ | ||
{ | ||
type: "function", | ||
name: "inflate", | ||
inputs: [ | ||
{ | ||
name: "compressed", | ||
type: "bytes", | ||
internalType: "bytes" | ||
} | ||
], | ||
outputs: [ | ||
{ | ||
name: "ops", | ||
type: "tuple[]", | ||
internalType: "struct UserOperation[]", | ||
components: [ | ||
{ | ||
name: "sender", | ||
type: "address", | ||
internalType: "address" | ||
}, | ||
{ | ||
name: "nonce", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "initCode", | ||
type: "bytes", | ||
internalType: "bytes" | ||
}, | ||
{ | ||
name: "callData", | ||
type: "bytes", | ||
internalType: "bytes" | ||
}, | ||
{ | ||
name: "callGasLimit", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "verificationGasLimit", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "preVerificationGas", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "maxFeePerGas", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "maxPriorityFeePerGas", | ||
type: "uint256", | ||
internalType: "uint256" | ||
}, | ||
{ | ||
name: "paymasterAndData", | ||
type: "bytes", | ||
internalType: "bytes" | ||
}, | ||
{ | ||
name: "signature", | ||
type: "bytes", | ||
internalType: "bytes" | ||
} | ||
] | ||
}, | ||
{ | ||
name: "beneficiary", | ||
type: "address", | ||
internalType: "address payable" | ||
} | ||
], | ||
stateMutability: "view" | ||
} | ||
] as const |
Oops, something went wrong.