Skip to content

Commit 9cdf6dc

Browse files
feat: Deployed and Verified SponsorPaymaster on Testnet (#2)
## Summary Deployed and verified SponsorPaymaster on arb sepolia, eth sepolia, and matic amoy. ## Detail ### Changeset - Created deployment script - Created cmd for future deployments - Saved solidity input json for future verifications - Deployed using script and cmd - Verified all proxies and implementations ### Checklist - [x] Did you add new tests and confirm all tests pass? (`yarn test`) - [x] Did you update relevant docs? (docs are found in the `docs` folder) - [x] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`) - [x] Did you run lint (`yarn lint`) and fix any issues? - [x] Did you run formatter (`yarn format:check`) and fix any issues (`yarn format:write`)? ## Testing Deployment. No testing needed.
1 parent 1d2d26c commit 9cdf6dc

File tree

10 files changed

+327
-0
lines changed

10 files changed

+327
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- This chain used cast send to deploy so there's no corresponding run json
2+
- Ran command in `script/cmd/DeploySponsorPaymaster` and `script/cmd/DeploySponsorPaymasterProxy`
3+
- tx hash: 0x491d547fd404d78e1dbc5205942ea9b404c99b8443d7538fc1c114900007b8db, 0x916f34178d7a8522a932c46c4e0829c4210058969be0f7a2837d4fa1c4784763

broadcast/012_DeploySponsorPaymaster.s.sol/421614/run-1727119759.json

Lines changed: 65 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
5+
"transactionType": "CREATE2",
6+
"contractName": "ERC1967Proxy",
7+
"contractAddress": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
8+
"function": null,
9+
"arguments": [
10+
"0x36058Cc257967db1912FC276F9CBEC072CD572cb",
11+
"0x946d92040000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000"
12+
],
13+
"transaction": {
14+
"from": "0x74cbcd3857aab24977b6ab6212f34eb381fcd976",
15+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
16+
"gas": "0x43eff",
17+
"value": "0x0",
18+
"input": "0x000000000000000000000000000000000000000000000000000000000000000060806040526102d38038038061001481610194565b92833981019060408183031261018f5780516001600160a01b03811680820361018f5760208381015190936001600160401b03821161018f570184601f8201121561018f5780519061006d610068836101cf565b610194565b9582875285838301011161018f57849060005b83811061017b57505060009186010152813b15610163577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03191682179055604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28351156101455750600080848461012c96519101845af4903d1561013c573d61011c610068826101cf565b908152600081943d92013e6101ea565b505b6040516085908161024e8239f35b606092506101ea565b9250505034610154575061012e565b63b398979f60e01b8152600490fd5b60249060405190634c9c8ce360e01b82526004820152fd5b818101830151888201840152869201610080565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101b957601f01601f191660200190565b9061021157508051156101ff57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610244575b610222575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561021a56fe60806040527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e15604b573d90f35b3d90fdfea26469706673582212202b867e05fada64e8389ea34fca4e9048d8dde9af33f4fdd783dd16f9ba5fcf9c64736f6c6343000818003300000000000000000000000036058cc257967db1912fc276f9cbec072cd572cb00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064946d92040000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
19+
"nonce": "0x5",
20+
"chainId": "0x66eee"
21+
},
22+
"additionalContracts": [],
23+
"isFixedGasLimit": false
24+
}
25+
],
26+
"receipts": [
27+
{
28+
"status": "0x1",
29+
"cumulativeGasUsed": "0x3f4d3",
30+
"logs": [
31+
{
32+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
33+
"topics": [
34+
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
35+
"0x00000000000000000000000036058cc257967db1912fc276f9cbec072cd572cb"
36+
],
37+
"data": "0x",
38+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
39+
"blockNumber": "0x4f9c4c8",
40+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
41+
"transactionIndex": "0x2",
42+
"logIndex": "0x1",
43+
"removed": false
44+
},
45+
{
46+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
47+
"topics": [
48+
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
49+
"0x0000000000000000000000000000000000000000000000000000000000000000",
50+
"0x0000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc"
51+
],
52+
"data": "0x",
53+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
54+
"blockNumber": "0x4f9c4c8",
55+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
56+
"transactionIndex": "0x2",
57+
"logIndex": "0x2",
58+
"removed": false
59+
},
60+
{
61+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
62+
"topics": [
63+
"0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"
64+
],
65+
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
66+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
67+
"blockNumber": "0x4f9c4c8",
68+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
69+
"transactionIndex": "0x2",
70+
"logIndex": "0x3",
71+
"removed": false
72+
}
73+
],
74+
"logsBloom": "0x0000000000000000000000000000000040000000000000000080000040400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000200000100000000000000000400000000000000000002000000000000000000080000000000000000000000000000000040000000000000000000080000000000000000000000008000000000000000000000000000000000000000000000000400000000000000000000000000000000000000002008000000000000000000000000020000000c000000000000000020000000000008000000000000000000000000000000000000000000000000000000",
75+
"type": "0x2",
76+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
77+
"transactionIndex": "0x2",
78+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
79+
"blockNumber": "0x4f9c4c8",
80+
"gasUsed": "0x32448",
81+
"effectiveGasPrice": "0x5f5e100",
82+
"from": "0x74cbcd3857aab24977b6ab6212f34eb381fcd976",
83+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
84+
"contractAddress": null,
85+
"gasUsedForL1": "0x82fc",
86+
"l1BlockNumber": "0x66f304"
87+
}
88+
],
89+
"libraries": [],
90+
"pending": [],
91+
"returns": {},
92+
"timestamp": 1727120414,
93+
"chain": 421614,
94+
"commit": "e53fec2"
95+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
5+
"transactionType": "CREATE2",
6+
"contractName": "ERC1967Proxy",
7+
"contractAddress": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
8+
"function": null,
9+
"arguments": [
10+
"0x36058Cc257967db1912FC276F9CBEC072CD572cb",
11+
"0x946d92040000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000"
12+
],
13+
"transaction": {
14+
"from": "0x74cbcd3857aab24977b6ab6212f34eb381fcd976",
15+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
16+
"gas": "0x43eff",
17+
"value": "0x0",
18+
"input": "0x000000000000000000000000000000000000000000000000000000000000000060806040526102d38038038061001481610194565b92833981019060408183031261018f5780516001600160a01b03811680820361018f5760208381015190936001600160401b03821161018f570184601f8201121561018f5780519061006d610068836101cf565b610194565b9582875285838301011161018f57849060005b83811061017b57505060009186010152813b15610163577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03191682179055604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28351156101455750600080848461012c96519101845af4903d1561013c573d61011c610068826101cf565b908152600081943d92013e6101ea565b505b6040516085908161024e8239f35b606092506101ea565b9250505034610154575061012e565b63b398979f60e01b8152600490fd5b60249060405190634c9c8ce360e01b82526004820152fd5b818101830151888201840152869201610080565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101b957601f01601f191660200190565b9061021157508051156101ff57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610244575b610222575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561021a56fe60806040527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e15604b573d90f35b3d90fdfea26469706673582212202b867e05fada64e8389ea34fca4e9048d8dde9af33f4fdd783dd16f9ba5fcf9c64736f6c6343000818003300000000000000000000000036058cc257967db1912fc276f9cbec072cd572cb00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064946d92040000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
19+
"nonce": "0x5",
20+
"chainId": "0x66eee"
21+
},
22+
"additionalContracts": [],
23+
"isFixedGasLimit": false
24+
}
25+
],
26+
"receipts": [
27+
{
28+
"status": "0x1",
29+
"cumulativeGasUsed": "0x3f4d3",
30+
"logs": [
31+
{
32+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
33+
"topics": [
34+
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
35+
"0x00000000000000000000000036058cc257967db1912fc276f9cbec072cd572cb"
36+
],
37+
"data": "0x",
38+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
39+
"blockNumber": "0x4f9c4c8",
40+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
41+
"transactionIndex": "0x2",
42+
"logIndex": "0x1",
43+
"removed": false
44+
},
45+
{
46+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
47+
"topics": [
48+
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
49+
"0x0000000000000000000000000000000000000000000000000000000000000000",
50+
"0x0000000000000000000000007e99c7725463a858c34d0fd69a09b11fd75087cc"
51+
],
52+
"data": "0x",
53+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
54+
"blockNumber": "0x4f9c4c8",
55+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
56+
"transactionIndex": "0x2",
57+
"logIndex": "0x2",
58+
"removed": false
59+
},
60+
{
61+
"address": "0x03df76c8c30a88f424cf3cbbc36a1ca02763103b",
62+
"topics": [
63+
"0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"
64+
],
65+
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
66+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
67+
"blockNumber": "0x4f9c4c8",
68+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
69+
"transactionIndex": "0x2",
70+
"logIndex": "0x3",
71+
"removed": false
72+
}
73+
],
74+
"logsBloom": "0x0000000000000000000000000000000040000000000000000080000040400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000200000100000000000000000400000000000000000002000000000000000000080000000000000000000000000000000040000000000000000000080000000000000000000000008000000000000000000000000000000000000000000000000400000000000000000000000000000000000000002008000000000000000000000000020000000c000000000000000020000000000008000000000000000000000000000000000000000000000000000000",
75+
"type": "0x2",
76+
"transactionHash": "0x318a1a912cc7de29777cadb9b951410f96deb304500e32231e13dbcb37a1fbb3",
77+
"transactionIndex": "0x2",
78+
"blockHash": "0x0ce37c294e74f38aa98f3e00ccfee25599ca133100c96d1109fc0251e106ac43",
79+
"blockNumber": "0x4f9c4c8",
80+
"gasUsed": "0x32448",
81+
"effectiveGasPrice": "0x5f5e100",
82+
"from": "0x74cbcd3857aab24977b6ab6212f34eb381fcd976",
83+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
84+
"contractAddress": null,
85+
"gasUsedForL1": "0x82fc",
86+
"l1BlockNumber": "0x66f304"
87+
}
88+
],
89+
"libraries": [],
90+
"pending": [],
91+
"returns": {},
92+
"timestamp": 1727120414,
93+
"chain": 421614,
94+
"commit": "e53fec2"
95+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- This chain used cast send to deploy so there's no corresponding run json
2+
- Ran command in `script/cmd/DeploySponsorPaymaster` and `script/cmd/DeploySponsorPaymasterProxy`
3+
- tx hash: 0x4a6b2a5517a8c765e3edc51a4eea363eef99b8c320bcd01042cd176118a8026b, 0xbe739f09f80df75fd48805d15bfb604da724234d0c8d35008ab014643235ccc9
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright 2024 Circle Internet Group, Inc. All rights reserved.
3+
4+
* SPDX-License-Identifier: GPL-3.0-or-later
5+
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
pragma solidity 0.8.24;
20+
21+
import {SponsorPaymaster} from "../src/paymaster/v1/permissioned/SponsorPaymaster.sol";
22+
23+
import {IEntryPoint} from "@account-abstraction/contracts/interfaces/IEntryPoint.sol";
24+
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
25+
import {Script} from "forge-std/src/Script.sol";
26+
import {console} from "forge-std/src/console.sol";
27+
28+
contract DeploySponsorPaymaster is Script {
29+
// EXPECTED_PAYMASTER_ADDRESS is the expected address of the paymaster implementation contract.
30+
address payable constant EXPECTED_PAYMASTER_ADDRESS = payable(address(0x36058Cc257967db1912FC276F9CBEC072CD572cb));
31+
// EXPECTED_PAYMASTER_PROXY_ADDRESS is the expected address of the proxy to the paymaster implementation contract.
32+
address payable constant EXPECTED_PAYMASTER_PROXY_ADDRESS =
33+
payable(address(0x03dF76C8c30A88f424CF3CBBC36A1Ca02763103b));
34+
35+
function run() public {
36+
address entryPoint = vm.envAddress("ENTRY_POINT");
37+
38+
vm.startBroadcast(vm.envUint("DEPLOYER_PRIVATE_KEY"));
39+
40+
SponsorPaymaster paymaster;
41+
if (EXPECTED_PAYMASTER_ADDRESS.code.length == 0) {
42+
paymaster = new SponsorPaymaster{salt: 0}(IEntryPoint(entryPoint));
43+
} else {
44+
paymaster = SponsorPaymaster(EXPECTED_PAYMASTER_ADDRESS);
45+
}
46+
console.log("Paymaster address: %s", address(paymaster));
47+
48+
ERC1967Proxy proxy;
49+
if (EXPECTED_PAYMASTER_PROXY_ADDRESS.code.length == 0) {
50+
address[] memory verifySigners = new address[](0);
51+
address paymasterOwner = vm.envAddress("PAYMASTER_OWNER");
52+
bytes memory data = abi.encodeCall(paymaster.initialize, (paymasterOwner, verifySigners));
53+
54+
proxy = new ERC1967Proxy{salt: 0}(address(paymaster), data);
55+
} else {
56+
proxy = ERC1967Proxy(EXPECTED_PAYMASTER_PROXY_ADDRESS);
57+
}
58+
console.log("Proxy address: %s", address(proxy));
59+
60+
vm.stopBroadcast();
61+
}
62+
}

0 commit comments

Comments
 (0)