@@ -4,7 +4,7 @@ pub mod Ticket721 {
4
4
// *//////////////////////////////////////////////////////////////////////////
5
5
// IMPORTS
6
6
/// ///////////////////////////////////////////////////////////////////////*//
7
- use starknet :: {ContractAddress , ClassHash , storage :: {StoragePointerWriteAccess },};
7
+ use starknet :: {ContractAddress , ClassHash , storage :: {StoragePointerWriteAccess }, get_caller_address };
8
8
use openzeppelin :: {
9
9
access :: accesscontrol :: {AccessControlComponent , DEFAULT_ADMIN_ROLE },
10
10
introspection :: src5 :: SRC5Component ,
@@ -15,6 +15,7 @@ pub mod Ticket721 {
15
15
},
16
16
upgrades :: {interface :: IUpgradeable , UpgradeableComponent },
17
17
};
18
+ use core :: num :: traits :: Zero ;
18
19
19
20
// *//////////////////////////////////////////////////////////////////////////
20
21
// COMPONENTS
@@ -149,6 +150,11 @@ pub mod Ticket721 {
149
150
self . pausable. unpause ();
150
151
}
151
152
153
+ #[external(v0)]
154
+ fn burn (ref self : ContractState , token_id : u256 ) {
155
+ self . erc721. update (Zero :: zero (), token_id , get_caller_address ());
156
+ }
157
+
152
158
#[external(v0)]
153
159
fn safe_mint (ref self : ContractState , recipient : ContractAddress ,) {
154
160
self . accesscontrol. assert_only_role (DEFAULT_ADMIN_ROLE );
0 commit comments