Skip to content

Commit

Permalink
use #[flat] for erc events (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l authored Jun 24, 2024
1 parent c537966 commit 4bb65b8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/bridge/sn/src/dojo_token.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,19 @@ mod dojo_token {
#[event]
#[derive(Copy, Drop, starknet::Event)]
enum Event {
#[flat]
InitializableEvent: initializable_component::Event,
#[flat]
ERC20MetadataEvent: erc20_metadata_component::Event,
#[flat]
ERC20BalanceEvent: erc20_balance_component::Event,
#[flat]
ERC20AllowanceEvent: erc20_allowance_component::Event,
#[flat]
ERC20MintableEvent: erc20_mintable_component::Event,
#[flat]
ERC20BurnableEvent: erc20_burnable_component::Event,
#[flat]
ERC20BridgeableEvent: erc20_bridgeable_component::Event,
}

Expand Down
7 changes: 7 additions & 0 deletions token/src/presets/erc20/bridgeable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,19 @@ mod ERC20Bridgeable {
#[event]
#[derive(Copy, Drop, starknet::Event)]
enum Event {
#[flat]
InitializableEvent: initializable_component::Event,
#[flat]
ERC20MetadataEvent: erc20_metadata_component::Event,
#[flat]
ERC20BalanceEvent: erc20_balance_component::Event,
#[flat]
ERC20AllowanceEvent: erc20_allowance_component::Event,
#[flat]
ERC20MintableEvent: erc20_mintable_component::Event,
#[flat]
ERC20BurnableEvent: erc20_burnable_component::Event,
#[flat]
ERC20BridgeableEvent: erc20_bridgeable_component::Event,
}

Expand Down
8 changes: 8 additions & 0 deletions token/src/presets/erc721/enumerable_mintable_burnable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,21 @@ mod ERC721EnumMintBurn {
#[event]
#[derive(Drop, starknet::Event)]
enum Event {
#[flat]
InitializableEvent: initializable_component::Event,
#[flat]
ERC721ApprovalEvent: erc721_approval_component::Event,
#[flat]
ERC721BalanceEvent: erc721_balance_component::Event,
#[flat]
ERC721BurnableEvent: erc721_burnable_component::Event,
#[flat]
ERC721EnumerableEvent: erc721_enumerable_component::Event,
#[flat]
ERC721MetadataEvent: erc721_metadata_component::Event,
#[flat]
ERC721MintableEvent: erc721_mintable_component::Event,
#[flat]
ERC721OwnerEvent: erc721_owner_component::Event,
}

Expand Down
7 changes: 7 additions & 0 deletions token/src/presets/erc721/mintable_burnable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,19 @@ mod ERC721MintableBurnable {
#[event]
#[derive(Drop, starknet::Event)]
enum Event {
#[flat]
InitializableEvent: initializable_component::Event,
#[flat]
ERC721ApprovalEvent: erc721_approval_component::Event,
#[flat]
ERC721BalanceEvent: erc721_balance_component::Event,
#[flat]
ERC721BurnableEvent: erc721_burnable_component::Event,
#[flat]
ERC721MetadataEvent: erc721_metadata_component::Event,
#[flat]
ERC721MintableEvent: erc721_mintable_component::Event,
#[flat]
ERC721OwnerEvent: erc721_owner_component::Event,
}

Expand Down

0 comments on commit 4bb65b8

Please sign in to comment.