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.
26 lines
1012 B
Solidity
26 lines
1012 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity 0.8.23;
|
|
|
|
interface IERC20Min {
|
|
function transferFrom(address from, address to, uint256 amount) external returns (bool);
|
|
}
|
|
|
|
/**
|
|
* @title MockFlushSink, TEST-ONLY stand-in for AereSink's flush(address,uint256) surface.
|
|
* @notice AereSpokePool routes the 50 bps protocol fee to its SINK via
|
|
* `flush(address,uint256)`. Tests that exercise the ORDER path (not the sink
|
|
* economics) use this minimal sink: it pulls the approved fee and records it, so
|
|
* the fee leg succeeds deterministically without deploying the full AereSink
|
|
* swap/burn stack. Not for production.
|
|
*/
|
|
contract MockFlushSink {
|
|
uint256 public totalReceived;
|
|
mapping(address => uint256) public receivedOf;
|
|
|
|
function flush(address token, uint256 amount) external {
|
|
require(IERC20Min(token).transferFrom(msg.sender, address(this), amount), "flush: transferFrom");
|
|
totalReceived += amount;
|
|
receivedOf[token] += amount;
|
|
}
|
|
}
|