Closed mfw78 closed 4 months ago
A reference implementation that checks the veracity of signatures / orders generated from the ConstantProductHelper.
ConstantProductHelper
In order to use the poller:
cd utils ETH_RPC_URL=<ETH_RPC_URL> AMM=<AMM> cargo run --bin cow-amm-poller
Where ETH_RPC_URL is the RPC's URL (chain_id is auto-detected) and AMM corresponds to a ConstantProduct AMM for which to generate an order.
ETH_RPC_URL
chain_id
ConstantProduct
At this point, the utility will perform a complete end-to-end test that will use simulateDelegateCall from the settlement contract, performing:
simulateDelegateCall
order
isValidSignature
Success is indicated by an Ok() and the return data should be checked for the presence of isValidSignature(bytes32,bytes).selector.
Ok()
isValidSignature(bytes32,bytes).selector
Description
A reference implementation that checks the veracity of signatures / orders generated from the
ConstantProductHelper
.In order to use the poller:
Where
ETH_RPC_URL
is the RPC's URL (chain_id
is auto-detected) and AMM corresponds to aConstantProduct
AMM for which to generate an order.At this point, the utility will perform a complete end-to-end test that will use
simulateDelegateCall
from the settlement contract, performing:order
functionisValidSignature
with the signature returned from theorder
function.Success is indicated by an
Ok()
and the return data should be checked for the presence ofisValidSignature(bytes32,bytes).selector
.