File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ pub mod result_info;
2020
2121#[ cfg_attr( not( feature = "show-codegen-docs" ) , doc( hidden) ) ]
2222pub mod codegen;
23- pub use codegen:: initialize_contract;
23+
24+ /// Utility functions for contract development.
25+ pub mod utils {
26+ // We want to expose this function without making users go through
27+ // the `codgen` module
28+ pub use super :: codegen:: initialize_contract;
29+ }
2430
2531pub mod reflect;
2632
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ mod dns {
9090 pub fn new ( ) -> Self {
9191 // This call is required in order to correctly initialize the
9292 // `Mapping`s of our contract.
93- ink_lang:: initialize_contract ( |contract : & mut Self | {
93+ ink_lang:: utils :: initialize_contract ( |contract : & mut Self | {
9494 contract. default_address = Default :: default ( ) ;
9595 } )
9696 }
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ mod erc1155 {
272272 // `Mapping`s of our contract.
273273 //
274274 // Not that `token_id_nonce` will be initialized to its `Default` value.
275- ink_lang:: initialize_contract ( |_| { } )
275+ ink_lang:: utils :: initialize_contract ( |_| { } )
276276 }
277277
278278 /// Create the initial supply for a token.
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ mod erc20 {
6565 pub fn new ( initial_supply : Balance ) -> Self {
6666 // This call is required in order to correctly initialize the
6767 // `Mapping`s of our contract.
68- ink_lang:: initialize_contract ( |contract| {
68+ ink_lang:: utils :: initialize_contract ( |contract| {
6969 Self :: new_init ( contract, initial_supply)
7070 } )
7171 }
You can’t perform that action at this time.
0 commit comments