Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a3612a18c |
@@ -0,0 +1,2 @@
|
|||||||
|
genesis.json
|
||||||
|
genesis.tmp
|
||||||
+18
-32
@@ -2,11 +2,10 @@
|
|||||||
"app_state": {
|
"app_state": {
|
||||||
"assets": {
|
"assets": {
|
||||||
"73174a6fb1d5802ba0ac7bd7ab79e0a3a4837b262de0a4e80815a55442692bd0": {
|
"73174a6fb1d5802ba0ac7bd7ab79e0a3a4837b262de0a4e80815a55442692bd0": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "BTC (fake)",
|
"name": "BTC (fake)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "fBTC",
|
"symbol": "fBTC",
|
||||||
"total_supply": "21000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "1000000"
|
"max_faucet_amount_mint": "1000000"
|
||||||
@@ -14,11 +13,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"8566db7257222b5b7ef2886394ad28b938b28680a54a169bbc795027b89d6665": {
|
"8566db7257222b5b7ef2886394ad28b938b28680a54a169bbc795027b89d6665": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "DAI (fake)",
|
"name": "DAI (fake)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "fDAI",
|
"symbol": "fDAI",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "10000000000"
|
"max_faucet_amount_mint": "10000000000"
|
||||||
@@ -26,11 +24,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"e02d4c15d790d1d2dffaf2dcd1cf06a1fe656656cf4ed18c8ce99f9e83643567": {
|
"e02d4c15d790d1d2dffaf2dcd1cf06a1fe656656cf4ed18c8ce99f9e83643567": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "EURO (fake)",
|
"name": "EURO (fake)",
|
||||||
"symbol": "fEURO",
|
"symbol": "fEURO",
|
||||||
"total_supply": "1000000000",
|
"quantum": "1",
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "10000000000"
|
"max_faucet_amount_mint": "10000000000"
|
||||||
@@ -38,11 +35,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"816af99af60d684502a40824758f6b5377e6af48e50a9ee8ef478ecb879ea8bc": {
|
"816af99af60d684502a40824758f6b5377e6af48e50a9ee8ef478ecb879ea8bc": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "USDC (fake)",
|
"name": "USDC (fake)",
|
||||||
"symbol": "fUSDC",
|
"symbol": "fUSDC",
|
||||||
"total_supply": "1000000000",
|
"quantum": "1",
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "1000000000000"
|
"max_faucet_amount_mint": "1000000000000"
|
||||||
@@ -50,11 +46,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"62dfb1ab1cd488862b416cf163c75bc9a279226c65ac287c0dd67650daa444ee": {
|
"62dfb1ab1cd488862b416cf163c75bc9a279226c65ac287c0dd67650daa444ee": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "XYZ (α alpha)",
|
"name": "XYZ (α alpha)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "XYZalpha",
|
"symbol": "XYZalpha",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "100000000000"
|
"max_faucet_amount_mint": "100000000000"
|
||||||
@@ -62,11 +57,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dedb3c42e7bc88d98a7fe0d73c7b9870b34c62c79a713071bd4d645ef7c216ee": {
|
"dedb3c42e7bc88d98a7fe0d73c7b9870b34c62c79a713071bd4d645ef7c216ee": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "XYZ (β beta)",
|
"name": "XYZ (β beta)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "XYZbeta",
|
"symbol": "XYZbeta",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "100000000000"
|
"max_faucet_amount_mint": "100000000000"
|
||||||
@@ -74,11 +68,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"a0ea8a48eb5cb024e66be5777bea75165ffcaf0be82d9047e376ce352e202f76": {
|
"a0ea8a48eb5cb024e66be5777bea75165ffcaf0be82d9047e376ce352e202f76": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "XYZ (γ gamma)",
|
"name": "XYZ (γ gamma)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "XYZgamma",
|
"symbol": "XYZgamma",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "100000000000"
|
"max_faucet_amount_mint": "100000000000"
|
||||||
@@ -86,11 +79,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"9ed5dd08c88e38f1c92cb8f056bd9d0507512c9ea4e6f308936f73646187b8e9": {
|
"9ed5dd08c88e38f1c92cb8f056bd9d0507512c9ea4e6f308936f73646187b8e9": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "XYZ (δ delta)",
|
"name": "XYZ (δ delta)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "XYZdelta",
|
"symbol": "XYZdelta",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "100000000000"
|
"max_faucet_amount_mint": "100000000000"
|
||||||
@@ -98,11 +90,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bdcde894dcc4ffa11d6192065d84f9dcc75814cf24760ff4f3e50d64eaddbc02": {
|
"bdcde894dcc4ffa11d6192065d84f9dcc75814cf24760ff4f3e50d64eaddbc02": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "XYZ (ε epsilon)",
|
"name": "XYZ (ε epsilon)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "XYZepsilon",
|
"symbol": "XYZepsilon",
|
||||||
"total_supply": "1000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"builtin_asset": {
|
"builtin_asset": {
|
||||||
"max_faucet_amount_mint": "100000000000"
|
"max_faucet_amount_mint": "100000000000"
|
||||||
@@ -110,11 +101,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"{{.GetVegaContractID "tBTC"}}": {
|
"{{.GetVegaContractID "tBTC"}}": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "BTC (local)",
|
"name": "BTC (local)",
|
||||||
|
"quantum": "1",
|
||||||
"symbol": "tBTC",
|
"symbol": "tBTC",
|
||||||
"total_supply": "0",
|
|
||||||
"source": {
|
"source": {
|
||||||
"erc20": {
|
"erc20": {
|
||||||
"contract_address": "{{.GetEthContractAddr "tBTC"}}"
|
"contract_address": "{{.GetEthContractAddr "tBTC"}}"
|
||||||
@@ -122,11 +112,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"{{.GetVegaContractID "tDAI"}}": {
|
"{{.GetVegaContractID "tDAI"}}": {
|
||||||
"min_lp_stake": "1",
|
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
|
"quantum": "1",
|
||||||
"name": "DAI (local)",
|
"name": "DAI (local)",
|
||||||
"symbol": "tDAI",
|
"symbol": "tDAI",
|
||||||
"total_supply": "0",
|
|
||||||
"source": {
|
"source": {
|
||||||
"erc20": {
|
"erc20": {
|
||||||
"contract_address": "{{.GetEthContractAddr "tDAI"}}"
|
"contract_address": "{{.GetEthContractAddr "tDAI"}}"
|
||||||
@@ -134,11 +123,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"{{.GetVegaContractID "tEURO"}}": {
|
"{{.GetVegaContractID "tEURO"}}": {
|
||||||
"min_lp_stake": "1",
|
"quantum": "1",
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "EURO (local)",
|
"name": "EURO (local)",
|
||||||
"symbol": "tEURO",
|
"symbol": "tEURO",
|
||||||
"total_supply": "0",
|
|
||||||
"source": {
|
"source": {
|
||||||
"erc20": {
|
"erc20": {
|
||||||
"contract_address": "{{.GetEthContractAddr "tEURO"}}"
|
"contract_address": "{{.GetEthContractAddr "tEURO"}}"
|
||||||
@@ -146,11 +134,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"{{.GetVegaContractID "tUSDC"}}": {
|
"{{.GetVegaContractID "tUSDC"}}": {
|
||||||
"min_lp_stake": "1",
|
"quantum": "1",
|
||||||
"decimals": 5,
|
"decimals": 5,
|
||||||
"name": "USDC (local)",
|
"name": "USDC (local)",
|
||||||
"symbol": "tUSDC",
|
"symbol": "tUSDC",
|
||||||
"total_supply": "0",
|
|
||||||
"source": {
|
"source": {
|
||||||
"erc20": {
|
"erc20": {
|
||||||
"contract_address": "{{.GetEthContractAddr "tUSDC"}}"
|
"contract_address": "{{.GetEthContractAddr "tUSDC"}}"
|
||||||
@@ -158,11 +145,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"{{.GetVegaContractID "VEGA"}}": {
|
"{{.GetVegaContractID "VEGA"}}": {
|
||||||
"min_lp_stake": "1",
|
"quantum": "1",
|
||||||
"decimals": 18,
|
"decimals": 18,
|
||||||
"name": "Vega",
|
"name": "Vega",
|
||||||
"symbol": "VEGA",
|
"symbol": "VEGA",
|
||||||
"total_supply": "64999723000000000000000000",
|
|
||||||
"source": {
|
"source": {
|
||||||
"erc20": {
|
"erc20": {
|
||||||
"contract_address": "{{.GetEthContractAddr "VEGA"}}"
|
"contract_address": "{{.GetEthContractAddr "VEGA"}}"
|
||||||
@@ -171,7 +157,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
"ReplayAttackThreshold": 30
|
"replay_attack_threshold": 30
|
||||||
},
|
},
|
||||||
"network_parameters": {
|
"network_parameters": {
|
||||||
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .NetworkID }}\", \"chain_id\": \"{{ .ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
|
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .NetworkID }}\", \"chain_id\": \"{{ .ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
|
||||||
@@ -194,17 +180,17 @@
|
|||||||
"market.auction.minimumDuration": "3s",
|
"market.auction.minimumDuration": "3s",
|
||||||
"market.fee.factors.infrastructureFee": "0.001",
|
"market.fee.factors.infrastructureFee": "0.001",
|
||||||
"market.fee.factors.makerFee": "0.004",
|
"market.fee.factors.makerFee": "0.004",
|
||||||
|
"market.stake.target.timeWindow": "1h0m0s",
|
||||||
|
"market.stake.target.scalingFactor": "10",
|
||||||
"market.liquidity.stakeToCcyVolume": "0.3",
|
"market.liquidity.stakeToCcyVolume": "0.3",
|
||||||
"market.liquidity.targetstake.triggering.ratio": "0.7",
|
|
||||||
"market.liquidity.providersFeeCalculationTimeStep": "5s",
|
"market.liquidity.providersFeeCalculationTimeStep": "5s",
|
||||||
"network.checkpoint.timeElapsedBetweenCheckpoints": "10s",
|
"network.checkpoint.timeElapsedBetweenCheckpoints": "10s",
|
||||||
"reward.asset": "{{.GetVegaContractID "VEGA"}}",
|
"reward.asset": "{{.GetVegaContractID "VEGA"}}",
|
||||||
"reward.staking.delegation.competitionLevel": "3.1",
|
"reward.staking.delegation.competitionLevel": "3.1",
|
||||||
"reward.staking.delegation.delegatorShare": "0.883",
|
"reward.staking.delegation.delegatorShare": "0.883",
|
||||||
"reward.staking.delegation.maxPayoutPerParticipant": "700000000000000000000",
|
"reward.staking.delegation.maxPayoutPerParticipant": "700000000000000000000",
|
||||||
|
"reward.staking.delegation.maxPayoutPerEpoch": "7000000000000000000000",
|
||||||
"reward.staking.delegation.minimumValidatorStake": "3000000000000000000000",
|
"reward.staking.delegation.minimumValidatorStake": "3000000000000000000000",
|
||||||
"reward.staking.delegation.payoutDelay": "10s",
|
|
||||||
"reward.staking.delegation.payoutFraction": "0.007",
|
|
||||||
"spam.protection.delegation.min.tokens": "1000000000000000000",
|
"spam.protection.delegation.min.tokens": "1000000000000000000",
|
||||||
"spam.protection.max.delegations": "390",
|
"spam.protection.max.delegations": "390",
|
||||||
"spam.protection.max.proposals": "100",
|
"spam.protection.max.proposals": "100",
|
||||||
|
|||||||
Executable
+63
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
run_indented() {
|
||||||
|
local indent=${INDENT:-" "}
|
||||||
|
{ "$@" 2> >(sed "s/^/$indent/g" >&2); } | sed "s/^/$indent/g"
|
||||||
|
}
|
||||||
|
bold=$(tput bold)
|
||||||
|
normal=$(tput sgr0)
|
||||||
|
|
||||||
|
# The name of the application to check.
|
||||||
|
APPLICATION="vega"
|
||||||
|
DEBUG=false
|
||||||
|
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" = "debug" ]; then
|
||||||
|
# Set the flag to false if 'notidyup' is found
|
||||||
|
DEBUG=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
echo "${bold}# Setup${normal}"
|
||||||
|
# Check if the application exists.
|
||||||
|
if command -v "$APPLICATION" &> /dev/null; then
|
||||||
|
# Run the application if it exists.
|
||||||
|
run_indented "$APPLICATION" version
|
||||||
|
else
|
||||||
|
# Print an error message if the application doesn't exist.
|
||||||
|
echo "Error: $APPLICATION is not installed."
|
||||||
|
# Exit with a non-zero exit code to indicate failure.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "${bold}# Generating genesis${normal}"
|
||||||
|
run_indented vegacapsule template genesis --path genesis.tmpl > genesis.tmp
|
||||||
|
run_indented tail -n +3 genesis.tmp > genesis.json
|
||||||
|
run_indented rm genesis.tmp
|
||||||
|
|
||||||
|
if jq empty "genesis.json" &> /dev/null; then
|
||||||
|
run_indented echo ""
|
||||||
|
run_indented echo "${bold}The genesis.json file is valid JSON.${normal}"
|
||||||
|
else
|
||||||
|
run_indented echo ""
|
||||||
|
run_indented echo "${bold}The genesis.json file is invalid JSON.${normal}"
|
||||||
|
# Exit with a non-zero exit code to indicate failure
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $DEBUG; then
|
||||||
|
run_indented cat genesis.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "${bold}# Verifying genesis${normal}"
|
||||||
|
run_indented vega verify genesis genesis.json
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Tidy up
|
||||||
|
if [[ "$DEBUG" == "false" ]]; then
|
||||||
|
run_indented rm genesis.json
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user