Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
39935e9
move swap trait and impl into separate module
muharem Sep 15, 2023
d8ab7c1
restructure imports
muharem Sep 15, 2023
6d6cc18
transfer swap
muharem Sep 20, 2023
a355241
swap credit
muharem Sep 22, 2023
a78ac71
with transaction
muharem Sep 22, 2023
888c9fa
preservation
muharem Sep 22, 2023
793b612
add amounts to the event
muharem Sep 22, 2023
cdaf500
not expendable constraint
muharem Sep 25, 2023
2a19a41
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Sep 25, 2023
e237dfc
vec import
muharem Sep 25, 2023
0c13c85
fix tests, preserve account
muharem Sep 25, 2023
24654b8
tests
muharem Sep 26, 2023
e0bd8b7
max lenght of the swap path in swap trait
muharem Sep 26, 2023
80dbcab
fix clippy
muharem Sep 26, 2023
847207b
debug impls for imbalances
muharem Sep 26, 2023
53c699f
eq and partial_eq impls for imbalance
muharem Sep 28, 2023
827ce1b
eq, partial_eq, runtime debug for credit
muharem Sep 28, 2023
d533acf
tests
muharem Sep 28, 2023
69b17f8
Apply suggestions from code review
muharem Sep 28, 2023
28edff5
correct docs
muharem Sep 28, 2023
697afa6
dev comments
muharem Sep 28, 2023
1c50220
use eq/partial_eq/runtime_debug derives with no bound version
muharem Sep 29, 2023
fe9e4f8
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Oct 5, 2023
e7ffbb4
swap trait update
muharem Oct 5, 2023
ee49f27
box multi asset id
muharem Oct 7, 2023
ee9d2eb
use vec instead bounded vec
muharem Oct 7, 2023
ced5e99
update to new api
muharem Oct 7, 2023
7fee81e
drop clone
muharem Oct 7, 2023
b63cd73
box arguments and drop bounded vec from benches
muharem Oct 8, 2023
01bd4da
no box for benchmarks impls
muharem Oct 8, 2023
e2b99f9
single balance type for Currency and Assets
muharem Oct 8, 2023
37b2e34
Balance trait bound on Balance generic type
muharem Oct 8, 2023
d9bc836
try into for credit
muharem Oct 8, 2023
0193864
drop clone
muharem Oct 8, 2023
ae19bb8
fix
muharem Oct 8, 2023
2372277
clippy fixes
muharem Oct 9, 2023
d1f37c7
review fixes
muharem Oct 9, 2023
3a4935e
remove unused trait
muharem Oct 9, 2023
75a7b8a
note in docs for swap traits
muharem Oct 10, 2023
ec2cf1d
impl on_nonzero_unbalanced instead on_unbalanced
muharem Oct 18, 2023
a8fadda
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Oct 23, 2023
168141d
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Oct 23, 2023
2b13f27
adjustments for rococo setup
muharem Oct 24, 2023
bbca52d
adjustments for rococo tests
muharem Oct 24, 2023
251d3f8
Merge branch 'master' into muharem-asset-conversion-credit-swap
muharem Oct 24, 2023
66a6611
rococo benchmarks
muharem Oct 24, 2023
01eab06
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Oct 25, 2023
b21d0aa
fungible/s union_of
muharem Oct 25, 2023
50cdf82
tests for fungible/s sets
muharem Oct 25, 2023
5fbdc2a
asset conversion
muharem Oct 25, 2023
f490744
asset conversion tx payment
muharem Oct 25, 2023
45d450d
substrate test runtime
muharem Oct 25, 2023
baac8e5
asset hub common impls
muharem Oct 25, 2023
c4eb514
asset hub runtimes
muharem Oct 25, 2023
d28ffea
asset hub emulated tests
muharem Oct 25, 2023
d255301
clippy fixes
muharem Oct 25, 2023
4ec7496
clippy fixes
muharem Oct 25, 2023
2ce5071
Apply suggestions from code review
muharem Oct 26, 2023
c60fa97
fixes
muharem Oct 26, 2023
3b187eb
derive Eq
muharem Oct 26, 2023
03bec01
update bounds
muharem Oct 26, 2023
51c6dfc
benchmarks
muharem Oct 30, 2023
1a9c5f3
weights
muharem Oct 30, 2023
e0f1d0a
remove inc_providers on pool creation
muharem Oct 30, 2023
78332d7
remove unused var
muharem Oct 30, 2023
3f59637
account touch
muharem Oct 31, 2023
9ea208d
remove conrain pair from union_of
muharem Oct 31, 2023
d87a80e
should touch
muharem Oct 31, 2023
55917dd
touch doc
muharem Oct 31, 2023
4673656
docs
muharem Nov 2, 2023
701c4f6
docs
muharem Nov 2, 2023
8d5e5fe
should_touch for pallet-assets
muharem Nov 2, 2023
0556267
move set tests into a separete file
muharem Nov 2, 2023
fb451cb
should_touch for pallet-assets
muharem Nov 2, 2023
524d6f0
prdoc
muharem Dec 19, 2023
406552f
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
muharem Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Merge remote-tracking branch 'origin/master' into muharem-asset-conve…
…rsion-without-fungible
  • Loading branch information
muharem committed Dec 20, 2023
commit 406552f2c0eba6eebd5b7ef3c9bef43a0ba1c070
38 changes: 2 additions & 36 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,7 @@
[build]
rustdocflags = [
"-Dwarnings",
"-Arustdoc::redundant_explicit_links", # stylistic
]

# An auto defined `clippy` feature was introduced,
# but it was found to clash with user defined features,
# so was renamed to `cargo-clippy`.
#
# If you want standard clippy run:
# RUSTFLAGS= cargo clippy
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Aclippy::all",
"-Dclippy::correctness",
"-Aclippy::if-same-then-else",
"-Asuspicious_double_ref_op",
"-Dclippy::complexity",
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::unit_arg", # styalistic.
"-Aclippy::option-map-unit-fn", # styalistic
"-Aclippy::bind_instead_of_map", # styalistic
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
"-Aclippy::default_constructed_unit_structs", # stylistic
"-Dwarnings",
"-Arustdoc::redundant_explicit_links", # stylistic
]

[env]
Expand Down
56 changes: 28 additions & 28 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,36 @@ accept = [
200,

# Rate limited - GitHub likes to throw this.
429
429,
]

exclude_path = [ "./target" ]
exclude_path = ["./target"]

exclude = [
# Place holders (no need to fix these):
"http://visitme/",
"https://visitme/",
# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
"https://rpc.polkadot.io/",
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
# Place holders (no need to fix these):
"http://visitme/",
"https://visitme/",

# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
"https://rpc.polkadot.io/",
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
]
33 changes: 33 additions & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# all options https://taplo.tamasfe.dev/configuration/formatter-options.html

# ignore zombienet as they do some deliberate custom toml stuff
exclude = [
"cumulus/zombienet/**",
"polkadot/node/malus/integrationtests/**",
"polkadot/zombienet_tests/**",
"substrate/zombienet/**",
]

# global rules
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = false
array_auto_collapse = false
indent_string = " " # tab

# don't re-order order-dependent deb package metadata
[[rule]]
include = ["polkadot/Cargo.toml"]
keys = ["package.metadata.deb"]

[rule.formatting]
reorder_arrays = false

# don't re-order order-dependent rustflags
[[rule]]
include = [".cargo/config.toml"]
keys = ["build"]

[rule.formatting]
reorder_arrays = false
7 changes: 1 addition & 6 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@ workflows:
'--features=try-runtime,runtime-benchmarks,std',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Enabling this feature somehow pulls in two versions of `sp-runtime-interface` and makes it impossible to build that crate with `cargo b -p sp-runtime-interface`. We therefore disable it for now.
'--ignore-missing-propagate=sp-core/std:bandersnatch_vrfs/std',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Actually modify the files and not just report the issues:
# Auxillary flags:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
# Format the features into canonical format:
- ['format', 'features', '--offline', '--locked', '--quiet']
# Same as `check`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
- [ $check.1, '--fix' ]

# Will be displayed when any workflow fails:
help:
Expand Down
63 changes: 0 additions & 63 deletions .github/pr-custom-review.yml

This file was deleted.

65 changes: 23 additions & 42 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
rules:
- name: CI files
countAuthor: true
condition:
include:
include:
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
- ^\.gitlab/.*
- ^\.config/nextest.toml
- ^\.cargo/.*
exclude:
- ^./gitlab/pipeline/zombienet.*
minApprovals: 2
type: basic
teams:
- ci
- release-engineering
exclude:
- ^\.gitlab/pipeline/zombienet.*
type: "or"
reviewers:
- minApprovals: 2
teams:
- ci
- minApprovals: 2
teams:
- core-devs

- name: Audit rules
type: basic
condition:
include:
- ^polkadot/runtime\/(kusama|polkadot|common)\/.*
include:
- ^polkadot/runtime/common/.*
- ^polkadot/primitives/src\/.+\.rs$
- ^substrate/primitives/.*
- ^substrate/frame/.*
exclude:
- ^polkadot/runtime\/(kusama|polkadot)\/src\/weights\/.+\.rs$
exclude:
- ^substrate\/frame\/.+\.md$
minApprovals: 1
allowedToSkipRule:
Expand All @@ -41,13 +44,8 @@ rules:
- .*
# excluding files from 'Runtime files' and 'CI files' rules
exclude:
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
- ^cumulus/parachains/common/src/[^/]+\.rs$
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
Expand All @@ -59,39 +57,20 @@ rules:
teams:
- core-devs

# cumulus
- name: Runtime files cumulus
countAuthor: true
condition:
include:
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
- ^cumulus/parachains/common/src/[^/]+\.rs$
type: and-distinct
reviewers:
- minApprovals: 1
teams:
- locks-review
- minApprovals: 1
teams:
- polkadot-review

# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
- name: Bridges subtree files
type: basic
condition:
condition:
include:
- ^bridges/.*
minApprovals: 1
teams:
- bridges-core

# substrate

- name: FRAME coders substrate
condition:
include:
include:
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
type: "and"
reviewers:
Expand All @@ -104,8 +83,9 @@ rules:

# Protection of THIS file
- name: Review Bot
countAuthor: true
condition:
include:
include:
- review-bot\.yml
type: "and"
reviewers:
Expand All @@ -115,6 +95,7 @@ rules:
- minApprovals: 1
teams:
- locks-review
- minApprovals: 1
teams:
- ci

preventReviewRequests:
teams:
- core-devs
17 changes: 17 additions & 0 deletions .github/runtime_specs/rococo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"pallets": {
"1": {
"constants": {
"EpochDuration": {
"value": [ 88, 2, 0, 0, 0, 0, 0, 0 ]}
}
},

"2": {
"constants": {
"MinimumPeriod": {
"value": [ 184, 11, 0, 0, 0, 0, 0, 0 ]}
}
}
}
}
17 changes: 17 additions & 0 deletions .github/runtime_specs/westend.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"pallets": {
"1": {
"constants": {
"EpochDuration": {
"value": [ 88, 2, 0, 0, 0, 0, 0, 0 ]}
}
},

"2": {
"constants": {
"MinimumPeriod": {
"value": [ 184, 11, 0, 0, 0, 0, 0, 0 ]}
}
}
}
}
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.