Aere Network public source. Everything here can be checked against the live chain (chain id 2800, https://rpc.aere.network). Scope note, stated up front rather than buried: consensus on chain 2800 is classical secp256k1 ECDSA QBFT. The post-quantum work in this repository is at the signature, precompile, account and transport layers. Nothing here makes the consensus post-quantum, and no document in it should be read as claiming so.
46 lines
1.7 KiB
Solidity
46 lines
1.7 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity 0.8.23;
|
|
|
|
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
|
|
import "@openzeppelin/contracts/access/Ownable.sol";
|
|
|
|
/**
|
|
* @title GovSelfTestVotes
|
|
* @notice THROWAWAY, ISOLATED ERC20Votes token used ONLY to prove the
|
|
* AereGovernor + TimelockController machinery is binding end to end.
|
|
*
|
|
* It exists solely because the production votes source
|
|
* (AereStakedGovVotes) mirrors real staking, and real staked power on
|
|
* chain 2800 is 0 today, so no account can vote through the production
|
|
* governor yet. This token lets the deployer hold voting power in a
|
|
* self-contained self-test that touches NO real protocol contract.
|
|
*
|
|
* Open mint on purpose: it is a disposable test artifact with no value.
|
|
* Default block-number clock (matches the production governor).
|
|
*/
|
|
contract GovSelfTestVotes is ERC20Votes {
|
|
constructor() ERC20("Gov Self-Test Votes", "stVOTE") ERC20Permit("Gov Self-Test Votes") {}
|
|
|
|
function mint(address to, uint256 amount) external {
|
|
_mint(to, amount);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @title GovSelfTestTarget
|
|
* @notice THROWAWAY Ownable target. After its ownership is transferred to the
|
|
* self-test TimelockController, only a passed-and-executed governance
|
|
* proposal can change `value`, proving the governor genuinely binds an
|
|
* owned contract. No real contract is involved.
|
|
*/
|
|
contract GovSelfTestTarget is Ownable {
|
|
uint256 public value;
|
|
|
|
event ValueSet(uint256 indexed newValue);
|
|
|
|
function setValue(uint256 newValue) external onlyOwner {
|
|
value = newValue;
|
|
emit ValueSet(newValue);
|
|
}
|
|
}
|