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

Update precompile_macro.md #187

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions precompiles/utils/macro/docs/precompile_macro.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ reused to generate the `Precompile`/`PrecompileSet` trait implementation and the
each public function of precompile with its parsed arguments.

```rust,ignore
pub struct ExemplePrecompile<R, I>(PhantomData<(R,I)>);
pub struct ExamplePrecompile<R, I>(PhantomData<(R,I)>);

#[precomile_utils::precompile]
impl<R, I> ExemplePrecompile<R, I>
#[precompile_utils::precompile]
impl<R, I> ExamplePrecompile<R, I>
where
R: pallet_evm::Config
{
Expand All @@ -35,7 +35,7 @@ The example code above will automatically generate an enum like

```rust,ignore
#[allow(non_camel_case_types)]
pub enum ExemplePrecompileCall<R, I>
pub enum ExamplePrecompileCall<R, I>
where
R: pallet_evm::Config
{
Expand Down Expand Up @@ -104,7 +104,7 @@ Finally, every other function annotated with a `precompile::_` attribute must no
discriminant as first parameter, before the `PrecompileHandle`.

```rust,ignore
pub struct ExemplePrecompileSet<R>(PhantomData<R>);
pub struct ExamplePrecompileSet<R>(PhantomData<R>);

#[precompile_utils::precompile]
#[precompile::precompile_set]
Expand Down
Loading