An end to end demo of account abstraction on the VechainThor blockchain.
-
Initialize submodules
git submodule update --init --recursive
-
Clone latest
thor
and run it with flag--api-allow-custom-tracer
:bin/thor solo --on-demand --api-allow-custom-tracer --data-dir /data/thor --api-addr 0.0.0.0:8669 --api-cors '*' --api-backtrace-limit -1 --verbosity 4
-
Deploy Contracts
cd account-abstraction yarn --ignore-engines && yarn run hardhat test test/deploy-contracts.test.ts --network vechain cd ..
Sample output:
Contract: Deployments TestUtils address: 0xC0a5459871aD8Ff4c9f5EeE7b41eE394ed415EB3 EntryPoint address: 0x1B433B67cE2CF743673a04268a088C8615413084 SimpleAccountFactory address: 0x29D17a4bdF64EeC4f05c27e9afA7556E4a9208ff FakeSimpleAccountFactory address: 0xEf3d1eeD859f88215475C3d77F6503EEf7f8D985
-
Build
web3-providers-connex
withdebug_traceCall
supportcd web3-providers-connex npm install && npm run build cd ..
-
Build
hardhat-plugins
with local web3-providers-connex dependencycd hardhat-plugins yarn install && yarn build cd ..
-
Build
bundler
with local hardhat-plugins dependencycd bundler yarn && yarn preprocess
-
Copy
EntryPoint address
value from the deployment output at step 2 to bundler/localconfig/bundler.config.json -
Run bundler
yarn run bundler
The bundler should now run in safe mode which supports
debug_traceCall
-
Change the config under
account-abstraction/test/config.ts
with yourEntryPoint
andSimpleAccountFactory
addresses that you got in step 2. -
Run the funding script (make sure you change the account in the script to your SimpleAccount address, you can get that when running either Trampoline or Stackup)
cd account-abstraction
yarn run hardhat test test/test_custom.ts --network vechain
cd ..
DISCLAIMER: Contracts should be deployed and Bundler up and running beforehand (see previous section).
-
Navigate to the stackup directory and follow the readme
-
Start the server by running
yarn run server
on a separate terminal -
Navigate to the demo folder and run it on a separate terminal
cd demo-eip-4337
npm install
npm start
See CONTRIBUTING for further details on how to contribute.
Distrubuted under the MIT license. See LICENSE for more information.