Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for paying with ERC20 or AssetId for services #845

Merged
merged 10 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[.github/workflows/*.{yaml,yml}]
indent_size = 2
1 change: 1 addition & 0 deletions Cargo.lock

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

24 changes: 12 additions & 12 deletions flake.lock

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

31 changes: 15 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
# Rust
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
inputs = { nixpkgs.follows = "nixpkgs"; };
};
# EVM dev tools
foundry = {
Expand All @@ -24,13 +22,10 @@
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) foundry.overlay ];
pkgs = import nixpkgs {
inherit system overlays;
};
pkgs = import nixpkgs { inherit system overlays; };
lib = pkgs.lib;
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
{
in {
devShells.default = pkgs.mkShell {
name = "tangle";
nativeBuildInputs = [
Expand All @@ -44,8 +39,10 @@
pkgs.rustPlatform.bindgenHook
# Mold Linker for faster builds (only on Linux)
(lib.optionals pkgs.stdenv.isLinux pkgs.mold)
(lib.optionals pkgs.stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.Security)
(lib.optionals pkgs.stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.SystemConfiguration)
(lib.optionals pkgs.stdenv.isDarwin
pkgs.darwin.apple_sdk.frameworks.Security)
(lib.optionals pkgs.stdenv.isDarwin
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration)
];
buildInputs = [
# Nodejs for test suite
Expand All @@ -56,15 +53,17 @@
toolchain
pkgs.foundry-bin
];
packages = [
pkgs.taplo
pkgs.cargo-nextest
pkgs.cargo-tarpaulin
];
packages =
[ pkgs.taplo pkgs.harper pkgs.cargo-nextest pkgs.cargo-tarpaulin ];
# Environment variables
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
# Needed for running DKG Node.
LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.gmp pkgs.openssl pkgs.libclang pkgs.stdenv.cc.cc ];
LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.gmp
pkgs.openssl
pkgs.libclang
pkgs.stdenv.cc.cc
];
};
});
}
2 changes: 2 additions & 0 deletions pallets/services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hex = { workspace = true }
num_enum = { workspace = true }
hex-literal = { workspace = true }
libsecp256k1 = { workspace = true }
pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
pallet-timestamp = { workspace = true }
serde = { workspace = true }
Expand Down Expand Up @@ -103,6 +104,7 @@ std = [
"pallet-ethereum/std",
"pallet-evm/std",
"pallet-evm-chain-id/std",
"pallet-assets/std",

"pallet-evm-precompile-modexp/std",
"pallet-evm-precompile-sha3fips/std",
Expand Down
Loading
Loading