-
Notifications
You must be signed in to change notification settings - Fork 160
Reimplement OutboundQueue pallet #851
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
86ad952
Reimplement OutboundQueue
vgeddes 3c27d1d
Add MessageQueue pallet to BridgeHub runtime
vgeddes f056cc8
Relayer no longer requires snowbridge-query-events tool for querying …
vgeddes bd1773d
Refactor tractor
vgeddes da66429
fixes
vgeddes ff6e3d9
Merge branch 'main' into vincent/outbound-queue
vgeddes 630dce2
rework runtime api for outbound-queue
vgeddes 15bf1c6
misc
vgeddes 16f4efc
Merge branch 'main' into vincent/outbound-queue
vgeddes a953e50
Fix ethereum unit test
vgeddes dd83989
update things
vgeddes 3db3ed5
Reduce stack depth in DeployScript.sol
vgeddes 2622339
Revert Merkle proof verifier contract (#861)
doubledup 71981c6
Optimize merkle proof verifier
vgeddes 71b0f21
Revert changes to relayer merkle package
doubledup a903c6d
Update contract bindings
vgeddes 248f6bb
fix parachain unit tests
vgeddes 2c1d052
More relayer fixes
vgeddes b817948
Fix message flow in Polkadot->Ethereum direction
vgeddes 0175e36
linting
vgeddes 2c749e1
revert changes to IParachainClient interface
vgeddes 56b9d83
update cumulus
vgeddes 12705ea
merged in companion PR
vgeddes ca363c1
Merge branch 'main' into vincent/outbound-queue
vgeddes e32608d
improve encoding of parachain header in ParachainClient.sol
vgeddes 1058bd5
Add copyright/license boilerplate
vgeddes 109a805
Port over ethereum location converter
vgeddes 9c62531
remove obsolete eth1 POW code
vgeddes e648446
fix unit tests
vgeddes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity ^0.8.19; | ||
|
|
||
| import {AccessControl} from "openzeppelin/access/AccessControl.sol"; | ||
|
|
||
| contract Auth is AccessControl { | ||
| bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); | ||
|
|
||
| constructor() { | ||
| _grantRole(ADMIN_ROLE, msg.sender); | ||
| _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity ^0.8.19; | ||
|
|
||
| import {AccessControl} from "openzeppelin/access/AccessControl.sol"; | ||
| import {Registry} from "./Registry.sol"; | ||
| import {IOutboundQueue} from "./IOutboundQueue.sol"; | ||
| import {IRecipient} from "./IRecipient.sol"; | ||
| import {ParaID} from "./Types.sol"; | ||
| import {Auth} from "./Auth.sol"; | ||
| import {RegistryLookup} from "./RegistryLookup.sol"; | ||
|
|
||
| abstract contract Gateway is Auth, RegistryLookup, IRecipient { | ||
| bytes32 public constant SENDER_ROLE = keccak256("SENDER_ROLE"); | ||
| bytes32 public constant OUTBOUND_QUEUE = keccak256("OutboundQueue"); | ||
|
|
||
| /* Errors */ | ||
|
|
||
| error Unauthorized(); | ||
|
|
||
| constructor(Registry registry) RegistryLookup(registry) { | ||
| _setRoleAdmin(SENDER_ROLE, ADMIN_ROLE); | ||
| } | ||
|
|
||
| function handle(ParaID origin, bytes calldata message) external virtual; | ||
|
|
||
| function outboundQueue() internal view returns (IOutboundQueue) { | ||
| return IOutboundQueue(resolve(OUTBOUND_QUEUE)); | ||
| } | ||
|
|
||
| function ensureOrigin(ParaID a, ParaID b) internal pure { | ||
| if (a != b) { | ||
| revert Unauthorized(); | ||
| } | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.