Skip to content

Commit

Permalink
Merge branch 'deploy-script' into feat/adding-bridge-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
xavikh committed Mar 22, 2024
2 parents ae26ca6 + 83ba913 commit 85b7eab
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
5 changes: 3 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ optimizer-runs = 10_000_000

[rpc_endpoints]
sepolia = "${SEPOLIA_RPC_URL}"
taiko = "${TAIKO_RPC_URL}"



[etherscan]
sepolia = { key = "${ETHERSCAN_API_KEY}" }
18 changes: 18 additions & 0 deletions script/VetoToken.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Script, console2} from "forge-std/Script.sol";
import {VetoToken} from "../src/VetoToken.sol";

contract Deploy is Script {
function run() public {
// 0. Setting up foundry
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

// 1. Deploying the token
new VetoToken();

vm.stopBroadcast();
}
}
3 changes: 3 additions & 0 deletions script/deployer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source .env
forge script script/OptimisticTokenVotingPlugin.s.sol --rpc-url $SEPOLIA_RPC_URL
forge script script/VetoToken.s.sol --rpc-url $TAIKO_RPC_URL
1 change: 1 addition & 0 deletions src/OptimisticTokenVotingPlugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ contract OptimisticTokenVotingPlugin is
/// @param _dao The IDAO interface of the associated DAO.
/// @param _governanceSettings The vetoing settings.
/// @param _token The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token used for voting.
/// @param _lzEndpoint The LayerZero endpoint.
function initialize(
IDAO _dao,
OptimisticGovernanceSettings calldata _governanceSettings,
Expand Down
33 changes: 33 additions & 0 deletions src/VetoToken.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

contract VetoToken is ERC20, ERC20Permit, ERC20Votes {
constructor() ERC20("VetoToken", "VETO") ERC20Permit("VetoToken") {}

// The following functions are overrides required by Solidity.

function _afterTokenTransfer(address from, address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._afterTokenTransfer(from, to, amount);
}

function _mint(address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._mint(to, amount);
}

function _burn(address account, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._burn(account, amount);
}
}

0 comments on commit 85b7eab

Please sign in to comment.