Skip to content

Commit

Permalink
add erc721 feature and module
Browse files Browse the repository at this point in the history
  • Loading branch information
qalisander committed Mar 25, 2024
1 parent c6c784b commit 65fc97f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ wavm-shims = { path = "../lib/wavm-shims" }
[features]
default = []
erc20 = []
erc721 = []

[lib]
# The Stylus team sets new crates with the following types:
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/erc20/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,15 @@ impl ERC20 {

#[cfg(test)]
mod tests {
#[allow(unused_imports)]
use crate::test_utils;
use alloy_primitives::{address, Address, U256};
use stylus_sdk::{
msg,
storage::{StorageMap, StorageType, StorageU256},
};

use crate::erc20::{Error, ERC20};
#[allow(unused_imports)]
use crate::test_utils;

impl Default for ERC20 {
fn default() -> Self {
Expand Down
1 change: 1 addition & 0 deletions contracts/src/erc721/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ static ALLOC: mini_alloc::MiniAlloc = mini_alloc::MiniAlloc::INIT;

#[cfg(any(test, erc20))]
pub mod erc20;
#[cfg(any(test, erc721))]
pub mod erc721;
#[cfg(test)]
mod test_utils;

Expand Down

0 comments on commit 65fc97f

Please sign in to comment.