Startpoints
A startpoint is the on-chain interface for your contract to call your midpoint. All calls to a midpoint begin with a call to
callMidpoint()
at the startpoint contract for a given chain.Midpoint Chain ID | Chain | Startpoint Address |
---|---|---|
1 | Ethereum | 0x8343b2CBE03748f8170b977BD8e1e85098D81B05 |
5 | Goerli Testnet | 0x9BEa2A4C2d84334287D60D6c36Ab45CB453821eB |
10 | Optimism | 0x0cabEDbDB07C2AFc7D840cF34A2A7CC46DA446BD |
137 | Polygon | 0x80Ab1b74Fc8E57aE586854A876692D9088e78483 |
420 | Optimism Goerli Testnet | 0xa89c2f3A20cED98cd39AFd0Ab5B207C46Fb2Cdf3 |
3141 | Filecoin Hyperspace Testnet | 0x0705c34AA032354A7966776098E0c12cc5539Bc8 |
42161 | Arbitrum One | 0x0cabEDbDB07C2AFc7D840cF34A2A7CC46DA446BD |
80001 | Polygon Mumbai Testnet | 0x47a4905D4C2Eabd58abBDFEcBaeB07F1A29b660c |
421613 | Arbitrum Goerli Testnet | 0x1063051eFe824703E1cf36206A8FA361545E9b54 |
event callOracleEvent(uint64 _midpointId, uint256 _requestId, address _contract);
event callOracleEventData(uint64 _midpointId, bytes _data, uint256 _requestId, address _contract);
uint256 private rollingRequestId;
constructor() {
rollingRequestId = 0;
}
function callMidpoint(uint64 _id) public returns (uint256 requestId) {
rollingRequestId = rollingRequestId + 1;
emit callOracleEvent(_id, rollingRequestId, msg.sender);
return rollingRequestId;
}
function callMidpoint(uint64 _id, bytes calldata _data) public returns (uint256 requestId) {
rollingRequestId = rollingRequestId + 1;
emit callOracleEventData(_id, _data, rollingRequestId, msg.sender);
return rollingRequestId;
}
Last modified 6mo ago