This repository was archived by the owner on Mar 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
relay token register and lock events #167
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
a477599
register token to darwinia
xiaoch05 f2f4405
add new token register storage key
xiaoch05 5b30cf0
add new token register storage key
xiaoch05 a76167b
redeem locked token
xiaoch05 7f785ac
config
xiaoch05 2273f7d
add some type size
xiaoch05 28501f6
merge from master
xiaoch05 2114444
upgrade to substrate3
xiaoch05 9ecca16
configure
xiaoch05 0a800eb
revert crab conf
xiaoch05 95c66a7
fmt
xiaoch05 75f5656
fmt
xiaoch05 723d6d4
config crab=>panglin
xiaoch05 76b2a61
Merge branch 'master' into token-bridge
hackfisher cbabc12
rmv backing parameter
xiaoch05 ee781d9
Merge branch 'master' into token-bridge
hackfisher 68a651e
split register and redeem fn
xiaoch05 dfcf7ba
Merge branch 'token-bridge' of github.com:darwinia-network/bridger in…
xiaoch05 486fd64
fix justifications
xiaoch05 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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,43 @@ | ||
| //! Darwinia Ethereum Issuing | ||
| use crate::chain::ethereum::EthereumReceiptProofThing; | ||
| use codec::{Decode, Encode}; | ||
| use core::marker::PhantomData; | ||
| use substrate_subxt::{balances::Balances, system::System}; | ||
| use substrate_subxt_proc_macro::{module, Call, Store}; | ||
|
|
||
| /// Ethereum Issuing Pallet | ||
| #[module] | ||
| pub trait EthereumIssuing: System + Balances { | ||
| /// Ethereum transaction index | ||
| type EthereumTransactionIndex: 'static + Encode + Decode + Send + Default + Clone + Sync; | ||
| } | ||
|
|
||
| // Call | ||
|
|
||
| /// Submit register erc20 token | ||
| #[derive(Clone, Debug, PartialEq, Call, Encode)] | ||
| pub struct RegisterErc20<T: EthereumIssuing> { | ||
| /// Runtime marker | ||
| pub _runtime: PhantomData<T>, | ||
| /// Ethereum Receipt Proof | ||
| pub proof: EthereumReceiptProofThing, | ||
| } | ||
|
|
||
| /// Submit redeem erc20 token | ||
| #[derive(Clone, Debug, PartialEq, Call, Encode)] | ||
| pub struct RedeemErc20<T: EthereumIssuing> { | ||
| /// Runtime marker | ||
| pub _runtime: PhantomData<T>, | ||
| /// Ethereum Receipt Proof | ||
| pub proof: EthereumReceiptProofThing, | ||
| } | ||
|
|
||
| /// verified proof Storage | ||
| #[derive(Clone, Debug, Eq, PartialEq, Store, Decode, Encode)] | ||
| pub struct VerifiedIssuingProof<T: EthereumIssuing> { | ||
| #[store(returns = Option<bool>)] | ||
| /// Receipt tx hash | ||
| pub map: ([u8; 32], u64), | ||
| /// Runtime marker | ||
| pub _runtime: PhantomData<T>, | ||
| } |
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 |
|---|---|---|
|
|
@@ -3,4 +3,5 @@ | |
|
|
||
| pub mod backing; | ||
| pub mod game; | ||
| pub mod issuing; | ||
| pub mod relay; | ||
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These format looks weird