Implementation of contracts for ERC-4337 account abstraction via alternative mempool.
This project is based on eth-infinitism v0.6.0 implementation.
The changes mainly concern VTHO support, as the gas unit that is prefunded.
The tests run using Docker Compose to bring up a Thor Solo instance. You should also install all dependencies first by running yarn install
.
When using Docker Compose V1, please run the script:
yarn test:compose:v1
If you have Docker Compose V2, please run this instead:
yarn test:compose:v2
If you need to find out first which one is your version, please execute (V1 would be the below)
➜ docker-compose -v
docker-compose version 1.29.2, build 5becea4c
The test files are placed in separate folders (shard1
, shard2
...) so we can parallelise the execution in the pipelines.
DISCLAIMER: There are over a hundred tests in this repository. Further adjustments might be required in this case (for instance, make sure that the sender account is well-funded).
To deploy on testnet modify the hardhat.config.ts
with the following
vechain_testnet: {
url: VECHAIN_URL_TESTNET,
accounts: {
mnemonic: "your testnet mnemonic goes here"
},
}
And run the deployment script
yarn hardhat test --network vechain_testnet shard1/deploy-contracts.test.ts
To deploy on testnet modify the hardhat.config.ts
with the following
vechain_mainnet: {
url: VECHAIN_URL_MAINNET,
accounts: {
mnemonic: "your mainnet mnemonic goes here"
},
}
And run the deployment script
yarn hardhat test --network vechain_mainnet shard1/deploy-contracts.test.ts
Update ./test/utils/config.ts with the addresses of the deployed contracts and then for testnet:
yarn test:testnet
And for mainnet:
yarn test:mainnet