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.8 KiB
Solidity
46 lines
1.8 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity 0.8.23;
|
|
|
|
import "../interfaces/ISeason1.sol";
|
|
import "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol";
|
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
|
|
/// @notice Test-only sAERE stand-in: the exact OpenZeppelin ERC-4626 base that
|
|
/// the live sAERE extends. Proves the distributor's
|
|
/// deposit(assets, receiver) delivery path without the live vault's
|
|
/// dead-share bootstrap. Its deposit() pulls WAERE from the caller
|
|
/// (the distributor) and mints shares to the receiver (the claimant).
|
|
contract MockSAERE is ERC4626 {
|
|
constructor(IERC20 asset_) ERC20("Mock Staked AERE", "msAERE") ERC4626(asset_) {}
|
|
}
|
|
|
|
/// @notice Test-only settable humanity oracle.
|
|
contract MockHumanityOracle is IHumanityOracle {
|
|
mapping(address => bool) public human;
|
|
function set(address a, bool v) external { human[a] = v; }
|
|
function isVerifiedHuman(address account) external view returns (bool) {
|
|
return human[account];
|
|
}
|
|
}
|
|
|
|
/// @notice Test-only settable boolean flag oracle (passkey presence).
|
|
contract MockAccountFlag is IAccountFlag {
|
|
mapping(address => bool) public flagged;
|
|
function set(address a, bool v) external { flagged[a] = v; }
|
|
function isFlagged(address account) external view returns (bool) {
|
|
return flagged[account];
|
|
}
|
|
}
|
|
|
|
/// @notice Test-only payable sink that just accepts native AERE.
|
|
contract MockSink {
|
|
event Received(address from, uint256 amount);
|
|
receive() external payable { emit Received(msg.sender, msg.value); }
|
|
}
|
|
|
|
/// @notice Test-only claim relayer that reverts on receiving native AERE,
|
|
/// used to exercise the distributor's liquid-transfer failure path.
|
|
contract RejectingReceiver {
|
|
// no receive/fallback -> any value transfer to it reverts
|
|
}
|