feat: pallet asset-rate (#13608)

* poc

* fix: remove AssetIdParameter

* tests: add

* docs: add pallet description

* feat: add benches

* refactor: UnknownAssetId

* fix: normalize mock cfg

* fix: benchmarks

* chore: add weights

* refactor: remove storage getter

* chore: apply suggestions from code review

* docs: add native balance to calls

* chore: apply suggestions from code review

* chore: apply ConversionFromAssetBalance

* tests: update balance mock

* chore: apply suggestions from code review

* ci: set publish to false

* docs: fix missing rustdoc

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
William Freudenberger
2023-04-19 09:49:42 +02:00
committed by GitHub
parent cbc8e5f7df
commit 9eb63f216c
10 changed files with 762 additions and 0 deletions
+4
View File
@@ -53,6 +53,7 @@ frame-election-provider-support = { version = "4.0.0-dev", default-features = fa
frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
frame-try-runtime = { version = "0.10.0-dev", default-features = false, path = "../../../frame/try-runtime", optional = true }
pallet-alliance = { version = "4.0.0-dev", default-features = false, path = "../../../frame/alliance" }
pallet-asset-rate = { version = "4.0.0-dev", default-features = false, path = "../../../frame/asset-rate" }
pallet-assets = { version = "4.0.0-dev", default-features = false, path = "../../../frame/assets" }
pallet-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/authority-discovery" }
pallet-authorship = { version = "4.0.0-dev", default-features = false, path = "../../../frame/authorship" }
@@ -201,6 +202,7 @@ std = [
"pallet-transaction-payment/std",
"pallet-transaction-storage/std",
"pallet-treasury/std",
"pallet-asset-rate/std",
"sp-transaction-pool/std",
"pallet-utility/std",
"sp-version/std",
@@ -272,6 +274,7 @@ runtime-benchmarks = [
"pallet-tips/runtime-benchmarks",
"pallet-transaction-storage/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-asset-rate/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
@@ -333,6 +336,7 @@ try-runtime = [
"pallet-timestamp/try-runtime",
"pallet-tips/try-runtime",
"pallet-treasury/try-runtime",
"pallet-asset-rate/try-runtime",
"pallet-utility/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-asset-tx-payment/try-runtime",