Skip to content

Commit

Permalink
Account migration signer tool (#235)
Browse files Browse the repository at this point in the history
* Doc

* Bump version for devnet

* Account migration signer tool

* Doc
  • Loading branch information
AurevoirXavier committed Jan 29, 2023
1 parent ff23cac commit 14f9beb
Show file tree
Hide file tree
Showing 10 changed files with 2,707 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pallet/account-migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ pub enum ExistenceReason {
/// Build a Darwinia account migration message.
pub fn sr25519_signable_message(spec_name: &[u8], account_id_20: &AccountId20) -> Vec<u8> {
[
// https://github.com/polkadot-js/common/issues/1710
b"<Bytes>I authorize the migration to ",
// Ignore the EIP-55 here.
//
// Must call the `to_lowercase` on front end.
array_bytes::bytes2hex("0x", account_id_20.0).as_bytes(),
b", an unused address on ",
spec_name,
Expand Down
2 changes: 1 addition & 1 deletion runtime/pangolin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Pangolin2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
spec_version: 6_0_0_1,
spec_version: 6_0_0_2,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
21 changes: 21 additions & 0 deletions tool/am-signer/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset=utf-8
end_of_line=lf
indent_size=tab
indent_style=tab
insert_final_newline=true
max_line_length=100
tab_width=4
trim_trailing_whitespace=true

[*.py]
charset=utf-8
indent_size=4
indent_style=space

[*.{sh,yml,yaml}]
indent_size=2
indent_style=space
tab_width=8
15 changes: 15 additions & 0 deletions tool/am-signer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# System
.DS_Store

# Integrated Development Environment
.idea
.vscode

# Package Manager
## cargo
target
## npm
node_modules

# Test data
test-data
29 changes: 29 additions & 0 deletions tool/am-signer/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Basic
edition = "2021"
hard_tabs = true
max_width = 100
tab_spaces = 4

# Imports
imports_granularity = "Crate"
reorder_imports = true

# Format comments
comment_width = 100
wrap_comments = true

# Misc
match_arm_blocks = false
match_block_trailing_comma = true
newline_style = "Unix"
reorder_impl_items = true
reorder_modules = true
use_field_init_shorthand = true
use_small_heuristics = "Max"

# Wait for stablization
# format_code_in_doc_comments = true

# Could give it a try
# group_imports = "StdExternalCrate"
# inline_attribute_width = 100
Loading

0 comments on commit 14f9beb

Please sign in to comment.