Skip to content

Commit

Permalink
🔨 paymaster: script to transfer owner
Browse files Browse the repository at this point in the history
  • Loading branch information
qd-qd committed Apr 2, 2024
1 parent 37a2613 commit 6e97627
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions script/Paymaster/11_PaymasterTransferOwner.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: APACHE-2.0
pragma solidity >=0.8.19 <0.9.0;

import { Paymaster } from "src/v1/Paymaster.sol";
import { BaseScript } from "../Base.s.sol";

/// @title PaymasterTransferOwner
/// @notice Transfer the owner role to someone else
contract PaymasterTransferOwner is BaseScript {
function run() public broadcast {
// address of the paymaster we wanna use
address paymasterAddress = vm.envAddress("PAYMASTER");
Paymaster paymaster = Paymaster(paymasterAddress);

// address of the new owner
address newOwner = vm.envAddress("NEW_OWNER");

// fetch the owner of the paymaster
paymaster.transferOwnership(newOwner);
}
}

0 comments on commit 6e97627

Please sign in to comment.