Skip to content

Commit

Permalink
Feat/integrated hyperbridge (#1594)
Browse files Browse the repository at this point in the history
* Bifrost v0.16.0

* Migrated benchmarking of cross-in-out from v1 to v2. (#1519)

* Migrated benchmarking of stable-pool from v1 to v2. (#1520)

* Migrated benchmarking of flexible-fee from v1 to v2. (#1523)

* [skip ci]: update bifrost-polkadot chain spec for evm (#1526)

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

* Set the number of active collators to 4 (#1529)

* init channel commission cleared_commission (#1527)

* init channel commission cleared_commission

* normalize format

* fix clippy

* system-staking auto payout (#1528)

* upgrade v0.16.0 to stable2407

* Refactor farming gauge (#1509)

* 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)…
  • Loading branch information
9 people authored Jan 10, 2025
1 parent e4f53b3 commit 715fae4
Show file tree
Hide file tree
Showing 80 changed files with 16,749 additions and 367 deletions.
1,449 changes: 1,119 additions & 330 deletions Cargo.lock

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ members = [
"pallets/channel-commission",
"pallets/clouds-convert",
"pallets/vbnc-convert",
"pallets/ismp",

"runtime/bifrost-kusama",
"runtime/bifrost-paseo",
"runtime/bifrost-polkadot/src/evm/evm-utility/macro",
"runtime/bifrost-polkadot/src/evm/precompiles/call-permit",
"runtime/bifrost-polkadot",
Expand Down Expand Up @@ -96,12 +98,15 @@ bifrost-xcm-interface = { path = "pallets/xcm-interface", defau
lend-market = { path = "pallets/lend-market", default-features = false }
lend-market-rpc-runtime-api = { path = "pallets/lend-market/rpc/runtime-api", default-features = false }
leverage-staking = { path = "pallets/leverage-staking", default-features = false }
module-evm-utility = { path = "runtime/bifrost-polkadot/src/evm/evm-utility", default-features = false }
module-evm-utility-macro = { path = "runtime/bifrost-polkadot/src/evm/evm-utility/macro", default-features = false }
pallet-evm-precompile-call-permit = { path = "runtime/bifrost-polkadot/src/evm/precompiles/call-permit", default-features = false }
pallet-evm-accounts = { path = "pallets/evm-accounts", default-features = false }
pallet-evm-accounts-rpc-runtime-api = { path = "pallets/evm-accounts/rpc/runtime-api", default-features = false }
pallet-prices = { path = "pallets/prices", default-features = false }
pallet-traits = { path = "pallets/traits", default-features = false }
bifrost-ismp = { path = "pallets/ismp", default-features = false }
pallet-token-gateway = { path = "pallets/token-gateway", default-features = false }

# Zenlink
merkle-distributor = { git = "https://github.com/bifrost-io/Zenlink-DEX-Module", branch = "release-polkadot-stable2407", default-features = false }
Expand Down Expand Up @@ -151,6 +156,17 @@ pallet-evm-precompile-sha3fips = { git = "https://github.com/bifrost-io/frontier
pallet-evm-precompile-simple = { git = "https://github.com/bifrost-io/frontier", branch = "release-polkadot-stable2407", default-features = false }
precompile-utils = { git = "https://github.com/bifrost-io/frontier", branch = "release-polkadot-stable2407", default-features = false }

# Hyperbridge
pallet-ismp = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
pallet-ismp-rpc = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407" }
pallet-ismp-runtime-api = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
ismp-parachain = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
ismp-parachain-inherent = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
ismp-parachain-runtime-api = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
ismp = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
pallet-hyperbridge = { git = "https://github.com/polytope-labs/hyperbridge", branch = "polkadot-stable2407", default-features = false }
anyhow = { version = "1.0.93", default-features = false }

# polkadot-sdk (wasm)
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
Expand Down Expand Up @@ -223,6 +239,7 @@ sp-genesis-builder = { git = "https://github.com/parityt
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
Expand Down Expand Up @@ -285,9 +302,9 @@ xcm-emulator = { git = "https://github.com/pari
xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" }

# Other
slices = "0.2.0"
derive_more = "0.99.18"
libsecp256k1 = { version = "0.7", default-features = false }
slices = "0.2.0"
derive_more = "0.99.18"
libsecp256k1 = { version = "0.7", default-features = false }
async-trait = { version = "0.1.83" }
bstringify = { version = "0.1.2" }
clap = { version = "4.5.18" }
Expand Down Expand Up @@ -321,6 +338,9 @@ strum = { version = "0.26.3", default-features = false, features
strum_macros = { version = "0.26.2" }
syn = { version = "2.0.90", features = ["full", "fold", "extra-traits", "visit"] }
tiny-keccak = { version = "2.0", features = ["fips202"] }
alloy-sol-macro = "0.7.7"
alloy-sol-types = { version = "0.7.7", default-features = false }
alloy-primitives = { version = "0.7.7", default-features = false, features = ["rlp"] }

[profile.dev]
split-debuginfo = "unpacked"
Expand Down
4 changes: 3 additions & 1 deletion node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ fn set_default_ss58_version(spec: &Box<dyn ChainSpec>) {
/// Parse command line arguments into service configuration.
#[allow(unreachable_code)]
pub fn run() -> Result<()> {
let cli = Cli::from_args();
let mut cli = Cli::from_args();

cli.run.base.offchain_worker_params.indexing_enabled = true;

match &cli.subcommand {
Some(Subcommand::BuildSpec(cmd)) => {
Expand Down
3 changes: 3 additions & 0 deletions node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ fc-rpc-core = { workspace = true }
fc-storage = { workspace = true }
fp-rpc = { workspace = true, features = ["default"] }

pallet-ismp-runtime-api = { workspace = true }
pallet-ismp-rpc = { workspace = true }

23 changes: 19 additions & 4 deletions node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ use bifrost_vtoken_minting_rpc_runtime_api::VtokenMintingRuntimeApi;
use futures::channel::mpsc;
use lend_market_rpc::{LendMarket, LendMarketApiServer};
use lend_market_rpc_runtime_api::LendMarketApi;
use pallet_ismp_rpc::{IsmpApiServer, IsmpRpcHandler};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use sc_client_api::{AuxStore, BlockBackend, ProofProvider};
use sc_consensus_manual_seal::rpc::{EngineCommand, ManualSeal, ManualSealApiServer};
use sc_rpc_api::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use sp_core::H256;
use sp_runtime::traits::BlockIdTo;
use substrate_frame_rpc_system::{System, SystemApiServer};
use zenlink_protocol::AssetId;
Expand All @@ -78,7 +81,7 @@ pub struct FullDeps<C, P> {
}

/// Full client dependencies.
pub struct FullDepsPolkadot<C, P> {
pub struct FullDepsPolkadot<C, P, B> {
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
Expand All @@ -87,6 +90,8 @@ pub struct FullDepsPolkadot<C, P> {
pub deny_unsafe: DenyUnsafe,
/// Manual seal command sink
pub command_sink: Option<mpsc::Sender<EngineCommand<Hash>>>,
/// Backend used by the node.
pub backend: Arc<B>,
}

/// A IO handler that uses all Full RPC extensions.
Expand Down Expand Up @@ -140,12 +145,15 @@ where
}

/// RPC of bifrost-polkadot runtime.
pub fn create_full_polkadot<C, P>(
deps: FullDepsPolkadot<C, P>,
pub fn create_full_polkadot<C, P, B>(
deps: FullDepsPolkadot<C, P, B>,
) -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>>
where
C: ProvideRuntimeApi<Block>
+ HeaderBackend<Block>
+ AuxStore
+ BlockBackend<Block>
+ ProofProvider<Block>
+ HeaderMetadata<Block, Error = BlockChainError>
+ Send
+ Sync
Expand All @@ -162,6 +170,10 @@ where
C::Api: ZenlinkProtocolRuntimeApi<Block, AccountId, AssetId>,
C::Api: StablePoolRuntimeApi<Block>,
C::Api: BlockBuilder<Block>,
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
B::State: sc_client_api::StateBackend<sp_runtime::traits::HashingFor<Block>>,
// pallet_ismp_runtime_api bound
C::Api: pallet_ismp_runtime_api::IsmpRuntimeApi<Block, H256>,
P: TransactionPool + Sync + Send + 'static,
{
let mut module = RpcExtension::new(());
Expand All @@ -170,6 +182,7 @@ where
pool,
deny_unsafe,
command_sink,
backend,
} = deps;

module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
Expand All @@ -182,7 +195,9 @@ where
module.merge(ZenlinkProtocol::new(client.clone()).into_rpc())?;
module.merge(StablePoolRpc::new(client.clone()).into_rpc())?;
module.merge(LendMarket::new(client.clone()).into_rpc())?;
module.merge(VtokenMintingRpc::new(client).into_rpc())?;
module.merge(VtokenMintingRpc::new(client.clone()).into_rpc())?;

module.merge(IsmpRpcHandler::new(client, backend.clone())?.into_rpc())?;

if let Some(command_sink) = command_sink {
module.merge(
Expand Down
2 changes: 2 additions & 0 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ bifrost-salp-rpc-runtime-api = { workspace = true }
bifrost-farming-rpc-runtime-api = { workspace = true }
bb-bnc-rpc-runtime-api = { workspace = true }

ismp-parachain-inherent = { workspace = true }

[features]
default = [ "std" ]
std = []
Expand Down
19 changes: 18 additions & 1 deletion node/service/src/collator_polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,23 @@ fn start_consensus(
client.clone(),
);

let (client_clone, relay_chain_interface_clone) =
(client.clone(), relay_chain_interface.clone());
let params = AuraParams {
create_inherent_data_providers: move |_, ()| async move { Ok(()) },
create_inherent_data_providers: move |parent, ()| {
let client = client_clone.clone();
let relay_chain_interface = relay_chain_interface_clone.clone();
async move {
let inherent = ismp_parachain_inherent::ConsensusInherentProvider::create(
parent,
client,
relay_chain_interface,
)
.await?;

Ok(inherent)
}
},
block_import,
para_client: client.clone(),
para_backend: backend.clone(),
Expand Down Expand Up @@ -426,6 +441,7 @@ where
let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks);

let rpc_builder = {
let backend = backend.clone();
let client = client.clone();
let is_authority = parachain_config.role.is_authority();
let transaction_pool = transaction_pool.clone();
Expand All @@ -443,6 +459,7 @@ where
pool: transaction_pool.clone(),
deny_unsafe,
command_sink: None,
backend: backend.clone(),
};
let module = crate::rpc::create_full_polkadot(deps)?;

Expand Down
2 changes: 2 additions & 0 deletions node/service/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ where
let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks);

let rpc_builder = {
let backend = backend.clone();
let client = client.clone();
let is_authority = parachain_config.role.is_authority();
let transaction_pool = transaction_pool.clone();
Expand All @@ -224,6 +225,7 @@ where
pool: transaction_pool.clone(),
deny_unsafe,
command_sink: Some(command_sink.clone()),
backend: backend.clone(),
};
let module = crate::rpc::create_full_polkadot(deps)?;

Expand Down
13 changes: 11 additions & 2 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,26 @@ pub trait IdentifyVariant {
/// Returns if this is a configuration for the `Bifrost-Polkadot` network.
fn is_bifrost_polkadot(&self) -> bool;

/// Returns if this is a configuration for the `Bifrost-Paseo` network.
fn is_bifrost_paseo(&self) -> bool;

/// Returns if this is a configuration for the `Dev` network.
fn is_dev(&self) -> bool;
}

impl IdentifyVariant for Box<dyn sc_service::ChainSpec> {
fn is_bifrost_kusama(&self) -> bool {
self.id().starts_with("bifrost") && !self.id().starts_with("bifrost_polkadot")
self.id().starts_with("bifrost")
&& !self.id().starts_with("bifrost_polkadot")
&& !self.id().starts_with("bifrost_paseo")
}

fn is_bifrost_polkadot(&self) -> bool {
self.id().starts_with("bifrost_polkadot")
self.id().starts_with("bifrost_polkadot") || self.id().starts_with("bifrost_paseo")
}

fn is_bifrost_paseo(&self) -> bool {
self.id().starts_with("bifrost_paseo")
}

fn is_dev(&self) -> bool {
Expand Down
23 changes: 11 additions & 12 deletions pallets/asset-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#![cfg_attr(not(feature = "std"), no_std)]

pub use bifrost_primitives::{
AssetIds, CurrencyId,
AssetIds, AssetMetadata, CurrencyId,
CurrencyId::{Native, Token, Token2},
CurrencyIdConversion, CurrencyIdMapping, CurrencyIdRegister, ForeignAssetId, LeasePeriod,
ParaId, PoolId, TokenId, TokenInfo, TokenSymbol,
Expand All @@ -36,10 +36,10 @@ use frame_support::{
weights::Weight,
};
use frame_system::pallet_prelude::*;
use scale_info::{prelude::string::String, TypeInfo};
use scale_info::prelude::string::String;
use sp_runtime::{
traits::{One, UniqueSaturatedFrom},
ArithmeticError, RuntimeDebug,
ArithmeticError,
};
use sp_std::{boxed::Box, vec::Vec};
use xcm::{
Expand All @@ -62,14 +62,6 @@ pub use weights::WeightInfo;
pub type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;

#[derive(Clone, Eq, PartialEq, RuntimeDebug, Encode, Decode, TypeInfo)]
pub struct AssetMetadata<Balance> {
pub name: Vec<u8>,
pub symbol: Vec<u8>,
pub decimals: u8,
pub minimal_balance: Balance,
}

#[frame_support::pallet]
pub mod pallet {
use super::*;
Expand Down Expand Up @@ -545,7 +537,7 @@ impl<T: Config> CurrencyIdConversion<CurrencyId> for AssetIdMaps<T> {
}
}

impl<T: Config> CurrencyIdRegister<CurrencyId> for AssetIdMaps<T> {
impl<T: Config> CurrencyIdRegister<CurrencyId, AssetMetadata<BalanceOf<T>>> for AssetIdMaps<T> {
fn check_token_registered(token_symbol: TokenSymbol) -> bool {
CurrencyMetadatas::<T>::get(CurrencyId::Token(token_symbol)).is_some()
}
Expand Down Expand Up @@ -625,4 +617,11 @@ impl<T: Config> CurrencyIdRegister<CurrencyId> for AssetIdMaps<T> {
},
)
}

fn register_metadata(
currency_id: CurrencyId,
metadata: AssetMetadata<BalanceOf<T>>,
) -> DispatchResult {
Pallet::<T>::do_register_metadata(currency_id, &metadata)
}
}
6 changes: 4 additions & 2 deletions pallets/buy-back/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ mod benchmarking;

pub mod weights;

use bifrost_primitives::{currency::BNC, CurrencyId, CurrencyIdRegister, TryConvertFrom};
use bifrost_primitives::{
currency::BNC, AssetMetadata, CurrencyId, CurrencyIdRegister, TryConvertFrom,
};
use cumulus_primitives_core::ParaId;
use frame_support::{
pallet_prelude::*,
Expand Down Expand Up @@ -86,7 +88,7 @@ pub mod pallet {

type ParachainId: Get<ParaId>;

type CurrencyIdRegister: CurrencyIdRegister<CurrencyId>;
type CurrencyIdRegister: CurrencyIdRegister<CurrencyId, AssetMetadata<BalanceOf<Self>>>;

/// The current block number provider.
type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
Expand Down
47 changes: 47 additions & 0 deletions pallets/ismp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[package]
authors = ["Liebi Technologies <[email protected]>"]
edition = "2021"
name = "bifrost-ismp"
version = "0.8.0"

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

[dependencies]
# crates.io
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
scale-info = { workspace = true, default-features = false, features = ["derive"] }
anyhow = { workspace = true, default-features = false }

# polytope labs
ismp = { workspace = true, default-features = false }
pallet-ismp = { workspace = true, default-features = false }

# substrate
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-balances = { workspace = true }
sp-runtime = { workspace = true }
sp-core = { workspace = true }

[dev-dependencies]

[features]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"sp-runtime/std",
"scale-info/std",
"ismp/std",
"pallet-ismp/std",
"pallet-balances/std",
"anyhow/std"
]

try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
Loading

0 comments on commit 715fae4

Please sign in to comment.