Skip to content

Commit

Permalink
chore:exported erc4262 example
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifechukwudaniel committed Dec 23, 2024
1 parent 51a17ca commit c24bec7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/src/token/erc20/extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pub use burnable::IErc20Burnable;
pub use capped::Capped;
pub use metadata::{Erc20Metadata, IErc20Metadata};
pub use permit::Erc20Permit;
pub use erc4626::{Erc4626,IERC4626};
17 changes: 17 additions & 0 deletions examples/erc4262/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
#![cfg_attr(not(test), no_main)]
extern crate alloc;

use core::borrow;

use alloc::vec::Vec;

use alloy_primitives::{Address, U256};
use stylus_sdk::prelude::{entrypoint, public, storage};
use openzeppelin_stylus::{
token::erc20::{
extensions::{ Erc20Metadata,Erc4626, IERC4626},
Erc20, IErc20,
},
utils::{introspection::erc165::IErc165, Pausable},
};


#[entrypoint]
#[storage]
struct Erc4262xample {
#[borrow]
pub erc20: Erc20,
#[borrow]
pub metadata: Erc20Metadata,
#[borrow]
pub erc4626: Erc4626,
}


#[public]
#[inherit(Erc20, Erc20Metadata, Erc4626)]
impl Erc4262xample {
// Add token minting feature.
}

0 comments on commit c24bec7

Please sign in to comment.