Skip to content

Commit

Permalink
Made Governance Token soulbound
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericselvig committed Nov 29, 2024
1 parent 52e4522 commit b617370
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/governance/GovToken.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
pragma solidity ^0.8.26;

import {ERC20} from "solmate/src/tokens/ERC20.sol";
import {Owned} from "solmate/src/auth/Owned.sol";

contract GovToken is ERC20, Owned {
error Not_Allowed();

constructor(
string memory name,
string memory symbol
Expand All @@ -17,4 +19,26 @@ contract GovToken is ERC20, Owned {
function burn(address from, uint256 amount) external onlyOwner {
_burn(from, amount);
}

function approve(
address spender,
uint256 amount
) public override returns (bool) {
revert Not_Allowed();
}

function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
revert Not_Allowed();
}

function transfer(
address to,
uint256 amount
) public override returns (bool) {
revert Not_Allowed();
}
}

0 comments on commit b617370

Please sign in to comment.