From 1d7119d6ce79ab898315fec7d42da56a0c394361 Mon Sep 17 00:00:00 2001 From: Mikhail <16622558+mmv08@users.noreply.github.com> Date: Tue, 28 May 2024 15:38:40 +0200 Subject: [PATCH] add pimlico verifying paymaster detailed results --- examples/4337-gas-metering/README.md | 34 +++++++++---------- examples/4337-gas-metering/tsconfig.json | 2 +- .../4337-gas-metering/utils/nativeTransfer.ts | 4 +-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/4337-gas-metering/README.md b/examples/4337-gas-metering/README.md index 2e7df35e..9e79a114 100644 --- a/examples/4337-gas-metering/README.md +++ b/examples/4337-gas-metering/README.md @@ -10,14 +10,14 @@ NOTE: If you run a paymaster analysis twice or more without changing the salt fo ## Gas Usage Results -| | **With 4337?** | **Account Creation** | **Account Creation + Native Transfer** | **Native Transfer** | **Account Creation + ERC20 Transfer** | **ERC20 Transfer** | **Account Creation + ERC721 Minting** | **ERC721 Minting** | -|:----------------------------------------------------------------:|:--------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| **[Without Paymaster](../../modules/4337/test/gas/Gas.spec.ts)** | Yes | 415213 | 447632 | 182081 | 426139 | 160575 | 467926 | 202374 | -| **Gelato (4337 Compatible - 1Balance)** | No | 302679 ([TX](https://sepolia.basescan.org/tx/0x1b2f743dff63dfc6e01e18623cb8d692d4a1cf206008358fac3eaf8fd5957c91)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x1b2f743dff63dfc6e01e18623cb8d692d4a1cf206008358fac3eaf8fd5957c91/gas-usage)) | 313228 ([TX](https://sepolia.basescan.org/tx/0xddbd655b8a11cf043c535c2d6dbe14aa82925d444a0d4bb5378670993ad1862c)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0xddbd655b8a11cf043c535c2d6dbe14aa82925d444a0d4bb5378670993ad1862c/gas-usage)) | 83930 ([TX](https://sepolia.basescan.org/tx/0x162b8817fe9cbbccb905c4b51cc25cbf2625afa1e5341087a4e79b9bb6834fc6)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x162b8817fe9cbbccb905c4b51cc25cbf2625afa1e5341087a4e79b9bb6834fc6/gas-usage)) | 315961 ([TX](https://sepolia.basescan.org/tx/0x1043acb58c89667d26360f23532d6eee4ab927b20ba37035fb3ffb8cc71c224b)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x1043acb58c89667d26360f23532d6eee4ab927b20ba37035fb3ffb8cc71c224b/gas-usage)) | 86852 ([TX](https://sepolia.basescan.org/tx/0x6c6ccadea5e54aa47b36c603132b315f1cf15e75e96c0376a7c76ae48f69a006)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x6c6ccadea5e54aa47b36c603132b315f1cf15e75e96c0376a7c76ae48f69a006/gas-usage)) | 345284 ([TX](https://sepolia.basescan.org/tx/0xd49b482ff37f07f12fc1688a2af33b4451d63409fe547f9cf2e660422866da3e)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0xd49b482ff37f07f12fc1688a2af33b4451d63409fe547f9cf2e660422866da3e/gas-usage)) | 116159 ([TX](https://sepolia.basescan.org/tx/0x5814be99c937b6e7386f3526fe9f11fc1bf7a21180daf66ee2e44cc1e4d0da3d)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x5814be99c937b6e7386f3526fe9f11fc1bf7a21180daf66ee2e44cc1e4d0da3d/gas-usage)) | -| **Pimlico (USDC Paymaster)** | Yes | 506573 ([TX](https://mumbai.polygonscan.com/tx/0x3c6284e4df1686d699d2bc4cca04a25ecc76d68a73665ca53d466e6bd6bedf28)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x3c6284e4df1686d699d2bc4cca04a25ecc76d68a73665ca53d466e6bd6bedf28/gas-usage)) | 511055 ([TX](https://mumbai.polygonscan.com/tx/0x8bc4e42b076d22e0fc3418eba40c65caab6e3a10c1fbb10cbeee4a7fbfa8b4b3)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x8bc4e42b076d22e0fc3418eba40c65caab6e3a10c1fbb10cbeee4a7fbfa8b4b3/gas-usage)) | 199262 ([TX](https://mumbai.polygonscan.com/tx/0x46cdfc14649087609f69411fc41f5feb4dc23a6ea9255928b932841858e5f186)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x46cdfc14649087609f69411fc41f5feb4dc23a6ea9255928b932841858e5f186/gas-usage)) | 514156 ([TX](https://mumbai.polygonscan.com/tx/0xa5cf461800341c2e9934608ff55aeda26d1a3e7da4f5bc9f3cce3fd185409623)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xa5cf461800341c2e9934608ff55aeda26d1a3e7da4f5bc9f3cce3fd185409623/gas-usage)) | 202387 ([TX](https://mumbai.polygonscan.com/tx/0xdc21ae13dc92eb48851fa62f57c74f3a0085acf81343d9aaaa14fcc3c6911f91)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xdc21ae13dc92eb48851fa62f57c74f3a0085acf81343d9aaaa14fcc3c6911f91/gas-usage)) | 543411 ([TX](https://mumbai.polygonscan.com/tx/0xcd6c137474be4f002822498e032ad9b78b0505bd4db495ee65fc602ec1a7f006)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xcd6c137474be4f002822498e032ad9b78b0505bd4db495ee65fc602ec1a7f006/gas-usage)) | 231619 ([TX](https://mumbai.polygonscan.com/tx/0x31732175d3f3b35c9c2a38e841bcd485085edf79e7f3c532ec7997c4993c0192)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x31732175d3f3b35c9c2a38e841bcd485085edf79e7f3c532ec7997c4993c0192/gas-usage)) | -| **Pimlico (MATIC - Gas Policy)** | Yes | 448172 ([TX](https://mumbai.polygonscan.com/tx/0xd51d026ecfa6dbafa8aac8a138badc6e3b397683117878e360bae9051a3b733a)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xd51d026ecfa6dbafa8aac8a138badc6e3b397683117878e360bae9051a3b733a/gas-usage)) | 455615 ([TX](https://mumbai.polygonscan.com/tx/0xdd966b95b6625be33ae37f6c5bb1ad33798afbbd899089acad1180005d0637c4)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xdd966b95b6625be33ae37f6c5bb1ad33798afbbd899089acad1180005d0637c4/gas-usage)) | 123064 ([TX](https://mumbai.polygonscan.com/tx/0xca2e41e24c6206011fe0d932f27a2786c7d9486c93f63d96c131c5007e2b275e)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xca2e41e24c6206011fe0d932f27a2786c7d9486c93f63d96c131c5007e2b275e/gas-usage)) | 459014 ([TX](https://mumbai.polygonscan.com/tx/0xbd4c79d876ae928bbc721501029b01dbc5fc94d91d6299f548f19289f7c1c271)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xbd4c79d876ae928bbc721501029b01dbc5fc94d91d6299f548f19289f7c1c271/gas-usage)) | 126461 ([TX](https://mumbai.polygonscan.com/tx/0xd2b130bc2f26cfe43041f7102601425674e2cd22a6b74672b907b28e70686496)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xd2b130bc2f26cfe43041f7102601425674e2cd22a6b74672b907b28e70686496/gas-usage)) | 488186 ([TX](https://mumbai.polygonscan.com/tx/0x454a3a5a39432f7b01a70fcddfef948d20c70d2d719aea30d402d693447fa535)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x454a3a5a39432f7b01a70fcddfef948d20c70d2d719aea30d402d693447fa535/gas-usage)) | 155645 ([TX](https://mumbai.polygonscan.com/tx/0xa148a4938de9883b2fbcd512e3c7161e78ca695843b6e535fdb5054b88872652)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xa148a4938de9883b2fbcd512e3c7161e78ca695843b6e535fdb5054b88872652/gas-usage)) | -| **Alchemy (ETH from Safe)** | Yes | 417074 ([TX](https://sepolia.etherscan.io/tx/0x03c507f5dc14c6b6af04c5ad722f0650d86925837d9889e4972cb087e34d7b88)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x03c507f5dc14c6b6af04c5ad722f0650d86925837d9889e4972cb087e34d7b88/gas-usage)) | 424505 ([TX](https://sepolia.etherscan.io/tx/0x0263331d8d4568c08d4a700385c08062ee0342fe6f65b2c7eb1a194ddec23ec2)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x0263331d8d4568c08d4a700385c08062ee0342fe6f65b2c7eb1a194ddec23ec2/gas-usage)) | 107057 ([TX](https://sepolia.etherscan.io/tx/0xf4e38d9f3535dcb9519ca3527734a5ea611a0d1bafb632051736537853eb502b)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xf4e38d9f3535dcb9519ca3527734a5ea611a0d1bafb632051736537853eb502b/gas-usage)) | 427599 ([TX](https://sepolia.etherscan.io/tx/0x794b02531f14b6c432c0dcf08d1cb76a8693dd75b35c5dde0d4547754d208143)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x794b02531f14b6c432c0dcf08d1cb76a8693dd75b35c5dde0d4547754d208143/gas-usage)) | 110174 ([TX](https://sepolia.etherscan.io/tx/0xb56985ee07b1e7931aedc387698620d890c99992c4c688b8b3a150f355089e5d)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xb56985ee07b1e7931aedc387698620d890c99992c4c688b8b3a150f355089e5d/gas-usage)) | 456870 ([TX](https://sepolia.etherscan.io/tx/0x2d2a0c8215821f0aa9cf8f88175aa8256cdca1a2928f2aa667916e5127f5dcb6)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x2d2a0c8215821f0aa9cf8f88175aa8256cdca1a2928f2aa667916e5127f5dcb6/gas-usage)) | 139420 ([TX](https://sepolia.etherscan.io/tx/0x178d2c16a261dcb49e810bf39ce35cf96cbab8c7d3235709c7164ba6193c716e)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x178d2c16a261dcb49e810bf39ce35cf96cbab8c7d3235709c7164ba6193c716e/gas-usage)) | -| **Alchemy (ETH - Gas Policy)** | Yes | 411372 ([TX](https://sepolia.etherscan.io/tx/0xcbb2c3c49b9d72d9ecf692308d69a8ad797ab5b1c6603f4fad989f966d692af1)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xcbb2c3c49b9d72d9ecf692308d69a8ad797ab5b1c6603f4fad989f966d692af1/gas-usage)) | 418779 ([TX](https://sepolia.etherscan.io/tx/0x49fbedf833cfecf9db7de56c61d4227292723115520600dbc3711da5e6a85672)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x49fbedf833cfecf9db7de56c61d4227292723115520600dbc3711da5e6a85672/gas-usage)) | 130202 ([TX](https://sepolia.etherscan.io/tx/0x35f1e5b04d988e4614a17609190b3e21b0a9892f78da9f400248cfb3b5afde9a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x35f1e5b04d988e4614a17609190b3e21b0a9892f78da9f400248cfb3b5afde9a/gas-usage)) | 421926 ([TX](https://sepolia.etherscan.io/tx/0x7dda913ae986d49c4322f414102ae374441a40adb4b33727e568ba140904d52a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x7dda913ae986d49c4322f414102ae374441a40adb4b33727e568ba140904d52a/gas-usage)) | 133394 ([TX](https://sepolia.etherscan.io/tx/0xe34902ebd5377cac04c47d142f6ca2de558df63a7e0c6541f704df651b7cfcb1)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xe34902ebd5377cac04c47d142f6ca2de558df63a7e0c6541f704df651b7cfcb1/gas-usage)) | 451200 ([TX](https://sepolia.etherscan.io/tx/0xb1253508bc4ca5ce41222b15b0e7bf03b2273bcb09d93e1d6d6a5ea39b43ee84)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xb1253508bc4ca5ce41222b15b0e7bf03b2273bcb09d93e1d6d6a5ea39b43ee84/gas-usage)) | 162654 ([TX](https://sepolia.etherscan.io/tx/0xd13fb70626a26aaa02e0389cd9347c1c0d8d8ed9ee794a61c5d3eea4b36e239a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xd13fb70626a26aaa02e0389cd9347c1c0d8d8ed9ee794a61c5d3eea4b36e239a/gas-usage)) | +| | **With 4337?** | **Account Creation** | **Account Creation + Native Transfer** | **Native Transfer** | **Account Creation + ERC20 Transfer** | **ERC20 Transfer** | **Account Creation + ERC721 Minting** | **ERC721 Minting** | +| ---------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **[Without Paymaster](../../modules/4337/test/gas/Gas.spec.ts)** | Yes | 415213 | 447632 | 182081 | 426139 | 160575 | 467926 | 202374 | +| **Gelato (4337 Compatible - 1Balance)** | No | 302679 ([TX](https://sepolia.basescan.org/tx/0x1b2f743dff63dfc6e01e18623cb8d692d4a1cf206008358fac3eaf8fd5957c91)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x1b2f743dff63dfc6e01e18623cb8d692d4a1cf206008358fac3eaf8fd5957c91/gas-usage)) | 313228 ([TX](https://sepolia.basescan.org/tx/0xddbd655b8a11cf043c535c2d6dbe14aa82925d444a0d4bb5378670993ad1862c)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0xddbd655b8a11cf043c535c2d6dbe14aa82925d444a0d4bb5378670993ad1862c/gas-usage)) | 83930 ([TX](https://sepolia.basescan.org/tx/0x162b8817fe9cbbccb905c4b51cc25cbf2625afa1e5341087a4e79b9bb6834fc6)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x162b8817fe9cbbccb905c4b51cc25cbf2625afa1e5341087a4e79b9bb6834fc6/gas-usage)) | 315961 ([TX](https://sepolia.basescan.org/tx/0x1043acb58c89667d26360f23532d6eee4ab927b20ba37035fb3ffb8cc71c224b)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x1043acb58c89667d26360f23532d6eee4ab927b20ba37035fb3ffb8cc71c224b/gas-usage)) | 86852 ([TX](https://sepolia.basescan.org/tx/0x6c6ccadea5e54aa47b36c603132b315f1cf15e75e96c0376a7c76ae48f69a006)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x6c6ccadea5e54aa47b36c603132b315f1cf15e75e96c0376a7c76ae48f69a006/gas-usage)) | 345284 ([TX](https://sepolia.basescan.org/tx/0xd49b482ff37f07f12fc1688a2af33b4451d63409fe547f9cf2e660422866da3e)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0xd49b482ff37f07f12fc1688a2af33b4451d63409fe547f9cf2e660422866da3e/gas-usage)) | 116159 ([TX](https://sepolia.basescan.org/tx/0x5814be99c937b6e7386f3526fe9f11fc1bf7a21180daf66ee2e44cc1e4d0da3d)) ([Gas](https://dashboard.tenderly.co/tx/base-sepolia/0x5814be99c937b6e7386f3526fe9f11fc1bf7a21180daf66ee2e44cc1e4d0da3d/gas-usage)) | +| **Pimlico (USDC Paymaster)** | Yes | 506573 ([TX](https://mumbai.polygonscan.com/tx/0x3c6284e4df1686d699d2bc4cca04a25ecc76d68a73665ca53d466e6bd6bedf28)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x3c6284e4df1686d699d2bc4cca04a25ecc76d68a73665ca53d466e6bd6bedf28/gas-usage)) | 511055 ([TX](https://mumbai.polygonscan.com/tx/0x8bc4e42b076d22e0fc3418eba40c65caab6e3a10c1fbb10cbeee4a7fbfa8b4b3)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x8bc4e42b076d22e0fc3418eba40c65caab6e3a10c1fbb10cbeee4a7fbfa8b4b3/gas-usage)) | 199262 ([TX](https://mumbai.polygonscan.com/tx/0x46cdfc14649087609f69411fc41f5feb4dc23a6ea9255928b932841858e5f186)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x46cdfc14649087609f69411fc41f5feb4dc23a6ea9255928b932841858e5f186/gas-usage)) | 514156 ([TX](https://mumbai.polygonscan.com/tx/0xa5cf461800341c2e9934608ff55aeda26d1a3e7da4f5bc9f3cce3fd185409623)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xa5cf461800341c2e9934608ff55aeda26d1a3e7da4f5bc9f3cce3fd185409623/gas-usage)) | 202387 ([TX](https://mumbai.polygonscan.com/tx/0xdc21ae13dc92eb48851fa62f57c74f3a0085acf81343d9aaaa14fcc3c6911f91)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xdc21ae13dc92eb48851fa62f57c74f3a0085acf81343d9aaaa14fcc3c6911f91/gas-usage)) | 543411 ([TX](https://mumbai.polygonscan.com/tx/0xcd6c137474be4f002822498e032ad9b78b0505bd4db495ee65fc602ec1a7f006)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xcd6c137474be4f002822498e032ad9b78b0505bd4db495ee65fc602ec1a7f006/gas-usage)) | 231619 ([TX](https://mumbai.polygonscan.com/tx/0x31732175d3f3b35c9c2a38e841bcd485085edf79e7f3c532ec7997c4993c0192)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x31732175d3f3b35c9c2a38e841bcd485085edf79e7f3c532ec7997c4993c0192/gas-usage)) | +| **Pimlico (MATIC - Gas Policy)** | Yes | 448172 ([TX](https://mumbai.polygonscan.com/tx/0xd51d026ecfa6dbafa8aac8a138badc6e3b397683117878e360bae9051a3b733a)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xd51d026ecfa6dbafa8aac8a138badc6e3b397683117878e360bae9051a3b733a/gas-usage)) | 455615 ([TX](https://mumbai.polygonscan.com/tx/0xdd966b95b6625be33ae37f6c5bb1ad33798afbbd899089acad1180005d0637c4)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xdd966b95b6625be33ae37f6c5bb1ad33798afbbd899089acad1180005d0637c4/gas-usage)) | 123064 ([TX](https://mumbai.polygonscan.com/tx/0xca2e41e24c6206011fe0d932f27a2786c7d9486c93f63d96c131c5007e2b275e)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xca2e41e24c6206011fe0d932f27a2786c7d9486c93f63d96c131c5007e2b275e/gas-usage)) | 459014 ([TX](https://mumbai.polygonscan.com/tx/0xbd4c79d876ae928bbc721501029b01dbc5fc94d91d6299f548f19289f7c1c271)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xbd4c79d876ae928bbc721501029b01dbc5fc94d91d6299f548f19289f7c1c271/gas-usage)) | 126461 ([TX](https://mumbai.polygonscan.com/tx/0xd2b130bc2f26cfe43041f7102601425674e2cd22a6b74672b907b28e70686496)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xd2b130bc2f26cfe43041f7102601425674e2cd22a6b74672b907b28e70686496/gas-usage)) | 488186 ([TX](https://mumbai.polygonscan.com/tx/0x454a3a5a39432f7b01a70fcddfef948d20c70d2d719aea30d402d693447fa535)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0x454a3a5a39432f7b01a70fcddfef948d20c70d2d719aea30d402d693447fa535/gas-usage)) | 155645 ([TX](https://mumbai.polygonscan.com/tx/0xa148a4938de9883b2fbcd512e3c7161e78ca695843b6e535fdb5054b88872652)) ([Gas](https://dashboard.tenderly.co/tx/mumbai/0xa148a4938de9883b2fbcd512e3c7161e78ca695843b6e535fdb5054b88872652/gas-usage)) | +| **Alchemy (ETH from Safe)** | Yes | 417074 ([TX](https://sepolia.etherscan.io/tx/0x03c507f5dc14c6b6af04c5ad722f0650d86925837d9889e4972cb087e34d7b88)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x03c507f5dc14c6b6af04c5ad722f0650d86925837d9889e4972cb087e34d7b88/gas-usage)) | 424505 ([TX](https://sepolia.etherscan.io/tx/0x0263331d8d4568c08d4a700385c08062ee0342fe6f65b2c7eb1a194ddec23ec2)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x0263331d8d4568c08d4a700385c08062ee0342fe6f65b2c7eb1a194ddec23ec2/gas-usage)) | 107057 ([TX](https://sepolia.etherscan.io/tx/0xf4e38d9f3535dcb9519ca3527734a5ea611a0d1bafb632051736537853eb502b)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xf4e38d9f3535dcb9519ca3527734a5ea611a0d1bafb632051736537853eb502b/gas-usage)) | 427599 ([TX](https://sepolia.etherscan.io/tx/0x794b02531f14b6c432c0dcf08d1cb76a8693dd75b35c5dde0d4547754d208143)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x794b02531f14b6c432c0dcf08d1cb76a8693dd75b35c5dde0d4547754d208143/gas-usage)) | 110174 ([TX](https://sepolia.etherscan.io/tx/0xb56985ee07b1e7931aedc387698620d890c99992c4c688b8b3a150f355089e5d)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xb56985ee07b1e7931aedc387698620d890c99992c4c688b8b3a150f355089e5d/gas-usage)) | 456870 ([TX](https://sepolia.etherscan.io/tx/0x2d2a0c8215821f0aa9cf8f88175aa8256cdca1a2928f2aa667916e5127f5dcb6)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x2d2a0c8215821f0aa9cf8f88175aa8256cdca1a2928f2aa667916e5127f5dcb6/gas-usage)) | 139420 ([TX](https://sepolia.etherscan.io/tx/0x178d2c16a261dcb49e810bf39ce35cf96cbab8c7d3235709c7164ba6193c716e)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x178d2c16a261dcb49e810bf39ce35cf96cbab8c7d3235709c7164ba6193c716e/gas-usage)) | +| **Alchemy (ETH - Gas Policy)** | Yes | 411372 ([TX](https://sepolia.etherscan.io/tx/0xcbb2c3c49b9d72d9ecf692308d69a8ad797ab5b1c6603f4fad989f966d692af1)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xcbb2c3c49b9d72d9ecf692308d69a8ad797ab5b1c6603f4fad989f966d692af1/gas-usage)) | 418779 ([TX](https://sepolia.etherscan.io/tx/0x49fbedf833cfecf9db7de56c61d4227292723115520600dbc3711da5e6a85672)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x49fbedf833cfecf9db7de56c61d4227292723115520600dbc3711da5e6a85672/gas-usage)) | 130202 ([TX](https://sepolia.etherscan.io/tx/0x35f1e5b04d988e4614a17609190b3e21b0a9892f78da9f400248cfb3b5afde9a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x35f1e5b04d988e4614a17609190b3e21b0a9892f78da9f400248cfb3b5afde9a/gas-usage)) | 421926 ([TX](https://sepolia.etherscan.io/tx/0x7dda913ae986d49c4322f414102ae374441a40adb4b33727e568ba140904d52a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0x7dda913ae986d49c4322f414102ae374441a40adb4b33727e568ba140904d52a/gas-usage)) | 133394 ([TX](https://sepolia.etherscan.io/tx/0xe34902ebd5377cac04c47d142f6ca2de558df63a7e0c6541f704df651b7cfcb1)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xe34902ebd5377cac04c47d142f6ca2de558df63a7e0c6541f704df651b7cfcb1/gas-usage)) | 451200 ([TX](https://sepolia.etherscan.io/tx/0xb1253508bc4ca5ce41222b15b0e7bf03b2273bcb09d93e1d6d6a5ea39b43ee84)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xb1253508bc4ca5ce41222b15b0e7bf03b2273bcb09d93e1d6d6a5ea39b43ee84/gas-usage)) | 162654 ([TX](https://sepolia.etherscan.io/tx/0xd13fb70626a26aaa02e0389cd9347c1c0d8d8ed9ee794a61c5d3eea4b36e239a)) ([Gas](https://dashboard.tenderly.co/tx/sepolia/0xd13fb70626a26aaa02e0389cd9347c1c0d8d8ed9ee794a61c5d3eea4b36e239a/gas-usage)) | ## Detailed Individual Gas Usage Results @@ -35,15 +35,15 @@ NOTE: If you run a paymaster analysis twice or more without changing the salt fo ### Pimlico (Sepolia - Verifying Paymaster) -| Type | Actual Gas | handleOps | \_createSenderIfNeeded | Safe Proxy Factory | ValidateUserOp (Safe) | \_executeUserOp | executeUserOp (Safe) | execTransactionFromModule | -|------------------------------------|------------|-----------|------------------------|--------------------|-----------------------|-----------------|----------------------|---------------------------| -| Account Creation | 414071 | 415716 | 321217 | 307459 | 15100 | 14932 | 7015 | 4411 | -| Account Creation + Native Transfer | 421350 | 423087 | 321217 | 307459 | 15100 | 22303 | 14386 | 11782 | -| Native Transfer | 137723 | 97540 | NA | NA | 20588 | 24306 | 16386 | 13782 | -| Account Creation + ERC20 Transfer | 446477 | 430566 | 321236 | 307459 | 15146 | 29378 | 21415 | 18550 | -| ERC20 Transfer | 145721 | 105017 | NA | NA | 20633 | 31382 | 23415 | 20550 | -| Account Creation + ERC721 Minting | 470905 | 455150 | 321229 | 307459 | 15130 | 54097 | 46150 | 43373 | -| ERC721 Minting | 170150 | 129601 | NA | NA | 20618 | 56100 | 48150 | 45373 | +| Type | Actual Gas | handleOps | \_createSenderIfNeeded | Safe Proxy Factory | ValidateUserOp (Safe) | \_executeUserOp | executeUserOp (Safe) | execTransactionFromModule | +| ---------------------------------- | ---------- | --------- | ---------------------------- | ------------------ | --------------------- | --------------- | -------------------- | ------------------------- | +| Account Creation | 414071 | 366053 | Wasn't included in the trace | 264042 | 11771 | 14542 | 6424 | 4411 | +| Account Creation + Native Transfer | 421350 | 373424 | Wasn't included in the trace | 264042 | 11771 | 21913 | 13795 | 11782 | +| Native Transfer | 137723 | 94935 | NA | NA | 15572 | 23930 | 15795 | 13782 | +| Account Creation + ERC20 Transfer | 446477 | 397746 | Wasn't included in the trace | 264042 | 11798 | 46088 | 37906 | 35650 | +| ERC20 Transfer | 145721 | 102154 | NA | NA | 15599 | 31004 | 22806 | 20550 | +| Account Creation + ERC721 Minting | 470905 | 422417 | Wasn't included in the trace | 264042 | 11789 | 70808 | 62647 | 60473 | +| ERC721 Minting | 170150 | 126826 | NA | NA | 15590 | 55724 | 47547 | 45373 | ### Alchemy (ETH from Safe) diff --git a/examples/4337-gas-metering/tsconfig.json b/examples/4337-gas-metering/tsconfig.json index c8ec2788..6c0acdc2 100644 --- a/examples/4337-gas-metering/tsconfig.json +++ b/examples/4337-gas-metering/tsconfig.json @@ -16,5 +16,5 @@ "noImplicitReturns": true /* Report error when not all code paths in function return a value. */ }, "include": ["./alchemy/**/*", "./gelato/**/*", "./pimlico/**/*", "./utils/**/*"], - "exclude": ["node_modules"] + "exclude": ["node_modules"] } diff --git a/examples/4337-gas-metering/utils/nativeTransfer.ts b/examples/4337-gas-metering/utils/nativeTransfer.ts index 1590d4f0..be4d2f62 100644 --- a/examples/4337-gas-metering/utils/nativeTransfer.ts +++ b/examples/4337-gas-metering/utils/nativeTransfer.ts @@ -1,5 +1,5 @@ import dotenv from 'dotenv' -import { http, createWalletClient, PrivateKeyAccount, Address, WalletClient, HttpTransport, Chain, Account } from 'viem' +import { http, createWalletClient, PrivateKeyAccount, Address, WalletClient, HttpTransport, Chain, Account, PublicClient } from 'viem' import { baseSepolia, goerli, sepolia } from 'viem/chains' import { setTimeout } from 'timers/promises' @@ -9,7 +9,7 @@ const alchemyRPCURL = process.env.ALCHEMY_RPC_URL const gelatoRPCURL = process.env.GELATO_RPC_URL export const transferETH = async ( - publicClient: any, + publicClient: PublicClient, signer: PrivateKeyAccount, receiver: Address, amount: bigint,