Skip to content

Commit

Permalink
removed abstractions, pointed to the rc2 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
KitHat committed Nov 23, 2024
1 parent 83ad458 commit 1afd3ea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 42 deletions.
22 changes: 0 additions & 22 deletions evm-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,44 +193,32 @@ use openzeppelin_pallet_abstractions_proc::openzeppelin_construct_runtime;
#[cfg(not(feature = "tanssi"))]
#[openzeppelin_construct_runtime]
mod runtime {
#[abstraction]
struct System;

#[abstraction]
struct Consensus;

#[abstraction]
struct XCM;

#[abstraction]
struct Assets;

#[abstraction]
struct Governance;

#[abstraction]
struct EVM;
}

#[cfg(feature = "tanssi")]
#[openzeppelin_construct_runtime]
mod runtime {
#[abstraction]
struct System;

#[abstraction]
struct Tanssi;

#[abstraction]
struct XCM;

#[abstraction]
struct Assets;

#[abstraction]
struct Governance;

#[abstraction]
struct EVM;
}

Expand All @@ -242,21 +230,18 @@ mod apis {
type Runtime = Runtime;
type Block = Block;

#[abstraction]
mod evm {
type RuntimeCall = RuntimeCall;
type Executive = Executive;
type Ethereum = Ethereum;
}

#[abstraction]
mod assets {
type RuntimeCall = RuntimeCall;
type TransactionPayment = TransactionPayment;
type Balance = Balance;
}

#[abstraction]
mod consensus {
type SessionKeys = SessionKeys;
#[cfg(not(feature = "async-backing"))]
Expand All @@ -267,7 +252,6 @@ mod apis {
type ConsensusHook = ConsensusHook;
}

#[abstraction]
mod system {
type Executive = Executive;
type System = System;
Expand All @@ -279,7 +263,6 @@ mod apis {
type RuntimeBlockWeights = RuntimeBlockWeights;
}

#[abstraction]
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type Assets = Assets;
Expand Down Expand Up @@ -307,26 +290,22 @@ mod apis {
type Runtime = Runtime;
type Block = Block;

#[abstraction]
mod evm {
type RuntimeCall = RuntimeCall;
type Executive = Executive;
type Ethereum = Ethereum;
}

#[abstraction]
mod assets {
type RuntimeCall = RuntimeCall;
type TransactionPayment = TransactionPayment;
type Balance = Balance;
}

#[abstraction]
mod tanssi {
type SessionKeys = SessionKeys;
}

#[abstraction]
mod system {
type Executive = Executive;
type System = System;
Expand All @@ -338,7 +317,6 @@ mod apis {
type RuntimeBlockWeights = RuntimeBlockWeights;
}

#[abstraction]
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type Assets = Assets;
Expand Down
4 changes: 2 additions & 2 deletions generic-template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ serde_json = "1.0.121"
smallvec = "1.11.0"

# TODO: update to release
openzeppelin-pallet-abstractions = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "main", default-features = false }
openzeppelin-pallet-abstractions-proc = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "main", default-features = false }
openzeppelin-pallet-abstractions = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", tag = "v0.1-rc2", default-features = false }
openzeppelin-pallet-abstractions-proc = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", tag = "v0.1-rc2", default-features = false }

# Substrate
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
Expand Down
8 changes: 0 additions & 8 deletions generic-template/runtime/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ mod apis {
type Runtime = Runtime;
type Block = Block;

#[abstraction]
mod assets {
type RuntimeCall = RuntimeCall;
type TransactionPayment = TransactionPayment;
type Balance = Balance;
}

#[abstraction]
mod consensus {
type SessionKeys = SessionKeys;
#[cfg(not(feature = "async-backing"))]
Expand All @@ -43,7 +41,6 @@ mod apis {
type ConsensusHook = ConsensusHook;
}

#[abstraction]
mod system {
type Executive = Executive;
type System = System;
Expand All @@ -55,7 +52,6 @@ mod apis {
type RuntimeBlockWeights = RuntimeBlockWeights;
}

#[abstraction]
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type Assets = Assets;
Expand Down Expand Up @@ -83,19 +79,16 @@ mod apis {
type Runtime = Runtime;
type Block = Block;

#[abstraction]
mod assets {
type RuntimeCall = RuntimeCall;
type TransactionPayment = TransactionPayment;
type Balance = Balance;
}

#[abstraction]
mod tanssi {
type SessionKeys = SessionKeys;
}

#[abstraction]
mod system {
type Executive = Executive;
type System = System;
Expand All @@ -107,7 +100,6 @@ mod apis {
type RuntimeBlockWeights = RuntimeBlockWeights;
}

#[abstraction]
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type Assets = Assets;
Expand Down
10 changes: 0 additions & 10 deletions generic-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,38 +116,28 @@ use openzeppelin_pallet_abstractions_proc::openzeppelin_construct_runtime;
#[cfg(feature = "tanssi")]
#[openzeppelin_construct_runtime]
mod runtime {
#[abstraction]
struct System;

#[abstraction]
struct XCM;

#[abstraction]
struct Assets;

#[abstraction]
struct Governance;

#[abstraction]
struct Tanssi;
}

#[cfg(not(feature = "tanssi"))]
#[openzeppelin_construct_runtime]
mod runtime {
#[abstraction]
struct System;

#[abstraction]
struct XCM;

#[abstraction]
struct Assets;

#[abstraction]
struct Governance;

#[abstraction]
struct Consensus;
}

Expand Down

0 comments on commit 1afd3ea

Please sign in to comment.