Skip to content

Commit

Permalink
Bifrost v0.15.0 (#1485)
Browse files Browse the repository at this point in the history
* Bifrost v0.15.0

* Migrated benchmarking of asset-registry from v1 to v2. (#1486)

* Feat/ban vbnc transfer (#1487)

* Bifrost v0.14.0

* Feat/optimize salp (#1433)

* Backup salp pallet

* remove unused BancorHandler

* remove unused Call of SALP

* remove extra fee of bifrost_salp::Call::contribute in runtime

* adjust test and benchmarking

* remove unused interface type of SALP

* fix clippy

* Optimised calculation of evm fee (#1434)

* Optimised calculation of evm fee

* Update gas_fee_price to weth_price

* Moved PalletId and AccountId to primitives. (#1437)

* Bifrost v0.13.0

* Remove getter in buy-back. (#1354)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Fix generate_genesis_state (#1317)

* Optimize oracle (#1318)

* refactor: 💡 optimize orml-oracle

* fix: 🐛 MinimumTimestampInterval

* style: 💄 rename to MaximumValueInterval

* Add some tests for ve-minting

* Add some tests for ve-minting

* Integrate evm (#1319)

* Update dep

* Ingrate EVM

* Fix deps

* Add precompiles.rs

* Remove pallet-hotfix-sufficients

* Add pallet-evm-accounts

* Evm precompiles

* EVM integration

* Fix compile

* Fix rpc

* Fix `encode_evm_address` and `decode_evm_address`

* Fix evm precompile multicurrency

* Implementing Erc20Mapping using xc-20 standard

* Compatible with BNC Decimal

* Increase min_gas_price

* feat: enable dev mode with manual seal & fix pending block problem

* Add copyright and fix some bugs

* Change native token to WETH

* Support evm flexible fee

* Add inner_swap_exact_assets_for_assets to evm withdraw fee

* Remove swap

* EVM migration from bifrost kusama to bifrost polkadot

* Fix erc20 precompile

* Use OraclePrice

* Fix some errors

* feat: add prices genesis config & optimize dev mode code

* Fix conflicts

* Fix some errors

* Fix clippy

* Format Cargo.toml

* Remove unused code

* Fix clippy

* Fix some errors

* Fix erc20 precompile

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Fix try-runtime (#1323)

* Fix manual seal

* Fix manual seal (#1324)

* fix: 🐛 fellowship collective data (#1325)

* fix: add parachain mock inherent data provider

* Fix ethereum transfer fee (#1328)

* Add evm genesis migration (#1338)

* Bifrost v0.12.0 (#1286)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Fix generate_genesis_state (#1317)

* Optimize oracle (#1318)

* refactor: 💡 optimize orml-oracle

* fix: 🐛 MinimumTimestampInterval

* style: 💄 rename to MaximumValueInterval

* Add some tests for ve-minting

* Add some tests for ve-minting

* Integrate evm (#1319)

* Update dep

* Ingrate EVM

* Fix deps

* Add precompiles.rs

* Remove pallet-hotfix-sufficients

* Add pallet-evm-accounts

* Evm precompiles

* EVM integration

* Fix compile

* Fix rpc

* Fix `encode_evm_address` and `decode_evm_address`

* Fix evm precompile multicurrency

* Implementing Erc20Mapping using xc-20 standard

* Compatible with BNC Decimal

* Increase min_gas_price

* feat: enable dev mode with manual seal & fix pending block problem

* Add copyright and fix some bugs

* Change native token to WETH

* Support evm flexible fee

* Add inner_swap_exact_assets_for_assets to evm withdraw fee

* Remove swap

* EVM migration from bifrost kusama to bifrost polkadot

* Fix erc20 precompile

* Use OraclePrice

* Fix some errors

* feat: add prices genesis config & optimize dev mode code

* Fix conflicts

* Fix some errors

* Fix clippy

* Format Cargo.toml

* Remove unused code

* Fix clippy

* Fix some errors

* Fix erc20 precompile

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Fix try-runtime (#1323)

* Fix manual seal

* Fix manual seal (#1324)

* fix: 🐛 fellowship collective data (#1325)

* fix: add parachain mock inherent data provider

* Fix ethereum transfer fee (#1328)

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Add evm genesis storage

* [skip ci] Add evmSince

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Bump version to 0.12.1

* Update Cargo.lock

* Fix migration (#1341)

* Bifrost v0.12.0 (#1286)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Fix generate_genesis_state (#1317)

* Optimize oracle (#1318)

* refactor: 💡 optimize orml-oracle

* fix: 🐛 MinimumTimestampInterval

* style: 💄 rename to MaximumValueInterval

* Add some tests for ve-minting

* Add some tests for ve-minting

* Integrate evm (#1319)

* Update dep

* Ingrate EVM

* Fix deps

* Add precompiles.rs

* Remove pallet-hotfix-sufficients

* Add pallet-evm-accounts

* Evm precompiles

* EVM integration

* Fix compile

* Fix rpc

* Fix `encode_evm_address` and `decode_evm_address`

* Fix evm precompile multicurrency

* Implementing Erc20Mapping using xc-20 standard

* Compatible with BNC Decimal

* Increase min_gas_price

* feat: enable dev mode with manual seal & fix pending block problem

* Add copyright and fix some bugs

* Change native token to WETH

* Support evm flexible fee

* Add inner_swap_exact_assets_for_assets to evm withdraw fee

* Remove swap

* EVM migration from bifrost kusama to bifrost polkadot

* Fix erc20 precompile

* Use OraclePrice

* Fix some errors

* feat: add prices genesis config & optimize dev mode code

* Fix conflicts

* Fix some errors

* Fix clippy

* Format Cargo.toml

* Remove unused code

* Fix clippy

* Fix some errors

* Fix erc20 precompile

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Fix try-runtime (#1323)

* Fix manual seal

* Fix manual seal (#1324)

* fix: 🐛 fellowship collective data (#1325)

* fix: add parachain mock inherent data provider

* Fix ethereum transfer fee (#1328)

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Add evm genesis storage

* [skip ci] Add evmSince

* Fix migration

* Fix migration

* Remove unused code

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Remove getter in buy-back

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Remove getters in xcm-interface (#1352)

* Remove getters in salp. (#1351)

* Remove getter in evm-accounts (#1350)

* Remove getters in slp (#1353)

* Remove getters in slpx (#1360)

* Remove getters in vstoken-conversion. (#1362)

* Remove getters in vtoken-minting. (#1363)

* Remove getter in system-maker. (#1364)

* Remove getter in fee-share (#1365)

* Remove getters in prices (#1367)

* Remove getters in lend-market (#1366)

* Remove getters in ve-minting (#1368)

* Optimize clippy (#1369)

* Deprecated unused pallets (#1383)

* Review format (#1386)

* style: 💄 format

* style: 💄 check-all

* fix: 🐛 bench

* Update buy back (#1387)

* style: 💄 format

* style: 💄 check-all

* fix: 🐛 bench

* feat: 🎸 add destruction_ratio

* fix: 🐛 benchmark

* EVM flexible fee logic optimization (#1370)

* EVM flexible fee logic optimization

* Add comments

* Add support for handling different currency precisions & included error handling.

* Adjust the gas_fee parameter in the get_balance_in_currency method to an exact value

* fix clippy

* add test code of flexiable-fee pallet

* Update fee share (#1395)

* feat: 🎸 add usd_cumulation

* feat: 🎸 bench

* fix: 🐛 fmt

* docs: ✏️ add note

* Feat/change evm address convert rule (#1396)

* Change EVM Address convert rule

* Change EVM Address convert rule

* Remove the unused function:is_evm_account & rename truncated_account_id function to convert_account_id

* fix clippy

* refactor: 💡 move to TechAdmin (#1398)

* refactor: 💡 transfer to BuyBackAccount (#1399)

* Fix mint_with_channel_id weights (#1400)

* Recoverd imgs of banner and logo (#1401)

* feat: 🎸 add fn set_swap_out_min (#1389)

* feat: 🎸 add fn set_swap_out_min

* fix: 🐛 fmt

* fix: 🐛 fmt

* fix: 🐛 error

* feat: 🎸 add bais

* fix: 🐛 add test

* fix: 🐛 rename field bias

* Optimize the `channel-commission` code. (#1390)

* Optimize the `channel-commission` code.

* Replace the insert method with the mutate method

* Added a result check for the clear_prefix method

* Supplement the test code of `channel-commission`.

* Handling Error cases in hooks.

* Optimize the handling of the `check_removed_all` method.

* Remove getters in cross-in-out (#1402)

* Removed getters in channel-commission. (#1404)

* Removed getters in flexible-fee. (#1405)

* Removed getters in channel-commission.

* Removed getters in flexible-fee.

* Removed getters in parachain-staking. (#1406)

* Removed getters in channel-commission.

* Removed getters in flexible-fee.

* Removed getterd in parachain-staking.

* Update buy back (#1407)

* fix: 🐛 add field last_buyback_cycle for accurate judgment

* style: 💄 fmt

* Update ve minting (#1408)

* refactor: 💡 transfer to BuyBackAccount

* feat: 🎸 add auto notify_reward

* Removed getters in stable-asset and system-staking. (#1409)

* Removed getters in channel-commission.

* Removed getters in flexible-fee.

* Removed getterd in parachain-staking.

* Removed getters in stable-asset.

* Removed getters in stable-asset.

* Removed getters in token-issuer. (#1410)

* Removed getters in channel-commission.

* Removed getters in flexible-fee.

* Removed getterd in parachain-staking.

* Removed getters in stable-asset.

* Removed getters in stable-asset.

* Removed getters in token-issuer.

---------

Co-authored-by: Edwin <[email protected]>

* Moved PrarachainId to primitives. (#1394)

* Moved PrarachainId to primitives

* updated

* bug fixed

* Moved parachain ids to primitives.

* bug fixed

* Fixed error.

* Removed getters in vsbond-auction. (#1412)

* Fix evm TransferEvmFees (#1411)

* Add slp v2 (#1397)

* Add slp v2

* Add slp v2 weights

* Optimize slp v2

* Optimize slp v2

* Remove operator

* Feat/vbnc convert (#1413)

* Add vbnc-convert pallet

* add weights.rs of vbnc-convert pallet

* update token id of VBNC_P

* update weight of vbnc-convert pallet

* Supplement the comments of `vbnc-convert`.

* update VBNCConvert index in Runtime enum

* Optimize vbnc-convert pallet pallet.

* Updated (#1416)

* Add more slp v2 docs (#1419)

* Optimize xcm config (#1417)

* Optimize xcm config

* Fix moonbeam chain id

* Update fee share (#1418)

* refactor: 💡 for review

* fix: 🐛 mv storage

* fix: 🐛 bench

* refactor: 💡 fmt

---------

Co-authored-by: Edwin <[email protected]>

* Moved PalletId and AccountId to primitives

* Optimize slp v2 (#1423)

* Optimize slp v2

* Optimize weights

* fix: 🐛 redefine system pool id (#1421)

* fix: 🐛 redefine system pool id

* fix: 🐛 auto_notify_reward

* refactor: 💡 rename to bb-bnc

* style: 💄 clippy

* fix: 🐛 rename error

* refactor: 💡 rm BbBNCPalletId

* fix: 🐛 UserFarmingPool bound limit

* Moved CurrencyId to primitives.

* Updated to the latest version.

* change VBNC_P_TOKEN_ID to 5 (#1425)

* updated

* update

* updated

* updated

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Optimize xcm interface (#1439)

* Optimize xcm-interface pallet

* Add weights

* Add weights

* Add weights

* Optimize xcm-interface pallet

* remove unnecessary call method of cross-in-out (#1440)

&& optimize cross-in-out pallet

* Update bb bnc (#1436)

* refactor: 💡 for review

* docs: ✏️ add docs

* fix: 🐛 docs

* fix: 🐛 add event && addr rename

* Optimize slpx pallet (#1444)

* Moved palletId in runtime to primitives (#1443)

* Optimize asset registry (#1445)

* optimize asset-registry & remove unused call

* backup asset-registry pallet

* Removed getters in farming (#1446)

* Removed getters in vesting. (#1447)

* Removed getters in vesting

* updated

* updated

* Feat/vtoken voting vbnc (#1442)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Refactor code structure: extract the vote operation from the relaychain.

* Refactor code structure: extract the remove_vote operation from the relaychain.

* Move the XCM-related methods into the relaychain_agent.

* Move the call.rs into the relaychain_agent.

* vtokenvoting functionality supports vBNC

* Bifrost v0.13.0

* Remove getter in buy-back. (#1354)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Fix generate_genesis_state (#1317)

* Optimize oracle (#1318)

* refactor: 💡 optimize orml-oracle

* fix: 🐛 MinimumTimestampInterval

* style: 💄 rename to MaximumValueInterval

* Add some tests for ve-minting

* Add some tests for ve-minting

* Integrate evm (#1319)

* Update dep

* Ingrate EVM

* Fix deps

* Add precompiles.rs

* Remove pallet-hotfix-sufficients

* Add pallet-evm-accounts

* Evm precompiles

* EVM integration

* Fix compile

* Fix rpc

* Fix `encode_evm_address` and `decode_evm_address`

* Fix evm precompile multicurrency

* Implementing Erc20Mapping using xc-20 standard

* Compatible with BNC Decimal

* Increase min_gas_price

* feat: enable dev mode with manual seal & fix pending block problem

* Add copyright and fix some bugs

* Change native token to WETH

* Support evm flexible fee

* Add inner_swap_exact_assets_for_assets to evm withdraw fee

* Remove swap

* EVM migration from bifrost kusama to bifrost polkadot

* Fix erc20 precompile

* Use OraclePrice

* Fix some errors

* feat: add prices genesis config & optimize dev mode code

* Fix conflicts

* Fix some errors

* Fix clippy

* Format Cargo.toml

* Remove unused code

* Fix clippy

* Fix some errors

* Fix erc20 precompile

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Fix try-runtime (#1323)

* Fix manual seal

* Fix manual seal (#1324)

* fix: 🐛 fellowship collective data (#1325)

* fix: add parachain mock inherent data provider

* Fix ethereum transfer fee (#1328)

* Add evm genesis migration (#1338)

* Bifrost v0.12.0 (#1286)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Allow to receive and send Ethereum assets

* Add constants

---------

Co-authored-by: yooml <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Disable supplement_fee_reserve (#1306)

* Remove call_switchgear and add tx_pause (#1308)

* Remove call_switchgear and add tx_pause

* Fix clippy

* Optimize flexible fee (#1307)

* Optimize flexible fee

* Fix bug

* Fix bug

* Add PalletId

* Add error handle

* feat: 🎸 add market-bond

* fix: 🐛 test-all

* fix: 🐛 try-runtime

* Add the channel_id field to the Minted event

* Upgrade to polkadot-v1.13.0 (#1312)

* Upgrade to polkadot-v1.13.0

* remove the warning

* Fix dep issues

* Upgrade to polkadot-v1.13.0

* supplement and upgrade the code

* Upgrade the new parts from v0.12.0

* Fix dep issues

* format Cargo.toml

* Modify the AddOrigin type of the fellowship in bifrost-polkadot

* Cancel the cross-in-out migration.

* fix clippy

---------

Co-authored-by: hqwangningbo <[email protected]>

* Use github dependencies (#1314)

* Fix flexible_fee TransferTo (#1315)

* Fix generate_genesis_state (#1317)

* Optimize oracle (#1318)

* refactor: 💡 optimize orml-oracle

* fix: 🐛 MinimumTimestampInterval

* style: 💄 rename to MaximumValueInterval

* Add some tests for ve-minting

* Add some tests for ve-minting

* Integrate evm (#1319)

* Update dep

* Ingrate EVM

* Fix deps

* Add precompiles.rs

* Remove pallet-hotfix-sufficients

* Add pallet-evm-accounts

* Evm precompiles

* EVM integration

* Fix compile

* Fix rpc

* Fix `encode_evm_address` and `decode_evm_address`

* Fix evm precompile multicurrency

* Implementing Erc20Mapping using xc-20 standard

* Compatible with BNC Decimal

* Increase min_gas_price

* feat: enable dev mode with manual seal & fix pending block problem

* Add copyright and fix some bugs

* Change native token to WETH

* Support evm flexible fee

* Add inner_swap_exact_assets_for_assets to evm withdraw fee

* Remove swap

* EVM migration from bifrost kusama to bifrost polkadot

* Fix erc20 precompile

* Use OraclePrice

* Fix some errors

* feat: add prices genesis config & optimize dev mode code

* Fix conflicts

* Fix some errors

* Fix clippy

* Format Cargo.toml

* Remove unused code

* Fix clippy

* Fix some errors

* Fix erc20 precompile

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Fix try-runtime (#1323)

* Fix manual seal

* Fix manual seal (#1324)

* fix: 🐛 fellowship collective data (#1325)

* fix: add parachain mock inherent data provider

* Fix ethereum transfer fee (#1328)

---------

Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Add evm genesis storage

* [skip ci] Add evmSince

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>
Co-authored-by: yooml <[email protected]>
Co-authored-by: Gemma <[email protected]>
Co-authored-by: Damian.lu <[email protected]>

* Bump version to 0.12.1

* Update Cargo.lock

* Fix migration (#1341)

* Bifrost v0.12.0 (#1286)

* Bifrost v0.12.0

* remove old migrations

* Fix vtokenVoting.removeDelegatorVote (#1288)

* add PollClass type

* add the calss parameter to the remove_delegator_vote method

* Add metadata hash (#1299)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* Fix compile

* feat: 🎸 add metadata-hash-extension (#1265)

* feat: 🎸 add metadata-hash-extension

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp supports XCMv4 and reconstruct integration tests (#1272)

* Fix compile

* Reconstruct integration tests and slp supports XCMv4

* Fix slp construct_xcm_message

* Feat/slpx mint add commission (#1273)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* Feat/add vtoken exchange rate rpc (#1274)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* fix bug: storage migration anomaly (#1276)

* SLPx mint support commission id

* remove the channel_id parameter from the mint method

* add mint_with_channel_id method

* perform data migration for OrderQueue storage

* slpx: set the default value of channel_id to 0

* resolve conflicts

* change the location of the old data structure during storage migration

* fix bug: storage migration anomaly

* Slp removes refund (#1275)

* Slp removes refund

* Fix clippy

* Feat/add vtoken exchange rate rpc (#1277)

* Add vtoken exchange rate rpc

* add the use of Vec

* supplement the RPC logic && fix bugs

* adjust the RPC exchange rate precision to three decimal places

* fix clippy

* supplement omissions: adjust the RPC exchange rate precision to three decimal places

* Remove dmp queue (#1279)

* fix: 🐛 CheckMetadataHash to false

* fix: 🐛 update sp-api

* refactor: 💡 fmt

* fix: 🐛 add metadata-hash

* fix: 🐛 add feature metadata-hash

* fix: 🐛 rm metadata-hash feature

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* refactor: 💡 update MaxTurnout and whitelisted_caller track (#1304)

* Allow to receive and send Ethereum assets (#1305)

* feat: 🎸 add buy-back

* Bifrost v0.10.001

* feat: 🎸 benchmark

* SLPx mint support commission id (#1261)

* Add vtoken exchange rate rpc (#1260)

* fix: 🐛 add event (#1263)

* add update_currency_metadata function (#1259)

* add update_currency_metadata function

* fix: 🐛 correct update_currency_metadata weight

* add the use of Vec (#1264)

* Add vtoken exchange rate rpc

* add the use of Vec

* Upgrade to Polkadot-SDK v1.7.0 (#1262)

* Bifrost v0.10.0

* fix: 🐛 clippy

* Fix chain spec (#1243)

* Upgrade to polkadot-v1.7.0

---------

Co-authored-by: SunTiebing <[email protected]>
Co-authored-by: Edwin Wang <[email protected]>

* feat: 🎸 add metadata-hash-extension (#1265)

* Fix compile (#1266)

* Fix/fix vtoken voting unlock (#1267)

* update the exchange rate of vtokenminting of vtokenvoting test

* Resolve the frozen anomaly when unlocking

* Revert "feat: 🎸 add metadata-hash-extension (#1265)" (#1268)

This reverts commit 489fc9c6adeae44d23edf449e74fde3d6aa40bc3.

* rename the version number to 0.11.0

* Slp suppo…
  • Loading branch information
8 people authored Nov 22, 2024
1 parent 25e7f28 commit a9098fb
Show file tree
Hide file tree
Showing 55 changed files with 1,950 additions and 1,514 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
make production-release
mkdir -p ${{ github.workspace }}/artifacts
mv ${{ github.workspace }}/target/production/bifrost ${{ github.workspace }}/artifacts/
mv ${{ github.workspace }}/artifacts/runtime/bifrost-kusama/target/srtool/release/wbuild/bifrost-kusama-runtime/bifrost_kusama_runtime.compact.compressed.wasm ${{ github.workspace }}/artifacts/
mv ${{ github.workspace }}/artifacts/runtime/bifrost-polkadot/target/srtool/release/wbuild/bifrost-polkadot-runtime/bifrost_polkadot_runtime.compact.compressed.wasm ${{ github.workspace }}/artifacts/
mv ${{ github.workspace }}/artifacts/runtime/bifrost-kusama/target/srtool/production/wbuild/bifrost-kusama-runtime/bifrost_kusama_runtime.compact.compressed.wasm ${{ github.workspace }}/artifacts/
mv ${{ github.workspace }}/artifacts/runtime/bifrost-polkadot/target/srtool/production/wbuild/bifrost-polkadot-runtime/bifrost_polkadot_runtime.compact.compressed.wasm ${{ github.workspace }}/artifacts/
pushd ${{ github.workspace }}/artifacts
sha256sum bifrost | tee bifrost.sha256
shasum -c bifrost.sha256
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.9.2
uses: chevdor/srtool-actions@v0.8.0
env:
BUILD_OPTS: "--features on-chain-release-build"
PARACHAIN_PALLET_ID: "0x05"
AUTHORIZE_UPGRADE_PREFIX: "0x02"
with:
profile: production
chain: ${{ matrix.chain }}
runtime_dir: runtime/${{ matrix.chain }}
- name: Summary
Expand Down
25 changes: 14 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ cumulus-pallet-aura-ext = { git = "https://github.com/parityt
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
Expand All @@ -179,7 +180,6 @@ pallet-authority-discovery = { git = "https://github.com/parityt
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
Expand Down Expand Up @@ -253,6 +253,7 @@ substrate-fixed = { git = "https://github.com/encoint
xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", package = "staging-xcm", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", package = "staging-xcm-executor", default-features = false }
xcm-fee-payment-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }

# polkadot-sdk (client)
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0" }
Expand Down
2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bifrost-cli"
version = "0.14.0"
version = "0.15.0"
authors = ["Liebi Technologies <[email protected]>"]
description = "Bifrost Parachain Node"
build = "build.rs"
Expand Down
88 changes: 75 additions & 13 deletions node/service/src/chain_spec/bifrost_polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use crate::chain_spec::{get_account_id_from_seed, get_from_seed, RelayExtensions};
use bifrost_kusama_runtime::constants::currency::Perbill;
use bifrost_parachain_staking::{InflationInfo, Range};
use bifrost_polkadot_runtime::{
constants::currency::DOLLARS, AccountId, Balance, BlockNumber, SS58Prefix,
};
Expand All @@ -26,15 +28,15 @@ use bifrost_primitives::{
CurrencyId::*,
TokenInfo, TokenSymbol, ASTR, BNC, DOT, DOT_TOKEN_ID, DOT_U, FIL, GLMR, MANTA,
};
use bifrost_runtime_common::AuraId;
use bifrost_runtime_common::{constants::time::HOURS, AuraId};
use cumulus_primitives_core::ParaId;
use fp_evm::GenesisAccount;
use frame_benchmarking::{account, whitelisted_caller};
use hex_literal::hex;
use sc_chain_spec::Properties;
use sc_service::ChainType;
use sp_core::{crypto::UncheckedInto, sr25519, H160, U256};
use sp_runtime::FixedU128;
use sp_runtime::{FixedU128, Percent};
use std::{collections::BTreeMap, str::FromStr};

const DEFAULT_PROTOCOL_ID: &str = "bifrost_polkadot";
Expand All @@ -47,6 +49,35 @@ pub fn ENDOWMENT() -> u128 {
1_000_000 * DOLLARS
}

const COLLATOR_COMMISSION: Perbill = Perbill::from_percent(10);
const PARACHAIN_BOND_RESERVE_PERCENT: Percent = Percent::from_percent(0);
const BLOCKS_PER_ROUND: u32 = 2 * HOURS;

pub fn inflation_config() -> InflationInfo<Balance> {
fn to_round_inflation(annual: Range<Perbill>) -> Range<Perbill> {
use bifrost_parachain_staking::inflation::{
perbill_annual_to_perbill_round, BLOCKS_PER_YEAR,
};
perbill_annual_to_perbill_round(
annual,
// rounds per year
BLOCKS_PER_YEAR / BLOCKS_PER_ROUND,
)
}
let annual = Range {
min: Perbill::from_percent(4),
ideal: Perbill::from_percent(5),
max: Perbill::from_percent(5),
};
InflationInfo {
// staking expectations
expect: Range { min: 100_000 * DOLLARS, ideal: 200_000 * DOLLARS, max: 500_000 * DOLLARS },
// annual inflation
annual,
round: to_round_inflation(annual),
}
}

fn bifrost_polkadot_properties() -> Properties {
let mut properties = sc_chain_spec::Properties::new();
let mut token_symbol: Vec<String> = vec![];
Expand All @@ -69,7 +100,8 @@ fn bifrost_polkadot_properties() -> Properties {
}

pub fn bifrost_polkadot_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
candidates: Vec<(AccountId, AuraId, Balance)>,
delegations: Vec<(AccountId, AccountId, Balance)>,
balances: Vec<(AccountId, Balance)>,
vestings: Vec<(AccountId, BlockNumber, BlockNumber, Balance)>,
id: ParaId,
Expand Down Expand Up @@ -101,15 +133,11 @@ pub fn bifrost_polkadot_genesis(
"parachainInfo": {
"parachainId": id
},
"collatorSelection": {
"invulnerables": invulnerables.iter().cloned().map(|(acc, _)| acc).collect::<Vec<_>>(),
"candidacyBond": 0
},
"session": {
"keys": invulnerables
"keys": candidates
.iter()
.cloned()
.map(|(acc, aura)| {
.map(|(acc, aura, _)| {
(
acc.clone(), // account id
acc, // validator id
Expand Down Expand Up @@ -141,6 +169,18 @@ pub fn bifrost_polkadot_genesis(
// EVM compatibility
"evmChainId": { "chainId": 996u64 },
"dynamicFee": { "minGasPrice": U256::from(560174200u64) },
"parachainStaking": {
"candidates": candidates
.iter()
.cloned()
.map(|(account, _, bond)| (account, bond))
.collect::<Vec<_>>(),
"delegations": delegations,
"inflationConfig": inflation_config(),
"collatorCommission": COLLATOR_COMMISSION,
"parachainBondReservePercent": PARACHAIN_BOND_RESERVE_PERCENT,
"blocksPerRound": BLOCKS_PER_ROUND,
},
"evm": { "accounts": evm_accounts },
})
}
Expand Down Expand Up @@ -239,9 +279,15 @@ pub fn local_testnet_config() -> ChainSpec {
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_from_seed::<AuraId>("Alice"),
ENDOWMENT() / 4,
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_from_seed::<AuraId>("Bob"),
ENDOWMENT() / 4,
),
(get_account_id_from_seed::<sr25519::Public>("Bob"), get_from_seed::<AuraId>("Bob")),
],
vec![],
balances,
vec![],
BifrostPolkadotChainId::get().into(),
Expand Down Expand Up @@ -352,9 +398,15 @@ pub fn dev_config() -> ChainSpec {
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_from_seed::<AuraId>("Alice"),
ENDOWMENT() / 4,
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_from_seed::<AuraId>("Bob"),
ENDOWMENT() / 4,
),
(get_account_id_from_seed::<sr25519::Public>("Bob"), get_from_seed::<AuraId>("Bob")),
],
vec![],
balances,
vec![],
BifrostPolkadotChainId::get().into(),
Expand All @@ -372,30 +424,34 @@ pub fn dev_config() -> ChainSpec {
}

pub fn paseo_config() -> ChainSpec {
let invulnerables: Vec<(AccountId, AuraId)> = vec![
let invulnerables: Vec<(AccountId, AuraId, Balance)> = vec![
(
// e2s2dTSWe9kHebF2FCbPGbXftDT7fY5AMDfib3j86zSi3v7
hex!["66204aeda74f07f77a4b6945681296763706f98d0f8aebb1b9ccdf6e9b7ac13f"].into(),
hex!["66204aeda74f07f77a4b6945681296763706f98d0f8aebb1b9ccdf6e9b7ac13f"]
.unchecked_into(),
ENDOWMENT(),
),
(
// fFjUFbokagaDRQUDzVhDcMZQaDwQvvha74RMZnyoSWNpiBQ
hex!["9c2d45edb30d4bf0c285d6809e28c55e871f10578c5a3ea62da152d03761d266"].into(),
hex!["9c2d45edb30d4bf0c285d6809e28c55e871f10578c5a3ea62da152d03761d266"]
.unchecked_into(),
ENDOWMENT(),
),
(
// fBAbVJAsbWsKTedTVYGrBB3Usm6Vx635z1N9PX2tZ2boT37
hex!["98b19fa5a3e98f693b7440de07b4744834ff0072cb704f1c6e33791953ac4924"].into(),
hex!["98b19fa5a3e98f693b7440de07b4744834ff0072cb704f1c6e33791953ac4924"]
.unchecked_into(),
ENDOWMENT(),
),
(
// c9eHvgbxTFzijvY3AnAKiRTHhi2hzS5SLCPzCkb4jP79MLu
hex!["12d3ab675d6503279133898efe246a63fdc8be685cc3f7bce079aac064108a7a"].into(),
hex!["12d3ab675d6503279133898efe246a63fdc8be685cc3f7bce079aac064108a7a"]
.unchecked_into(),
ENDOWMENT(),
),
];

Expand Down Expand Up @@ -442,6 +498,7 @@ pub fn paseo_config() -> ChainSpec {
.with_chain_type(ChainType::Live)
.with_genesis_config_patch(bifrost_polkadot_genesis(
invulnerables,
vec![],
balances,
vec![],
BifrostPolkadotChainId::get().into(),
Expand All @@ -458,30 +515,34 @@ pub fn paseo_config() -> ChainSpec {
.build()
}
pub fn chainspec_config() -> ChainSpec {
let invulnerables: Vec<(AccountId, AuraId)> = vec![
let invulnerables: Vec<(AccountId, AuraId, Balance)> = vec![
(
// dpEZwz5nHxEjQXcm3sjy6NTz83EGcBRXMBSyuuWSguiVGJB
hex!["5c7e9ccd1045cac7f8c5c77a79c87f44019d1dda4f5032713bda89c5d73cb36b"].into(),
hex!["5c7e9ccd1045cac7f8c5c77a79c87f44019d1dda4f5032713bda89c5d73cb36b"]
.unchecked_into(),
ENDOWMENT(),
),
(
// duNwrtscWpfuTzRkjtt431kUj1gsfwbPi1bzdQL4cmk9QAa
hex!["606b0aad375ae1715fbe6a07315136a8e9c1c84a91230f6a0c296c2953581335"].into(),
hex!["606b0aad375ae1715fbe6a07315136a8e9c1c84a91230f6a0c296c2953581335"]
.unchecked_into(),
ENDOWMENT(),
),
(
// gPQG97HPe54fJpLoFePwm3fxdJaU2VV71hYbqd4RJcNeQfe
hex!["ce42cea2dd0d4ac87ccdd5f0f2e1010955467f5a37587cf6af8ee2b4ba781034"].into(),
hex!["ce42cea2dd0d4ac87ccdd5f0f2e1010955467f5a37587cf6af8ee2b4ba781034"]
.unchecked_into(),
ENDOWMENT(),
),
(
// frYfsZhdVuG6Ap6AyJQLSHVqtKmUyqxo6ohnrmGTDk2neXK
hex!["b6ba81e73bd39203e006fc99cc1e41976745de2ea2007bf62ed7c9a48ccc5b1d"].into(),
hex!["b6ba81e73bd39203e006fc99cc1e41976745de2ea2007bf62ed7c9a48ccc5b1d"]
.unchecked_into(),
ENDOWMENT(),
),
];

Expand All @@ -503,6 +564,7 @@ pub fn chainspec_config() -> ChainSpec {
invulnerables,
vec![],
vec![],
vec![],
BifrostPolkadotChainId::get().into(),
vec![],
vec![],
Expand Down
Loading

0 comments on commit a9098fb

Please sign in to comment.