Skip to content

Commit 57c2d63

Browse files
committed
curation:
- update GST tokens symbol to be just GST - make the GST owner transferrable in case we want to migrate the curation contract
1 parent 5ba8edc commit 57c2d63

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

contracts/curation/Curation.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,7 @@ contract Curation is CurationV1Storage, GraphUpgradeable, ICuration, Governed {
454454

455455
// If no signal token for the pool - create one
456456
if (address(curationPool.gst) == address(0)) {
457-
string memory symbol = string(abi.encodePacked("GST-", _subgraphDeploymentID));
458-
curationPool.gst = new GraphSignalToken(symbol, address(this));
457+
curationPool.gst = new GraphSignalToken("GST", address(this));
459458
}
460459
}
461460

contracts/curation/GraphSignalToken.sol

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ pragma solidity ^0.6.4;
22

33
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
44

5+
import "../governance/Governed.sol";
6+
57
/**
68
* @title GraphSignalToken contract
79
* @dev This is the implementation of the Curation Signal ERC20 token (GST).
@@ -10,7 +12,7 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
1012
* burn them. GST tokens are transferrable and their holders can do any action allowed
1113
* in a standard ERC20 token implementation except for burning them.
1214
*/
13-
contract GraphSignalToken is ERC20 {
15+
contract GraphSignalToken is ERC20, Governed {
1416
address public owner;
1517

1618
modifier onlyOwner {
@@ -24,15 +26,15 @@ contract GraphSignalToken is ERC20 {
2426
* @param _owner Address of the contract issuing this token
2527
*/
2628
constructor(string memory _symbol, address _owner) public ERC20("Graph Signal Token", _symbol) {
27-
owner = _owner;
29+
Governed._initialize(_owner);
2830
}
2931

3032
/**
3133
* @dev Mint new tokens.
3234
* @param _to Address to send the newly minted tokens
3335
* @param _amount Amount of tokens to mint
3436
*/
35-
function mint(address _to, uint256 _amount) public onlyOwner {
37+
function mint(address _to, uint256 _amount) public onlyGovernor {
3638
_mint(_to, _amount);
3739
}
3840

@@ -41,7 +43,7 @@ contract GraphSignalToken is ERC20 {
4143
* @param _account Address from where tokens will be burned
4244
* @param _amount Amount of tokens to burn
4345
*/
44-
function burnFrom(address _account, uint256 _amount) public onlyOwner {
46+
function burnFrom(address _account, uint256 _amount) public onlyGovernor {
4547
_burn(_account, _amount);
4648
}
4749
}

0 commit comments

Comments
 (0)