Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relayer proxy new functions #4061

Merged
merged 12 commits into from
Apr 25, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,12 @@ export const proposeSnapshot = async (snapshotId: string, snapshotRoots: string[
_encodedData,
});

// const encodedDataForRelayer = contracts.rootManager.encodeFunctionData("proposeAggregateRoot", [
// snapshotId,
// aggregateRoot,
// snapshotRoots,
// orderedDomains,
// ]);
const encodedDataForRelayer = "DUMMY";
const encodedDataForRelayer = contracts.rootManager.encodeFunctionData("proposeAggregateRoot", [
proposal.snapshotId,
proposal.aggregateRoot,
_fees,
_encodedData,
]);

try {
const { taskId } = await sendWithRelayerWithBackup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"error RelayerProxy__removeRelayer_relayerNotAdded(address _relayer)",
"error RelayerProxy__validateAndPayWithCredits_notKeep3r(address _sender)",
"event AutonolasChanged(address updated, address previous)",
"event AutonolasPriorityChanged(uint8 updated, uint8 previous)",
"event ConnextChanged(address updated, address previous)",
"event FeeCollectorChanged(address updated, address previous)",
"event FundsDeducted(uint256 amount, uint256 balance)",
Expand All @@ -30,15 +29,13 @@
"function addRelayer(address _relayer)",
"function allowedRelayer(address) view returns (bool)",
"function autonolas() view returns (address)",
"function autonolasPriority() view returns (uint8)",
"function connext() view returns (address)",
"function delay() view returns (uint256)",
"function execute(tuple(tuple(uint32 originDomain, uint32 destinationDomain, uint32 canonicalDomain, address to, address delegate, bool receiveLocal, bytes callData, uint256 slippage, address originSender, uint256 bridgedAmt, uint256 normalizedIn, uint256 nonce, bytes32 canonicalId) params, address[] routers, bytes[] routerSignatures, address sequencer, bytes sequencerSignature) _args, uint256 _fee) returns (bytes32 transferId)",
"function feeCollector() view returns (address)",
"function gelatoRelayer() view returns (address)",
"function keep3r() view returns (address)",
"function owner() view returns (address)",
"function priorityKeepers(address) view returns (bool)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedTimestamp() view returns (uint256)",
Expand All @@ -48,7 +45,6 @@
"function renounced() view returns (bool)",
"function send(bytes _encodedData, uint256 _messageFee, uint256 _relayerFee)",
"function setAutonolas(address _autonolas)",
"function setAutonolasPriority(uint8 _autonolasPriority)",
"function setConnext(address _connext)",
"function setFeeCollector(address _feeCollector)",
"function setGelatoRelayer(address _gelatoRelayer)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[
"function dequeue() returns (bytes32, uint256)",
"function finalizeAndPropagate(address[] _connectors, uint256[] _fees, bytes[] _encodedData, bytes32 _proposedAggregateRoot, uint256 _endOfDispute) payable",
"function lastPropagatedRoot() view returns (bytes32)",
"function propagate(address[] _connectors, uint256[] _fees, bytes[] _encodedData) payable"
"function propagate(address[] _connectors, uint256[] _fees, bytes[] _encodedData) payable",
"function proposeAggregateRoot(uint256 _snapshotId, bytes32 _aggregateRoot, bytes32[] _snapshotsRoots, uint32[] _domains)"
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
"error ProposedOwnable__proposeNewOwner_noOwnershipChange()",
"error ProposedOwnable__renounceOwnership_invalidProposal()",
"error ProposedOwnable__renounceOwnership_noProposal()",
"error RelayerProxyHub__finalizeAndPropagateCooledDown_notCooledDown(uint256 timestamp, uint256 nextWorkable)",
"error RelayerProxyHub__processFromRoot_alreadyProcessed(uint32 chain, bytes32 l2Hash)",
"error RelayerProxyHub__processFromRoot_noHubConnector(uint32 chain)",
"error RelayerProxyHub__propagateCooledDown_notCooledDown(uint256 timestamp, uint256 nextWorkable)",
"error RelayerProxyHub__proposeAggregateRootCooledDown_notCooledDown(uint256 timestamp, uint256 nextWorkable)",
"error RelayerProxy__addRelayer_relayerAdded(address _relayer)",
"error RelayerProxy__definedAddress_empty(address _address)",
"error RelayerProxy__isWorkableBySender_notWorkable(address _sender)",
"error RelayerProxy__onlyRelayer_notRelayer(address _sender)",
"error RelayerProxy__removeRelayer_relayerNotAdded(address _relayer)",
"error RelayerProxy__validateAndPayWithCredits_notKeep3r(address _sender)",
"event AutonolasChanged(address updated, address previous)",
"event AutonolasPriorityChanged(uint8 updated, uint8 previous)",
"event AutonolasPriorityChanged(uint8 fn, uint8 updated, uint8 previous)",
"event ConnextChanged(address updated, address previous)",
"event FeeCollectorChanged(address updated, address previous)",
"event FundsDeducted(uint256 amount, uint256 balance)",
Expand All @@ -36,23 +38,26 @@
"function addRelayer(address _relayer)",
"function allowedRelayer(address) view returns (bool)",
"function autonolas() view returns (address)",
"function autonolasPriority() view returns (uint8)",
"function autonolasPriority(uint8) view returns (uint8)",
"function connext() view returns (address)",
"function delay() view returns (uint256)",
"function execute(tuple(tuple(uint32 originDomain, uint32 destinationDomain, uint32 canonicalDomain, address to, address delegate, bool receiveLocal, bytes callData, uint256 slippage, address originSender, uint256 bridgedAmt, uint256 normalizedIn, uint256 nonce, bytes32 canonicalId) params, address[] routers, bytes[] routerSignatures, address sequencer, bytes sequencerSignature) _args, uint256 _fee) returns (bytes32 transferId)",
"function feeCollector() view returns (address)",
"function finalizeAndPropagateKeep3r(address[] _connectors, uint256[] _fees, bytes[] _encodedData, bytes32 _proposedAggregateRoot, uint256 _endOfDispute)",
"function gelatoRelayer() view returns (address)",
"function hubConnectors(uint32) view returns (address)",
"function keep3r() view returns (address)",
"function lastPropagateAt() view returns (uint256)",
"function lastProposeAggregateRootAt() view returns (uint256)",
"function owner() view returns (address)",
"function priorityKeepers(address) view returns (bool)",
"function processFromRootKeep3r(bytes _encodedData, uint32 _fromChain, bytes32 _l2Hash)",
"function processedRootMessages(uint32, bytes32) view returns (bool)",
"function propagate(address[] _connectors, uint256[] _messageFees, bytes[] _encodedData, uint256 _relayerFee)",
"function propagateCooldown() view returns (uint256)",
"function propagateKeep3r(address[] _connectors, uint256[] _messageFees, bytes[] _encodedData)",
"function propagateWorkable() returns (bool)",
"function proposeAggregateRootCooldown() view returns (uint256)",
"function proposeAggregateRootKeep3r(uint256 _snapshotId, bytes32 _aggregateRoot, bytes32[] _snapshotsRoots, uint32[] _domains)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedTimestamp() view returns (uint256)",
Expand All @@ -63,7 +68,7 @@
"function rootManager() view returns (address)",
"function send(bytes _encodedData, uint256 _messageFee, uint256 _relayerFee)",
"function setAutonolas(address _autonolas)",
"function setAutonolasPriority(uint8 _autonolasPriority)",
"function setAutonolasPriority(uint8 _function, uint8 _autonolasPriority)",
"function setConnext(address _connext)",
"function setFeeCollector(address _feeCollector)",
"function setGelatoRelayer(address _gelatoRelayer)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,58 +1,100 @@
[
"constructor(uint256 _delayBlocks, address _merkle, address _watcherManager)",
"constructor(uint256 _delayBlocks, address _merkle, address _watcherManager, uint256 _minDisputeBlocks, uint256 _disputeBlocks)",
"error ProposedOwnable__onlyOwner_notOwner()",
"error ProposedOwnable__onlyProposed_notProposedOwner()",
"error ProposedOwnable__ownershipDelayElapsed_delayNotElapsed()",
"error ProposedOwnable__proposeNewOwner_invalidProposal()",
"error ProposedOwnable__proposeNewOwner_noOwnershipChange()",
"error ProposedOwnable__renounceOwnership_invalidProposal()",
"error ProposedOwnable__renounceOwnership_noProposal()",
"error RootManager_activateOptimisticMode__OptimisticModeOn()",
"error RootManager_aggregate__OptimisticModeOn()",
"error RootManager_checkDomains__InvalidDomains()",
"error RootManager_constructor__DisputeBlocksLowerThanMin()",
"error RootManager_finalize__InvalidAggregateRoot()",
"error RootManager_finalize__InvalidInputHash()",
"error RootManager_finalize__ProposeInProgress()",
"error RootManager_onlyOptimisticMode__SlowModeOn()",
"error RootManager_onlyProposer__NotWhitelistedProposer(address caller)",
"error RootManager_optimisticPropagate__ForbiddenOptimisticRoot()",
"error RootManager_proposeAggregateRoot__InvalidSnapshotId(uint256 snapshotId)",
"error RootManager_proposeAggregateRoot__ProposeInProgress()",
"error RootManager_setDisputeBlocks__DisputeBlocksLowerThanMin()",
"error RootManager_setDisputeBlocks__SameDisputeBlocksAsBefore()",
"error RootManager_setMinDisputeBlocks__SameMinDisputeBlocksAsBefore()",
"error RootManager_slowPropagate__OldAggregateRoot()",
"event AggregateRootProposed(uint256 indexed snapshotId, uint256 endOfDispute, bytes32 indexed aggregateRoot, bytes32 indexed baseRoot, bytes32[] snapshotsRoots, uint32[] domains)",
"event ConnectorAdded(uint32 domain, address connector, uint32[] domains, address[] connectors)",
"event ConnectorRemoved(uint32 domain, address connector, uint32[] domains, address[] connectors, address caller)",
"event DelayBlocksUpdated(uint256 previous, uint256 updated)",
"event DisputeBlocksUpdated(uint256 previous, uint256 updated)",
"event DomainAdded(uint32 domain, address connector)",
"event DomainRemoved(uint32 domain)",
"event MinDisputeBlocksUpdated(uint256 previous, uint256 updated)",
"event OptimisticModeActivated()",
"event OptimisticRootPropagated(bytes32 indexed aggregateRoot, bytes32 domainsHash)",
"event OwnershipProposed(address indexed proposedOwner)",
"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
"event Paused(address account)",
"event PropagateFailed(uint32 domain, address connector)",
"event ProposedRootFinalized(bytes32 aggregateRoot)",
"event ProposerAdded(address indexed proposer)",
"event ProposerRemoved(address indexed proposer)",
"event RootDiscarded(bytes32 fraudulentRoot)",
"event RootPropagated(bytes32 aggregateRoot, uint256 count, bytes32 domainsHash)",
"event RootReceived(uint32 domain, bytes32 receivedRoot, uint256 queueIndex)",
"event RootsAggregated(bytes32 aggregateRoot, uint256 count, bytes32[] aggregatedMessageRoots)",
"event SlowModeActivated(address indexed watcher)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function DEQUEUE_MAX() view returns (uint128)",
"function FINALIZED_HASH() view returns (bytes32)",
"function MAX_DOMAINS() view returns (uint256)",
"function MERKLE() view returns (address)",
"function acceptProposedOwner()",
"function activateOptimisticMode()",
"function activateSlowMode()",
"function addConnector(uint32 _domain, address _connector)",
"function addProposer(address _proposer)",
"function aggregate(uint32 _domain, bytes32 _inbound)",
"function allowlistedProposers(address) view returns (bool)",
"function connectors(uint256) view returns (address)",
"function connectorsHash() view returns (bytes32)",
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dequeue() returns (bytes32, uint256)",
"function discardRoot(bytes32 _root)",
"function disputeBlocks() view returns (uint256)",
"function domains(uint256) view returns (uint32)",
"function domainsHash() view returns (bytes32)",
"function finalize(bytes32 _proposedAggregateRoot, uint256 _endOfDispute)",
"function finalizeAndPropagate(address[] _connectors, uint256[] _fees, bytes[] _encodedData, bytes32 _proposedAggregateRoot, uint256 _endOfDispute) payable",
"function finalizedOptimisticAggregateRoot() view returns (bytes32)",
"function getConnectorForDomain(uint32 _domain) view returns (address)",
"function getDomainIndex(uint32 _domain) view returns (uint256)",
"function getPendingInboundRootsCount() view returns (uint256)",
"function isDomainSupported(uint32 _domain) view returns (bool)",
"function lastCountBeforeOpMode() view returns (uint256)",
"function lastPropagatedRoot() view returns (bytes32)",
"function minDisputeBlocks() view returns (uint256)",
"function optimisticMode() view returns (bool)",
"function owner() view returns (address)",
"function pause()",
"function paused() view returns (bool)",
"function pendingInboundRoots() view returns (uint128 first, uint128 last)",
"function propagate(address[] _connectors, uint256[] _fees, bytes[] _encodedData) payable",
"function proposeAggregateRoot(uint256 _snapshotId, bytes32 _aggregateRoot, bytes32[] _snapshotsRoots, uint32[] _domains)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedAggregateRootHash() view returns (bytes32)",
"function proposedTimestamp() view returns (uint256)",
"function removeConnector(uint32 _domain)",
"function removeProposer(address _proposer)",
"function renounceOwnership()",
"function renounced() view returns (bool)",
"function setDelayBlocks(uint256 _delayBlocks)",
"function setDisputeBlocks(uint256 _disputeBlocks)",
"function setMinDisputeBlocks(uint256 _minDisputeBlocks)",
"function setWatcherManager(address _watcherManager)",
"function unpause()",
"function validateConnectors(address[] _connectors) view",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event SnapshotRootSaved(uint256 indexed snapshotId, bytes32 indexed root, uint256 indexed count)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
Expand All @@ -46,6 +47,7 @@
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function getLastCompletedSnapshotId() view returns (uint256 _lastCompletedSnapshotId)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
Expand Down Expand Up @@ -76,6 +78,7 @@
"function setMirrorConnector(address _mirrorConnector)",
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setWatcherManager(address _watcherManager)",
"function snapshotRoots(uint256) view returns (bytes32)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event SnapshotRootSaved(uint256 indexed snapshotId, bytes32 indexed root, uint256 indexed count)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
Expand All @@ -50,6 +51,7 @@
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function getLastCompletedSnapshotId() view returns (uint256 _lastCompletedSnapshotId)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
Expand Down Expand Up @@ -80,6 +82,7 @@
"function setMirrorConnector(address _mirrorConnector)",
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setWatcherManager(address _watcherManager)",
"function snapshotRoots(uint256) view returns (bytes32)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event SnapshotRootSaved(uint256 indexed snapshotId, bytes32 indexed root, uint256 indexed count)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
Expand All @@ -47,6 +48,7 @@
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function getLastCompletedSnapshotId() view returns (uint256 _lastCompletedSnapshotId)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
Expand Down Expand Up @@ -77,6 +79,7 @@
"function setMirrorConnector(address _mirrorConnector)",
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setWatcherManager(address _watcherManager)",
"function snapshotRoots(uint256) view returns (bytes32)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event SnapshotRootSaved(uint256 indexed snapshotId, bytes32 indexed root, uint256 indexed count)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
Expand All @@ -49,6 +50,7 @@
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function getLastCompletedSnapshotId() view returns (uint256 _lastCompletedSnapshotId)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
Expand Down Expand Up @@ -80,6 +82,7 @@
"function setMirrorConnector(address _mirrorConnector)",
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setWatcherManager(address _watcherManager)",
"function snapshotRoots(uint256) view returns (bytes32)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
Expand Down
Loading