We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68f2f19 commit 33b73c8Copy full SHA for 33b73c8
script/DeployAllContracts.s.sol
@@ -119,8 +119,13 @@ contract DeployAllContracts is Script {
119
* @notice Deploy paymaster with entryPoint and backend signer (config.account)
120
*/
121
function deployPaymaster() internal {
122
- address paymasterAddress = vm.envAddress("DEPLOYED_PAYMASTER_ADDRESS");
123
-
+ address paymasterAddress;
+ try vm.envAddress("DEPLOYED_PAYMASTER_ADDRESS") returns (address addr) {
124
+ paymasterAddress = addr;
125
+ } catch {
126
+ paymasterAddress = address(0);
127
+ }
128
+
129
if (paymasterAddress == address(0)) {
130
console2.log("Creating NEW Paymaster!");
131
paymaster = new ChatterPayPaymaster(config.entryPoint, config.account);
0 commit comments