Skip to content

Commit

Permalink
Rebase adaptations
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Apr 18, 2024
1 parent 9b95aa5 commit dfb6283
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 2 additions & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
@aragon/osx/=lib/osx/packages/contracts/src/
@ensdomains/ens-contracts/=lib/ens-contracts/
@layerzero/=lib/solidity-examples/contracts/
@layerzero/=lib/solidity-examples/contracts/
forge-std/=lib/forge-std/src/
2 changes: 1 addition & 1 deletion script/2.OptimisticTokenVotingPlugin.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.17;

import {Script, console2} from "forge-std/Script.sol";
import {Vm} from "forge-std/Vm.sol";
import {OptimisticLzVotingPluginSetup} from "../src/OptimisticLzVotingPluginSetup.sol";
import {OptimisticLzVotingPluginSetup} from "../src/setup/OptimisticLzVotingPluginSetup.sol";
import {OptimisticLzVotingPlugin} from "../src/OptimisticLzVotingPlugin.sol";
import {DAOFactory} from "@aragon/osx/framework/dao/DAOFactory.sol";
import {GovernanceERC20} from "@aragon/osx/token/ERC20/governance/GovernanceERC20.sol";
Expand Down
19 changes: 11 additions & 8 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pragma solidity ^0.8.13;

import {VmSafe} from "forge-std/Vm.sol";
import {Script, console2} from "forge-std/Script.sol";
import {OptimisticTokenVotingPluginSetup} from "../src/setup/OptimisticTokenVotingPluginSetup.sol";
import {OptimisticLzVotingPluginSetup} from "../src/setup/OptimisticLzVotingPluginSetup.sol";
import {MultisigPluginSetup} from "../src/setup/MultisigPluginSetup.sol";
import {EmergencyMultisigPluginSetup} from "../src/setup/EmergencyMultisigPluginSetup.sol";
import {OptimisticTokenVotingPlugin} from "../src/OptimisticTokenVotingPlugin.sol";
import {OptimisticLzVotingPlugin} from "../src/OptimisticLzVotingPlugin.sol";
import {GovernanceERC20} from "@aragon/osx/token/ERC20/governance/GovernanceERC20.sol";
import {GovernanceWrappedERC20} from "@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol";
import {PluginRepoFactory} from "@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol";
Expand Down Expand Up @@ -252,7 +252,7 @@ contract Deploy is Script {
returns (address, PluginRepo, IPluginSetup.PreparedSetupData memory)
{
// Deploy plugin setup
OptimisticTokenVotingPluginSetup pluginSetup = new OptimisticTokenVotingPluginSetup(
OptimisticLzVotingPluginSetup pluginSetup = new OptimisticLzVotingPluginSetup(
GovernanceERC20(governanceERC20Base),
GovernanceWrappedERC20(governanceWrappedERC20Base)
);
Expand All @@ -268,17 +268,20 @@ contract Deploy is Script {
);

// Plugin settings
OptimisticTokenVotingPlugin.OptimisticGovernanceSettings
memory votingSettings = OptimisticTokenVotingPlugin
OptimisticLzVotingPlugin.OptimisticGovernanceSettings
memory votingSettings = OptimisticLzVotingPlugin
.OptimisticGovernanceSettings(
200000, // minVetoRatio - 20%
0, // minDuration (the condition will enforce it)
0 // minProposerVotingPower
);

OptimisticTokenVotingPluginSetup.TokenSettings
memory tokenSettings = OptimisticTokenVotingPluginSetup
.TokenSettings(tokenAddress, "", "");
OptimisticLzVotingPluginSetup.TokenSettings
memory tokenSettings = OptimisticLzVotingPluginSetup.TokenSettings(
tokenAddress,
"",
""
);

address[] memory holders = new address[](0);
uint256[] memory amounts = new uint256[](0);
Expand Down
5 changes: 3 additions & 2 deletions src/conditions/StandardProposalCondition.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ pragma solidity ^0.8.17;
import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {IPermissionCondition} from "@aragon/osx/core/permission/IPermissionCondition.sol";
import {IDAO} from "@aragon/osx/core/dao/IDAO.sol";
import {OptimisticTokenVotingPlugin} from "../OptimisticTokenVotingPlugin.sol";
import {OptimisticLzVotingPlugin} from "../OptimisticLzVotingPlugin.sol";

// import {PermissionCondition} from "@aragon/osx/core/permission/PermissionCondition.sol";

/// @title PermissionCondition
Expand Down Expand Up @@ -44,7 +45,7 @@ contract StandardProposalCondition is ERC165, IPermissionCondition {
// Is it createProposal()?
if (
_getSelector(_data) !=
OptimisticTokenVotingPlugin.createProposal.selector
OptimisticLzVotingPlugin.createProposal.selector
) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion test/OptimisticTokenVotingPluginSetup.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.17;

import {Test, console2} from "forge-std/Test.sol";
import {OptimisticLzVotingPlugin} from "../src/OptimisticLzVotingPlugin.sol";
import {OptimisticLzVotingPluginSetup} from "../src/OptimisticLzVotingPluginSetup.sol";
import {OptimisticLzVotingPluginSetup} from "../src/setup/OptimisticLzVotingPluginSetup.sol";
import {GovernanceERC20} from "@aragon/osx/token/ERC20/governance/GovernanceERC20.sol";
import {GovernanceWrappedERC20} from "@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol";
import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
Expand Down

0 comments on commit dfb6283

Please sign in to comment.