Skip to content

Commit 17fd88d

Browse files
committed
Change remaining usage of ink_lang::codegen to ink_lang::utils
1 parent 0a2c7cf commit 17fd88d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

crates/lang/tests/ui/contract/pass/example-erc20-works.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod erc20 {
5858
/// Creates a new ERC-20 contract with the specified initial supply.
5959
#[ink(constructor)]
6060
pub fn new(initial_supply: Balance) -> Self {
61-
ink_lang::codegen::initialize_contract(|contract| {
61+
ink_lang::utils::initialize_contract(|contract| {
6262
Self::new_init(contract, initial_supply)
6363
})
6464
}

crates/lang/tests/ui/contract/pass/example-erc721-works.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ mod erc721 {
7979
pub fn new() -> Self {
8080
// This call is required in order to correctly initialize the
8181
// `Mapping`s of our contract.
82-
ink_lang::codegen::initialize_contract(|_| {})
82+
ink_lang::utils::initialize_contract(|_| {})
8383
}
8484

8585
/// Returns the balance of the owner.

examples/erc721/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ mod erc721 {
131131
pub fn new() -> Self {
132132
// This call is required in order to correctly initialize the
133133
// `Mapping`s of our contract.
134-
ink_lang::codegen::initialize_contract(|_| {})
134+
ink_lang::utils::initialize_contract(|_| {})
135135
}
136136

137137
/// Returns the balance of the owner.

examples/multisig/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ mod multisig {
281281
/// If `requirement` violates our invariant.
282282
#[ink(constructor)]
283283
pub fn new(requirement: u32, mut owners: Vec<AccountId>) -> Self {
284-
ink_lang::codegen::initialize_contract(|contract: &mut Self| {
284+
ink_lang::utils::initialize_contract(|contract: &mut Self| {
285285
owners.sort_unstable();
286286
owners.dedup();
287287
ensure_requirement_is_valid(owners.len() as u32, requirement);

examples/trait-erc20/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ mod erc20 {
9797
/// Creates a new ERC-20 contract with the specified initial supply.
9898
#[ink(constructor)]
9999
pub fn new(initial_supply: Balance) -> Self {
100-
ink_lang::codegen::initialize_contract(|contract| {
100+
ink_lang::utils::initialize_contract(|contract| {
101101
Self::new_init(contract, initial_supply)
102102
})
103103
}

0 commit comments

Comments
 (0)