Skip to content

Commit

Permalink
fix: add payload
Browse files Browse the repository at this point in the history
  • Loading branch information
sendra committed Feb 11, 2025
1 parent 1374a58 commit a0830c4
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ pragma solidity ^0.8.0;
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV3Ethereum_ADISonicPathActivation_20250210} from './AaveV3Ethereum_ADISonicPathActivation_20250210.sol';

address constant PAYLOAD = address(0xd16f822737b4e360671B4c2D5cdD811f5Aa6611C);

/**
* @dev Deploy Ethereum
Expand All @@ -13,15 +14,10 @@ import {AaveV3Ethereum_ADISonicPathActivation_20250210} from './AaveV3Ethereum_A
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Ethereum_ADISonicPathActivation_20250210).creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);
actions[0] = GovV3Helpers.buildAction(PAYLOAD);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
Expand All @@ -40,9 +36,8 @@ contract CreateProposal is EthereumScript {
// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsEthereum[0] = GovV3Helpers.buildAction(
type(AaveV3Ethereum_ADISonicPathActivation_20250210).creationCode
);
actionsEthereum[0] = GovV3Helpers.buildAction(PAYLOAD);

payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
Expand Down

0 comments on commit a0830c4

Please sign in to comment.