{"id":15696250,"url":"https://github.com/rubilmax/executooor","last_synced_at":"2026-02-20T17:31:17.416Z","repository":{"id":240049967,"uuid":"801447374","full_name":"Rubilmax/executooor","owner":"Rubilmax","description":"🛣️ The safest \u0026 most versatile multi-purpose execution contract (highway to MEV!)","archived":false,"fork":false,"pushed_at":"2024-10-10T15:34:39.000Z","size":1501,"stargazers_count":71,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T09:23:59.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rubilmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-16T08:48:25.000Z","updated_at":"2025-02-09T21:00:49.000Z","dependencies_parsed_at":"2024-05-28T14:23:22.365Z","dependency_job_id":"9f19cc48-3811-4f27-85ac-bbf411cc5dd6","html_url":"https://github.com/Rubilmax/executooor","commit_stats":null,"previous_names":["rubilmax/multidelegatecall","rubilmax/executooor"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rubilmax%2Fexecutooor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rubilmax%2Fexecutooor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rubilmax%2Fexecutooor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rubilmax%2Fexecutooor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rubilmax","download_url":"https://codeload.github.com/Rubilmax/executooor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T19:08:31.917Z","updated_at":"2026-02-20T17:31:17.383Z","avatar_url":"https://github.com/Rubilmax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# executooor\n\n[![npm package][npm-img]][npm-url]\n[![Build Status][build-img]][build-url]\n[![Downloads][downloads-img]][downloads-url]\n[![Issues][issues-img]][issues-url]\n[![Commitizen Friendly][commitizen-img]][commitizen-url]\n[![Semantic Release][semantic-release-img]][semantic-release-url]\n\n\u003e 🛣️ Batch multiple calls to any onchain smart contract in a single transaction, handling any callback, without writing and deploying any contract!\n\nEthereum's environment evolves fast. So fast that you can't keep up writing and deploying a new contract everytime you want to do something atomically onchain (not mentioning you also have to approve this freshly deployed contract to spend your favorite ERC20/ERC721!).\n\nWelcome the `Executor` contract:\n\n1. Calculate whatever you need to submit your execution\n2. Chain calls / delegatecalls as needed to execute whatever you want to execute atomically onchain (using `viem` and/or `ethers-v6`!)\n3. Optionally prepend any ERC20/ERC721 approval via a third-party bundling service (such as Flashbots)\n4. Submit your execution transaction (or bundle)\n5. For MEV out there: tip the bundler\n\nYou can even atomically populate your chain of calls if it depends on some state change!\nFor example, you can skim ERC20 tokens after an execution by simply requesting the balance left onchain and replacing it in the onchain call.\n\n---\n\n## Installation\n\n### viem\n\n```bash\nnpm install executooor-viem\n```\n\n```bash\nyarn add executooor-viem\n```\n\n### ethers-v6\n\n```bash\nnpm install executooor-ethers\n```\n\n```bash\nyarn add executooor-ethers\n```\n\n---\n\n## Usage\n\n### Deployment\n\nDeploy your very own `Executor` contract with the owner address you want, once and for all, using the [custom deployment interface](https://rubilmax.github.io/executooor/) (that you can also build locally).\n\nThe exact deployment bytecode is given below for convenience. You can deploy the Executor by broadcasting a transaction with this exact bytecode, appended with the owner address you want (typically your bot address).\n\nA merely cost of [0.003 ETH @ 10 gwei](https://etherscan.io/tx/0x77831c7dd4062a158efa527fc43938e0bafedac8c1de86703addc36e9b8ef077)!\n\n```typescript\n0x60a034606657601f61065538819003918201601f19168301916001600160401b03831184841017606a57808492602094604052833981010312606657516001600160a01b03811681036066576080526040516105d6908161007f8239608051816103500152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe604060808152600480361015610117575b3615610115575f5c6001600160a01b03811633036100ec576c1fffffffffffffffffffffffe090609b1c1681013501803590825190602092839181830190843782010183528051810183828483019203126100ec57828201519067ffffffffffffffff918281116100ec5783019481603f870112156100ec57848601519561009f61009a8861049a565b610408565b96828789838152019160051b830101918483116100ec57838101915b8383106100f057505050508301519182116100ec57836100e0926100e694010161051a565b92610564565b81519101f35b5f80fd5b82518781116100ec57899161010a8888859487010161051a565b8152019201916100bb565b005b5f3560e01c80156103ad57806001146102e9578060021461019b5763a9059cbb0361001057503660031901126100ec5761014f6103f2565b806024353033036100ec575f918291829182916001600160a01b03871615610193575b478181109082180218905af16101866104b2565b901561018e57005b610556565b419150610172565b5060a03660031901126100ec576101b06103f2565b60249267ffffffffffffffff926064604481358681116100ec576101d7903690850161045e565b95608494608435948286116100ec57366023870112156100ec5785013598828a116100ec576005993660248260051b890101116100ec57953681900360c21901905f5b888110610231576101158c6044356024358e6104d7565b83818e1b83010135838112156100ec578201848101356001600160a01b03811681036100ec5788820135604219833603018112156100ec5782019086820135918983116100ec578a019082360382136100ec57825f939284938b519283928337810184815203915afa906102a36104b2565b91156102e357908d60a48d846102c86102c08f6001999801610505565b928201610505565b946102d7602094859301610505565b01019201015e0161021a565b50610556565b506020806003193601126100ec57813567ffffffffffffffff928382116100ec57366023830112156100ec5781013560249061032761009a8261049a565b946024602087848152019260051b850101933685116100ec5760248101925b85841061038757877f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100ec5761011590610564565b83358381116100ec5787916103a2839288369187010161045e565b815201930192610346565b5060803660031901126100ec576103c26103f2565b60643567ffffffffffffffff81116100ec57610115926103e49136910161045e565b9060443590602435906104d7565b600435906001600160a01b03821682036100ec57565b6040519190601f01601f1916820167ffffffffffffffff81118382101761042e57604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161042e57601f01601f191660200190565b81601f820112156100ec5780359061047861009a83610442565b92828452602083830101116100ec57815f926020809301838601378301015290565b67ffffffffffffffff811161042e5760051b60200190565b3d156104d2573d906104c661009a83610442565b9182523d5f602084013e565b606090565b91923033036100ec575f928392835c95845d602083519301915af16104fa6104b2565b901561018e57505f5d565b3567ffffffffffffffff811681036100ec5790565b81601f820112156100ec5780519061053461009a83610442565b92828452602083830101116100ec57815f9260208093018386015e8301015290565b80519081156100ec57602001fd5b5f5b815181101561059c575f806020808460051b86010151908151910182305af161058d6104b2565b901561018e5750600101610566565b505056fea26469706673582212209ea2df6837d18ef0e252f0c0b3546a4743466c58b81fdc2d35d38348e99a319364736f6c63430008190033000000000000000000000000{YOUR_20_BYTES_OWNER_ADDRESS}\n```\n\n### Execution\n\nCreate an `ExecutorEncoder` instance and chain any calls wanted. Then, submit the transaction using `exec` (or populate the transaction using `populateExec`!).\n\n#### Using viem\n\n```typescript\nimport { ExecutorEncoder } from \"executooor\";\n\nconst encoder = new ExecutorEncoder(executorAddress, signer);\n\nawait encoder\n  // Flash loan some tokens on Balancer (0% fee).\n  .balancerFlashLoan(\n    balancerVaultAddress,\n    [{ asset: dai, amount: collateralAmount }],\n    // Chain calls executed inside Balancer's flash loan callback then flush it.\n    encoder\n      .erc20Approve(dai, aaveV2PoolAddress, collateralAmount)\n      .aaveV2Supply(aaveV2PoolAddress, dai, collateralAmount)\n      .aaveV2Borrow(aaveV2PoolAddress, weth, borrowedAmount, 2)\n      .unwrapETH(weth, borrowedAmount)\n      .wrapETH(weth, borrowedAmount)\n      .erc20Approve(weth, aaveV2PoolAddress, borrowedAmount)\n      .aaveV2Repay(aaveV2PoolAddress, weth, borrowedAmount, 2)\n      .aaveV2Withdraw(aaveV2PoolAddress, dai, MaxUint256)\n      .flush(),\n  )\n  // Execute the transaction.\n  .exec();\n```\n\n#### Using ethers-v6\n\n```typescript\nimport { ExecutorEncoder } from \"executooor\";\n\nconst encoder = new ExecutorEncoder(executorAddress, walletClient);\n\nawait encoder\n  // Flash loan some tokens on Balancer (0% fee).\n  .balancerFlashLoan(\n    balancerVaultAddress,\n    [{ asset: dai, amount: collateralAmount }],\n    // Chain calls executed inside Balancer's flash loan callback then flush it.\n    encoder\n      .erc20Approve(dai, aaveV2PoolAddress, collateralAmount)\n      .aaveV2Supply(aaveV2PoolAddress, dai, collateralAmount)\n      .aaveV2Borrow(aaveV2PoolAddress, weth, borrowedAmount, 2)\n      .unwrapETH(weth, borrowedAmount)\n      .wrapETH(weth, borrowedAmount)\n      .erc20Approve(weth, aaveV2PoolAddress, borrowedAmount)\n      .aaveV2Repay(aaveV2PoolAddress, weth, borrowedAmount, 2)\n      .aaveV2Withdraw(aaveV2PoolAddress, dai, MaxUint256)\n      .flush(),\n  )\n  // Execute the transaction.\n  .exec();\n```\n\n[build-img]: https://github.com/rubilmax/executooor/actions/workflows/release.yml/badge.svg\n[build-url]: https://github.com/rubilmax/executooor/actions/workflows/release.yml\n[downloads-img]: https://img.shields.io/npm/dt/executooor\n[downloads-url]: https://www.npmtrends.com/executooor\n[npm-img]: https://img.shields.io/npm/v/executooor\n[npm-url]: https://www.npmjs.com/package/executooor\n[issues-img]: https://img.shields.io/github/issues/rubilmax/executooor\n[issues-url]: https://github.com/rubilmax/executooor/issues\n[codecov-img]: https://codecov.io/gh/rubilmax/executooor/branch/main/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/rubilmax/executooor\n[semantic-release-img]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-release-url]: https://github.com/semantic-release/semantic-release\n[commitizen-img]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg\n[commitizen-url]: http://commitizen.github.io/cz-cli/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubilmax%2Fexecutooor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubilmax%2Fexecutooor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubilmax%2Fexecutooor/lists"}