Skip to content

Commit

Permalink
Moved PalletId and AccountId to primitives. (#1437)
Browse files Browse the repository at this point in the history
* 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 489fc9c.

* 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 489fc9c.

* 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 489fc9c.

* 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 489fc9c.

* 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 489fc9c.

* 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 489fc9c.

* 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]>
  • Loading branch information
7 people authored Sep 25, 2024
1 parent 394f729 commit 1a87eec
Show file tree
Hide file tree
Showing 39 changed files with 181 additions and 252 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

26 changes: 9 additions & 17 deletions pallets/bb-bnc/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@

use crate as bb_bnc;
use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::MoonbeamChainId;
pub use bifrost_primitives::{
currency::*, CurrencyId, CurrencyIdMapping, SlpxOperator, TokenSymbol,
};
use bifrost_primitives::{
BifrostEntranceAccount, BifrostExitAccount, BifrostFeeAccount, BuyBackAccount,
IncentivePalletId, IncentivePoolAccount, MoonbeamChainId,
};
use bifrost_runtime_common::{micro, milli};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
Expand All @@ -35,10 +38,8 @@ use frame_support::{
pallet_prelude::Get,
parameter_types,
traits::{Everything, Nothing},
PalletId,
};
use frame_system::{EnsureRoot, EnsureSignedBy};
use hex_literal::hex;
use orml_traits::{location::RelativeReserveProvider, parameter_type_with_key};
use sp_core::ConstU32;
use sp_runtime::{
Expand Down Expand Up @@ -90,7 +91,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const NativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::BNC);
pub const NativeCurrencyId: CurrencyId = BNC;
}

pub type AdaptedBasicCurrency =
Expand All @@ -105,11 +106,8 @@ impl bifrost_currencies::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = 1;
// pub const NativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::BNC);
// pub const RelayCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::KSM);
pub const StableCurrencyId: CurrencyId = CurrencyId::Stable(TokenSymbol::KUSD);
// pub SelfParaId: u32 = ParachainInfo::parachain_id().into();
pub const PolkadotCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::DOT);
pub const StableCurrencyId: CurrencyId = KUSD;
pub const PolkadotCurrencyId: CurrencyId = DOT;
}

impl pallet_balances::Config for Runtime {
Expand Down Expand Up @@ -192,15 +190,11 @@ impl orml_xtokens::Config for Runtime {
parameter_types! {
pub const MaximumUnlockIdOfUser: u32 = 1_000;
pub const MaximumUnlockIdOfTimeUnit: u32 = 1_000;
pub BifrostEntranceAccount: PalletId = PalletId(*b"bf/vtkin");
pub BifrostExitAccount: PalletId = PalletId(*b"bf/vtout");
pub BifrostFeeAccount: AccountId = hex!["e4da05f08e89bf6c43260d96f26fffcfc7deae5b465da08669a9d008e64c2c63"].into();
pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo");
}

ord_parameter_types! {
pub const One: AccountId = ALICE;
pub const RelayCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::KSM);
pub const RelayCurrencyId: CurrencyId = KSM;
}

impl bifrost_vtoken_minting::Config for Runtime {
Expand Down Expand Up @@ -240,9 +234,7 @@ impl bifrost_asset_registry::Config for Runtime {
}

parameter_types! {
pub const BbBNCTokenType: CurrencyId = CurrencyId::VToken(TokenSymbol::BNC);
pub IncentivePalletId: PalletId = PalletId(*b"bf/bbict");
pub const BuyBackAccount: PalletId = PalletId(*b"bf/bybck");
pub const BbBNCTokenType: CurrencyId = VBNC;
pub const Week: BlockNumber = 50400; // a week
pub const MaxBlock: BlockNumber = 10512000; // four years
pub const Multiplier: Balance = 10_u128.pow(12);
Expand Down
24 changes: 8 additions & 16 deletions pallets/buy-back/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
#![allow(non_upper_case_globals)]

use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::MoonbeamChainId;
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator, TokenSymbol};
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator};
use bifrost_primitives::{
BifrostEntranceAccount, BifrostExitAccount, BifrostFeeAccount, BuyBackAccount,
IncentivePalletId, IncentivePoolAccount, LiquidityAccount, MoonbeamChainId, ZenlinkPalletId,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand All @@ -32,10 +35,8 @@ use frame_support::{
parameter_types,
sp_runtime::{traits::ConvertInto, DispatchError, DispatchResult},
traits::{Everything, Nothing},
PalletId,
};
use frame_system::{EnsureRoot, EnsureSignedBy};
use hex_literal::hex;
use orml_traits::{location::RelativeReserveProvider, parameter_type_with_key, MultiCurrency};
use sp_core::ConstU32;
use sp_runtime::{
Expand Down Expand Up @@ -104,7 +105,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::BNC);
pub const GetNativeCurrencyId: CurrencyId = BNC;
}

pub type AdaptedBasicCurrency =
Expand Down Expand Up @@ -158,14 +159,11 @@ impl orml_tokens::Config for Runtime {

parameter_types! {
pub const TreasuryAccount: AccountId32 = TREASURY_ACCOUNT;
pub BifrostVsbondAccount: PalletId = PalletId(*b"bf/salpb");
pub const BuyBackAccount: PalletId = PalletId(*b"bf/bybck");
pub const LiquidityAccount: PalletId = PalletId(*b"bf/liqdt");
}

ord_parameter_types! {
pub const One: AccountId = ALICE;
pub const RelayCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::KSM);
pub const RelayCurrencyId: CurrencyId = KSM;
}

impl bifrost_buy_back::Config for Runtime {
Expand Down Expand Up @@ -283,10 +281,6 @@ impl orml_xtokens::Config for Runtime {
parameter_types! {
pub const MaximumUnlockIdOfUser: u32 = 10;
pub const MaximumUnlockIdOfTimeUnit: u32 = 50;
pub BifrostEntranceAccount: PalletId = PalletId(*b"bf/vtkin");
pub BifrostExitAccount: PalletId = PalletId(*b"bf/vtout");
pub BifrostFeeAccount: AccountId = hex!["e4da05f08e89bf6c43260d96f26fffcfc7deae5b465da08669a9d008e64c2c63"].into();
pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo");
}

impl bifrost_vtoken_minting::Config for Runtime {
Expand Down Expand Up @@ -316,7 +310,6 @@ impl bifrost_vtoken_minting::Config for Runtime {
}

parameter_types! {
pub const ZenlinkPalletId: PalletId = PalletId(*b"/zenlink");
pub const GetExchangeFee: (u32, u32) = (3, 1000); // 0.3%
pub const SelfParaId: u32 = 2001;
}
Expand Down Expand Up @@ -465,8 +458,7 @@ impl pallet_xcm::Config for Runtime {
}

parameter_types! {
pub const BbBNCTokenType: CurrencyId = CurrencyId::VToken(TokenSymbol::BNC);
pub IncentivePalletId: PalletId = PalletId(*b"bf/bbict");
pub const BbBNCTokenType: CurrencyId = VBNC;
pub const Week: BlockNumber = 50400; // a week
pub const MaxBlock: BlockNumber = 10512000; // four years
pub const Multiplier: Balance = 10_u128.pow(12);
Expand Down
1 change: 1 addition & 0 deletions pallets/buy-back/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#![cfg(test)]

use crate::{mock::*, *};
use bifrost_primitives::IncentivePalletId;
use frame_support::{assert_noop, assert_ok};
use sp_arithmetic::per_things::Permill;

Expand Down
8 changes: 3 additions & 5 deletions pallets/channel-commission/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

use crate::mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::OnInitialize;
use bifrost_primitives::{
currency::{BNC, KSM},
CurrencyId, TokenSymbol,
currency::{ASG, BNC, KSM},
CommissionPalletId, CurrencyId,
};
use frame_support::{derive_impl, ord_parameter_types, parameter_types, traits::Nothing, PalletId};
use frame_system::EnsureSignedBy;
Expand Down Expand Up @@ -66,7 +66,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::ASG);
pub const GetNativeCurrencyId: CurrencyId = ASG;
}

pub type AdaptedBasicCurrency =
Expand Down Expand Up @@ -127,10 +127,8 @@ ord_parameter_types! {
}

parameter_types! {
pub const CommissionPalletId: PalletId = PalletId(*b"bf/comms");
pub const ClearingDuration: u32 = 100;
pub const NameLengthLimit: u32 = 20;
pub const FeeSharePalletId: PalletId = PalletId(*b"bf/feesh");
pub BifrostCommissionReceiver: AccountId = AccountId32::new([7u8; 32]);
}

Expand Down
14 changes: 4 additions & 10 deletions pallets/clouds-convert/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::{
currency::{BNC, CLOUD, KSM, VBNC, VKSM},
CurrencyId, CurrencyIdMapping, TokenSymbol,
BuyBackAccount, CloudsPalletId, CurrencyId, CurrencyIdMapping, IncentivePalletId,
};
use frame_support::{ord_parameter_types, parameter_types, traits::Nothing, PalletId};
use frame_support::{ord_parameter_types, parameter_types, traits::Nothing};
use frame_system::EnsureSignedBy;
use sp_core::H256;
use sp_runtime::{
Expand Down Expand Up @@ -95,7 +95,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const NativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::BNC);
pub const NativeCurrencyId: CurrencyId = BNC;
}

pub type AdaptedBasicCurrency =
Expand Down Expand Up @@ -166,10 +166,6 @@ impl bifrost_asset_registry::Config for Runtime {
type WeightInfo = ();
}

parameter_types! {
pub const CloudsPalletId: PalletId = PalletId(*b"bf/cloud");
}

impl bifrost_clouds_convert::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type MultiCurrency = Currencies;
Expand All @@ -180,9 +176,7 @@ impl bifrost_clouds_convert::Config for Runtime {
}

parameter_types! {
pub const BbBNCTokenType: CurrencyId = CurrencyId::VToken(TokenSymbol::BNC);
pub IncentivePalletId: PalletId = PalletId(*b"bf/bbict");
pub const BuyBackAccount: PalletId = PalletId(*b"bf/bybck");
pub const BbBNCTokenType: CurrencyId = VBNC;
pub const Week: BlockNumber = 50400; // a week
pub const MaxBlock: BlockNumber = 10512000; // four years
pub const Multiplier: Balance = 10_u128.pow(12);
Expand Down
7 changes: 3 additions & 4 deletions pallets/cross-in-out/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#![allow(non_upper_case_globals)]

use bifrost_primitives::{
currency::{BNC, DOT, KSM, VDOT},
CurrencyId, TokenSymbol,
currency::{ASG, BNC, DOT, KSM, VDOT},
CurrencyId, SlpEntrancePalletId,
};
use frame_support::{derive_impl, ord_parameter_types, parameter_types, traits::Nothing, PalletId};
use frame_system::EnsureSignedBy;
Expand Down Expand Up @@ -65,7 +65,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::ASG);
pub const GetNativeCurrencyId: CurrencyId = ASG;
}

pub type AdaptedBasicCurrency =
Expand Down Expand Up @@ -126,7 +126,6 @@ ord_parameter_types! {
}

parameter_types! {
pub const SlpEntrancePalletId: PalletId = PalletId(*b"bf/vtkin");
pub const MaxLengthLimit: u32 = 100;
}

Expand Down
4 changes: 0 additions & 4 deletions pallets/deprecated/lightening-redeem/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const LighteningRedeemPalletId: PalletId = PalletId(*b"lighten#");
}

impl bifrost_lightening_redeem::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type MultiCurrency = Tokens;
Expand Down
1 change: 0 additions & 1 deletion pallets/deprecated/liquidity-mining/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ parameter_types! {
pub const MinimumDuration: BlockNumber = MINUTES;
pub const MaximumApproved: u32 = 4;
pub const MaximumOptionRewards: u32 = 7;
pub const LiquidityMiningPalletId: PalletId = PalletId(*b"mining##");
}

impl lm::Config for Test {
Expand Down
1 change: 0 additions & 1 deletion pallets/deprecated/salp-lite/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ impl bifrost_currencies::Config for Test {

parameter_types! {
pub const MinContribution: Balance = 10;
pub const BifrostCrowdloanId: PalletId = PalletId(*b"bf/salp#");
pub const RemoveKeysLimit: u32 = 50;
pub const SlotLength: BlockNumber = 8u32 as BlockNumber;
pub const LeasePeriod: BlockNumber = 6 * WEEKS;
Expand Down
21 changes: 7 additions & 14 deletions pallets/deprecated/system-maker/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
#![allow(non_upper_case_globals)]

use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::MoonbeamChainId;
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator, TokenSymbol};
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator};
use bifrost_primitives::{
BifrostEntranceAccount, BifrostExitAccount, BifrostFeeAccount, IncentivePoolAccount,
MoonbeamChainId, SystemMakerPalletId, ZenlinkPalletId,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand All @@ -32,10 +35,8 @@ use frame_support::{
parameter_types,
sp_runtime::{DispatchError, DispatchResult},
traits::{Everything, Nothing},
PalletId,
};
use frame_system::{EnsureRoot, EnsureSignedBy};
use hex_literal::hex;
use orml_traits::{location::RelativeReserveProvider, parameter_type_with_key, MultiCurrency};
use sp_core::ConstU32;
use sp_runtime::{
Expand Down Expand Up @@ -103,7 +104,7 @@ impl frame_system::Config for Runtime {
}

parameter_types! {
pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native(TokenSymbol::ASG);
pub const GetNativeCurrencyId: CurrencyId = ASG;
}

pub type AdaptedBasicCurrency =
Expand Down Expand Up @@ -157,14 +158,11 @@ impl orml_tokens::Config for Runtime {

parameter_types! {
pub const TreasuryAccount: AccountId32 = TREASURY_ACCOUNT;
pub BifrostVsbondAccount: PalletId = PalletId(*b"bf/salpb");
pub const SystemMakerPalletId: PalletId = PalletId(*b"bf/sysmk");
}

ord_parameter_types! {
pub const One: AccountId = ALICE;
// pub const RelayChainTokenSymbolKSM: TokenSymbol = TokenSymbol::KSM;
pub const RelayCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::KSM);
pub const RelayCurrencyId: CurrencyId = KSM;
}

impl bifrost_system_maker::Config for Runtime {
Expand Down Expand Up @@ -282,10 +280,6 @@ impl orml_xtokens::Config for Runtime {
parameter_types! {
pub const MaximumUnlockIdOfUser: u32 = 10;
pub const MaximumUnlockIdOfTimeUnit: u32 = 50;
pub BifrostEntranceAccount: PalletId = PalletId(*b"bf/vtkin");
pub BifrostExitAccount: PalletId = PalletId(*b"bf/vtout");
pub BifrostFeeAccount: AccountId = hex!["e4da05f08e89bf6c43260d96f26fffcfc7deae5b465da08669a9d008e64c2c63"].into();
pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo");
}

impl bifrost_vtoken_minting::Config for Runtime {
Expand Down Expand Up @@ -315,7 +309,6 @@ impl bifrost_vtoken_minting::Config for Runtime {
}

parameter_types! {
pub const ZenlinkPalletId: PalletId = PalletId(*b"/zenlink");
pub const GetExchangeFee: (u32, u32) = (3, 1000); // 0.3%
pub const SelfParaId: u32 = 2001;
}
Expand Down
Loading

0 comments on commit 1a87eec

Please sign in to comment.