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

Add mainnet genesis updates #310

Merged
merged 5 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ resources/para-2076-wasm
.direnv
.vscode

scripts/edg-balances-new.json
19,791 changes: 19,791 additions & 0 deletions chainspecs/mainnet/mainnet-raw.json

Large diffs are not rendered by default.

78,518 changes: 78,518 additions & 0 deletions chainspecs/mainnet/mainnet.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pallets/claims/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub mod pallet {
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// Someone claimed some WEBBs.
/// Someone claimed some native tokens.
Claimed { who: T::AccountId, ethereum_address: EthereumAddress, amount: BalanceOf<T> },
}

Expand Down Expand Up @@ -326,7 +326,7 @@ pub mod pallet {

#[pallet::call]
impl<T: Config> Pallet<T> {
/// Make a claim to collect your WEBBs.
/// Make a claim to collect your native tokens.
///
/// The dispatch origin for this call must be _None_.
///
Expand Down Expand Up @@ -368,14 +368,14 @@ pub mod pallet {
Ok(())
}

/// Mint a new claim to collect WEBBs.
/// Mint a new claim to collect native tokens.
///
/// The dispatch origin for this call must be _Root_.
///
/// Parameters:
/// - `who`: The Ethereum address allowed to collect this claim.
/// - `value`: The number of WEBBs that will be claimed.
/// - `vesting_schedule`: An optional vesting schedule for these WEBBs.
/// - `value`: The number of native tokens that will be claimed.
/// - `vesting_schedule`: An optional vesting schedule for these native tokens.
///
/// <weight>
/// The weight of this call is invariant over the input parameters.
Expand Down Expand Up @@ -405,7 +405,7 @@ pub mod pallet {
Ok(())
}

/// Make a claim to collect your WEBBs by signing a statement.
/// Make a claim to collect your native tokens by signing a statement.
///
/// The dispatch origin for this call must be _None_.
///
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub mod currency {
pub const EXISTENTIAL_DEPOSIT: Balance = 1000;

#[cfg(not(feature = "integration-tests"))]
pub const EXISTENTIAL_DEPOSIT: Balance = 10 * CENT;
pub const EXISTENTIAL_DEPOSIT: Balance = MICROUNIT;

pub const WEI: Balance = 1;
pub const KILOWEI: Balance = 1_000;
Expand Down
25 changes: 25 additions & 0 deletions scripts/distribution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const fs = require('fs');
const path = require('path');

// Read the JSON file
const data = fs.readFileSync(path.join(__dirname, 'edg-balances-new.json'));
const balances = JSON.parse(data);

// Calculate the total balance
let totalBalance = 0;
for (let account in balances) {
totalBalance += balances[account].Total;
}

// Calculate the fraction of each account's balance over the total
let fractions = {};
for (let account in balances) {
if (account in fractions) {
fractions[account] = fractions[account] + (balances[account].Total / totalBalance);
} else {
fractions[account] = balances[account].Total / totalBalance;
}
}

// Write the output to a new JSON file
fs.writeFileSync('output.json', JSON.stringify(fractions, null, 2));
Loading
Loading