Skip to content

Commit

Permalink
Merge pull request #66 from etherspot/deploy-verifying-paymaster-amoy
Browse files Browse the repository at this point in the history
Deploy verifying paymaster on all testnets
  • Loading branch information
vignesha22 authored Jul 17, 2024
2 parents 1155270 + 579d6c0 commit 4a880f3
Show file tree
Hide file tree
Showing 108 changed files with 35,502 additions and 6,647 deletions.
1 change: 1 addition & 0 deletions DEPLOYMENTS_V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
| `EtherspotPaymaster` | `amoy` | [0xe893a26dd53b325bffaacdfa224692eff4c448c4](https://amoy.polygonscan.com/address/0xe893a26dd53b325bffaacdfa224692eff4c448c4) | [0xbeaae5a3520605de76da30361995e5ad8259508710487990e265009edd989d6b](https://amoy.polygonscan.com/tx/0xbeaae5a3520605de76da30361995e5ad8259508710487990e265009edd989d6b) |
| `EtherspotWalletFactory` | `amoy` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://amoy.polygonscan.com/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0x8954d09fa131c25ad57b8a2ff15aeb95e3e2a913cbd83da2826e4a92955360dc](https://amoy.polygonscan.com/tx/0x8954d09fa131c25ad57b8a2ff15aeb95e3e2a913cbd83da2826e4a92955360dc) |
| `EtherspotWallet` | `amoy` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://amoy.polygonscan.com/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0x97d5701a5bb2c54a52488ce5ce1f10c16b09e671b613cc509079ba63cec9604a](https://amoy.polygonscan.com/tx/0x97d5701a5bb2c54a52488ce5ce1f10c16b09e671b613cc509079ba63cec9604a) |
| `VerifyingPaymaster` | `amoy` | [0x810FA4C915015b703db0878CF2B9344bEB254a40](https://amoy.polygonscan.com/address/0x810FA4C915015b703db0878CF2B9344bEB254a40) | [0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42](https://amoy.polygonscan.com/tx/0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42) |
| `EtherspotPaymaster` | `mantleSepolia` | [0x8350355c08aDAC387b443782124A30A8942BeC2e](https://explorer.sepolia.mantle.xyz/address/0x8350355c08aDAC387b443782124A30A8942BeC2e) | [0x79da570441a5f8afdc8bec2fe82bb3688063dc7bfbbfd013f84f0d8b62ba3e02](https://explorer.sepolia.mantle.xyz/tx/0x79da570441a5f8afdc8bec2fe82bb3688063dc7bfbbfd013f84f0d8b62ba3e02) |
| `EtherspotWalletFactory` | `mantleSepolia` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://explorer.sepolia.mantle.xyz/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0x3174798d23f4ba38e90d42400b14886278d2a4027af12f802813477b765f2cad](https://explorer.sepolia.mantle.xyz/tx/0x3174798d23f4ba38e90d42400b14886278d2a4027af12f802813477b765f2cad) |
| `EtherspotWallet` | `mantleSepolia` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20]() | [0x1b3172f91340874c9878e9ab9c191fadb4090a33c27536f2c338542195735e9a](https://explorer.sepolia.mantle.xyz/tx/0x1b3172f91340874c9878e9ab9c191fadb4090a33c27536f2c338542195735e9a) |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/11e946ee2480cfa4c23fb74059dc998f.json"
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json"
}
5 changes: 5 additions & 0 deletions config/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ const networks: HardhatUserConfig['networks'] = {
url: 'https://rpc-amoy.polygon.technology',
accounts: [process.env.DEPLOYER_PRIVATE_KEY!],
},
xdcApothem: {
chainId: 51,
url: 'https://rpc.apothem.network',
accounts: [process.env.DEPLOYER_PRIVATE_KEY!],
},
dev: { url: 'http://localhost:8545' },
};
export default networks;
60 changes: 60 additions & 0 deletions deploy/010_deploy_verifying_paymaster.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { ethers } from 'ethers';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';

const deployVerifyingPaymaster: DeployFunction = async function (
hre: HardhatRuntimeEnvironment
) {
const { deployments, getNamedAccounts } = hre;
const { deploy, execute } = deployments;
const { from } = await getNamedAccounts();

console.log('starting deployment of verifying paymaster...');

const entrypoint = '0x0000000071727De22E5E9d8BAf0edAc6f37da032';
const verifyingSigner = '0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567';
const ret = await deploy('VerifyingPaymaster', {
from,
args: [entrypoint, verifyingSigner],
gasLimit: 6e6,
// gasLimit: 1000000000, // arbitrum
// gasLimit: 10000000, // baseGoerli
// gasLimit: 20000000, // kromaSepolia
log: true,
});
console.log('VerifyingPaymaster deployed at:', ret.address);

console.log('staking paymaster with entry point...');

await execute(
'VerifyingPaymaster',
{
from,
value: await ethers.utils.parseEther('0.01'),
log: true,
gasLimit: 6e6,
},
'addStake',
1
);

await execute(
'VerifyingPaymaster',
{
from,
value: await ethers.utils.parseEther('100'),
log: true,
gasLimit: 6e6,
},
'deposit'
);
console.log('Done!');
};

deployVerifyingPaymaster.tags = [
'aa-4337',
'deploy-verifying-paymaster',
'required',
];

module.exports = deployVerifyingPaymaster;
23 changes: 23 additions & 0 deletions deploy/011_verify_verifying_signer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';

const verifyVerifyingPaymaster: DeployFunction = async function (
hre: HardhatRuntimeEnvironment
) {
const PAYMASTER_ADDRESS = ''; // Add deployed paymaster address to verify
const ENTRY_POINT_ADDRESS = '0x0000000071727De22E5E9d8BAf0edAc6f37da032';
const VERIFYING_SIGNER_ADDRESS = '';

console.log('starting verification...');

await hre.run('verify:verify', {
address: PAYMASTER_ADDRESS,
contract:
'src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster',
constructorArguments: [ENTRY_POINT_ADDRESS, VERIFYING_SIGNER_ADDRESS],
});
};

verifyVerifyingPaymaster.tags = ['aa-4337', 'verify-verifying-paymaster'];

export default verifyVerifyingPaymaster;
Loading

0 comments on commit 4a880f3

Please sign in to comment.