Skip to content

Commit

Permalink
Helper script to set the forwarder
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed Sep 15, 2023
1 parent 8752404 commit 2c55c5d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions script/SetForwarderAddress.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {GMXAutomationBase} from "../src/GMXAutomationBase.sol";
import {TestData} from "../test/TestData.sol";
// forge-std
import {Script} from "forge-std/Script.sol";

contract SetForwarderAddress is Script, TestData {
// TODO: FILL THESE IN BEFORE RUNNING
address public constant AUTOMATION_CONTRACT = address(0);
address public constant FORWARDER_ADDRESS = address(0);

function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
GMXAutomationBase(AUTOMATION_CONTRACT).setForwarderAddress(FORWARDER_ADDRESS);
vm.stopBroadcast();
}
}

0 comments on commit 2c55c5d

Please sign in to comment.