Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/foundry_runScript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ permissions:
contents: read

env:
SENDER_ADDRESS: ${{ secrets.SAFE_MULTISIG_PROPOSER_ADDRESS }}
PRIVATE_KEY: ${{ secrets.SAFE_MULTISIG_PROPOSER_PRIVATE_KEY }}
SAFE_MULTISIG_PROPOSER_ADDRESS: ${{ secrets.SAFE_MULTISIG_PROPOSER_ADDRESS }}
SAFE_MULTISIG_PROPOSER_PRIVATE_KEY: ${{ secrets.SAFE_MULTISIG_PROPOSER_PRIVATE_KEY }}
SAFE_MULTISIG_MAINNET_ADDRESS: ${{ secrets.SAFE_MULTISIG_MAINNET_ADDRESS }}
SAFE_MULTISIG_AENEID_ADDRESS: ${{ secrets.SAFE_MULTISIG_AENEID_ADDRESS }}
GH_TOKEN: ${{ github.token }}

jobs:
Expand Down Expand Up @@ -68,4 +70,4 @@ jobs:
- name: Run safe propose script
if: ${{ steps.check_pr.outputs.should_run }} == 'true'
run: |
npx hardhat safe-propose --chainid 1315 --operation schedule --previousversion 1.5.0 --newversion 1.5.1
npx hardhat safe-propose --chainid 1315 --operation schedule --previousversion 1.5.0 --newversion 1.5.1 --safeproposeraddress ${{ env.SAFE_MULTISIG_PROPOSER_ADDRESS }} --safeproposerprivatekey ${{ env.SAFE_MULTISIG_PROPOSER_PRIVATE_KEY }} --safemultisigaddressmainnet ${{ env.SAFE_MULTISIG_MAINNET_ADDRESS }} --safemultisigaddressaeneid ${{ env.SAFE_MULTISIG_AENEID_ADDRESS }}
11 changes: 8 additions & 3 deletions script/hardhat/utils/safePropose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ task("safe-propose", "Propose a Safe transaction")
.addParam("operation", "The operation type: schedule, execute or cancel")
.addParam("previousversion", "The previous version")
.addParam("newversion", "The next version")
.addParam("safeproposeraddress", "The address of the Safe multisig proposer")
.addParam("safeproposerprivatekey", "The private key of the Safe multisig proposer")
.addParam("safemultisigaddressmainnet", "The address of the Safe in mainnet")
.addParam("safemultisigaddressaeneid", "The address of the Safe in aeneid")
.setAction(async (taskArgs, hre) => {
const chainId = parseInt(taskArgs.chainid)
const MAINNET_CHAIN_ID = 1514
const TESTNET_CHAIN_ID = 1315
if (chainId !== MAINNET_CHAIN_ID && chainId !== TESTNET_CHAIN_ID) throw new Error('Invalid chainId')

const SAFE_PROPOSER_ADDRESS = process.env.SAFE_MULTISIG_PROPOSER_ADDRESS
const SAFE_PROPOSER_PRIVATE_KEY = process.env.SAFE_MULTISIG_PROPOSER_PRIVATE_KEY
const SAFE_PROPOSER_ADDRESS = taskArgs.safeproposeraddress
const SAFE_PROPOSER_PRIVATE_KEY = taskArgs.safeproposerprivatekey
const RPC_URL = chainId === MAINNET_CHAIN_ID ? 'https://mainnet.storyrpc.io' : 'https://aeneid.storyrpc.io'
const SAFE_ADDRESS = chainId === MAINNET_CHAIN_ID ? process.env.SAFE_MULTISIG_MAINNET_ADDRESS : process.env.SAFE_MULTISIG_AENEID_ADDRESS
const SAFE_ADDRESS = chainId === MAINNET_CHAIN_ID ? taskArgs.safemultisigaddressmainnet : taskArgs.safemultisigaddressaeneid

const TX_SERVICE_URL = chainId === MAINNET_CHAIN_ID ? 'https://transaction.safe.story.foundation/api' : 'https://transaction-testnet.safe.story.foundation/api'

const apiKit = new SafeApiKit({
Expand Down