@@ -21,8 +21,15 @@ Generated by [AVA](https://avajs.dev).
2121 ␊
2222 #[contractimpl]␊
2323 impl MyToken {␊
24- pub fn __constructor(e: &Env) {␊
25- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
24+ // deploy this smart contract with the Stellar CLI:␊
25+ //␊
26+ // stellar contract deploy \\␊
27+ // --wasm path/to/file.wasm \\␊
28+ // -- \\␊
29+ // --name MyToken \\␊
30+ // --symbol MTK␊
31+ pub fn __constructor(e: &Env, name: String, symbol: String) {␊
32+ Base::set_metadata(e, 18, name, symbol);␊
2633 }␊
2734 }␊
2835 ␊
@@ -51,8 +58,15 @@ Generated by [AVA](https://avajs.dev).
5158 ␊
5259 #[contractimpl]␊
5360 impl MyToken {␊
54- pub fn __constructor(e: &Env) {␊
55- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
61+ // deploy this smart contract with the Stellar CLI:␊
62+ //␊
63+ // stellar contract deploy \\␊
64+ // --wasm path/to/file.wasm \\␊
65+ // -- \\␊
66+ // --name MyToken \\␊
67+ // --symbol MTK␊
68+ pub fn __constructor(e: &Env, name: String, symbol: String) {␊
69+ Base::set_metadata(e, 18, name, symbol);␊
5670 }␊
5771 }␊
5872 ␊
@@ -91,8 +105,16 @@ Generated by [AVA](https://avajs.dev).
91105 ␊
92106 #[contractimpl]␊
93107 impl MyToken {␊
94- pub fn __constructor(e: &Env, owner: Address) {␊
95- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
108+ // deploy this smart contract with the Stellar CLI:␊
109+ //␊
110+ // stellar contract deploy \\␊
111+ // --wasm path/to/file.wasm \\␊
112+ // -- \\␊
113+ // --name MyToken \\␊
114+ // --symbol MTK \\␊
115+ // --owner <owner address>␊
116+ pub fn __constructor(e: &Env, name: String, symbol: String, owner: Address) {␊
117+ Base::set_metadata(e, 18, name, symbol);␊
96118 ownable::set_owner(e, &owner);␊
97119 }␊
98120 }␊
@@ -158,8 +180,16 @@ Generated by [AVA](https://avajs.dev).
158180 ␊
159181 #[contractimpl]␊
160182 impl MyToken {␊
161- pub fn __constructor(e: &Env, owner: Address) {␊
162- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
183+ // deploy this smart contract with the Stellar CLI:␊
184+ //␊
185+ // stellar contract deploy \\␊
186+ // --wasm path/to/file.wasm \\␊
187+ // -- \\␊
188+ // --name MyToken \\␊
189+ // --symbol MTK \\␊
190+ // --owner <owner address>␊
191+ pub fn __constructor(e: &Env, name: String, symbol: String, owner: Address) {␊
192+ Base::set_metadata(e, 18, name, symbol);␊
163193 ownable::set_owner(e, &owner);␊
164194 }␊
165195 }␊
@@ -240,9 +270,18 @@ Generated by [AVA](https://avajs.dev).
240270 ␊
241271 #[contractimpl]␊
242272 impl MyToken {␊
243- pub fn __constructor(e: &Env, recipient: Address) {␊
244- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
245- Base::mint(e, &recipient, 1000000000000000000000);␊
273+ // deploy this smart contract with the Stellar CLI:␊
274+ //␊
275+ // stellar contract deploy \\␊
276+ // --wasm path/to/file.wasm \\␊
277+ // -- \\␊
278+ // --name MyToken \\␊
279+ // --symbol MTK \\␊
280+ // --recipient <recipient address> \\␊
281+ // --premint 1000000000000000000000␊
282+ pub fn __constructor(e: &Env, name: String, symbol: String, recipient: Address, premint: i128) {␊
283+ Base::set_metadata(e, 18, name, symbol);␊
284+ Base::mint(e, &recipient, premint);␊
246285 }␊
247286 }␊
248287 ␊
@@ -271,8 +310,15 @@ Generated by [AVA](https://avajs.dev).
271310 ␊
272311 #[contractimpl]␊
273312 impl MyToken {␊
274- pub fn __constructor(e: &Env) {␊
275- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
313+ // deploy this smart contract with the Stellar CLI:␊
314+ //␊
315+ // stellar contract deploy \\␊
316+ // --wasm path/to/file.wasm \\␊
317+ // -- \\␊
318+ // --name MyToken \\␊
319+ // --symbol MTK␊
320+ pub fn __constructor(e: &Env, name: String, symbol: String) {␊
321+ Base::set_metadata(e, 18, name, symbol);␊
276322 }␊
277323 }␊
278324 ␊
@@ -301,8 +347,15 @@ Generated by [AVA](https://avajs.dev).
301347 ␊
302348 #[contractimpl]␊
303349 impl MyToken {␊
304- pub fn __constructor(e: &Env) {␊
305- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
350+ // deploy this smart contract with the Stellar CLI:␊
351+ //␊
352+ // stellar contract deploy \\␊
353+ // --wasm path/to/file.wasm \\␊
354+ // -- \\␊
355+ // --name MyToken \\␊
356+ // --symbol MTK␊
357+ pub fn __constructor(e: &Env, name: String, symbol: String) {␊
358+ Base::set_metadata(e, 18, name, symbol);␊
306359 }␊
307360 }␊
308361 ␊
@@ -332,8 +385,16 @@ Generated by [AVA](https://avajs.dev).
332385 ␊
333386 #[contractimpl]␊
334387 impl MyToken {␊
335- pub fn __constructor(e: &Env, owner: Address) {␊
336- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
388+ // deploy this smart contract with the Stellar CLI:␊
389+ //␊
390+ // stellar contract deploy \\␊
391+ // --wasm path/to/file.wasm \\␊
392+ // -- \\␊
393+ // --name MyToken \\␊
394+ // --symbol MTK \\␊
395+ // --owner <owner address>␊
396+ pub fn __constructor(e: &Env, name: String, symbol: String, owner: Address) {␊
397+ Base::set_metadata(e, 18, name, symbol);␊
337398 ownable::set_owner(e, &owner);␊
338399 }␊
339400 }␊
@@ -372,8 +433,16 @@ Generated by [AVA](https://avajs.dev).
372433 ␊
373434 #[contractimpl]␊
374435 impl MyToken {␊
375- pub fn __constructor(e: &Env, admin: Address) {␊
376- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
436+ // deploy this smart contract with the Stellar CLI:␊
437+ //␊
438+ // stellar contract deploy \\␊
439+ // --wasm path/to/file.wasm \\␊
440+ // -- \\␊
441+ // --name MyToken \\␊
442+ // --symbol MTK \\␊
443+ // --admin <admin address>␊
444+ pub fn __constructor(e: &Env, name: String, symbol: String, admin: Address) {␊
445+ Base::set_metadata(e, 18, name, symbol);␊
377446 access_control::set_admin(e, &admin);␊
378447 }␊
379448 }␊
@@ -413,9 +482,26 @@ Generated by [AVA](https://avajs.dev).
413482 ␊
414483 #[contractimpl]␊
415484 impl MyToken {␊
416- pub fn __constructor(e: &Env, recipient: Address, owner: Address) {␊
417- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK"));␊
418- Base::mint(e, &recipient, 2000000000000000000000);␊
485+ // deploy this smart contract with the Stellar CLI:␊
486+ //␊
487+ // stellar contract deploy \\␊
488+ // --wasm path/to/file.wasm \\␊
489+ // -- \\␊
490+ // --name MyToken \\␊
491+ // --symbol MTK \\␊
492+ // --recipient <recipient address> \\␊
493+ // --premint 2000000000000000000000 \\␊
494+ // --owner <owner address>␊
495+ pub fn __constructor(␊
496+ e: &Env,␊
497+ name: String,␊
498+ symbol: String,␊
499+ recipient: Address,␊
500+ premint: i128,␊
501+ owner: Address,␊
502+ ) {␊
503+ Base::set_metadata(e, 18, name, symbol);␊
504+ Base::mint(e, &recipient, premint);␊
419505 ownable::set_owner(e, &owner);␊
420506 }␊
421507 ␊
@@ -506,16 +592,32 @@ Generated by [AVA](https://avajs.dev).
506592 ␊
507593 #[contractimpl]␊
508594 impl MyToken {␊
595+ // deploy this smart contract with the Stellar CLI:␊
596+ //␊
597+ // stellar contract deploy \\␊
598+ // --wasm path/to/file.wasm \\␊
599+ // -- \\␊
600+ // --name MyToken \\␊
601+ // --symbol MTK \\␊
602+ // --recipient <recipient address> \\␊
603+ // --premint 2000000000000000000000 \\␊
604+ // --admin <admin address> \\␊
605+ // --pauser <pauser address> \\␊
606+ // --upgrader <upgrader address> \\␊
607+ // --minter <minter address>␊
509608 pub fn __constructor(␊
510609 e: &Env,␊
610+ name: String,␊
611+ symbol: String,␊
511612 recipient: Address,␊
613+ premint: i128,␊
512614 admin: Address,␊
513615 pauser: Address,␊
514616 upgrader: Address,␊
515617 minter: Address,␊
516618 ) {␊
517- Base::set_metadata(e, 18, String::from_str(e, "MyToken"), String::from_str(e, "MTK") );␊
518- Base::mint(e, &recipient, 2000000000000000000000 );␊
619+ Base::set_metadata(e, 18, name, symbol );␊
620+ Base::mint(e, &recipient, premint );␊
519621 access_control::set_admin(e, &admin);␊
520622 access_control::grant_role_no_auth(e, &admin, &pauser, &Symbol::new(e, "pauser"));␊
521623 access_control::grant_role_no_auth(e, &admin, &upgrader, &Symbol::new(e, "upgrader"));␊
@@ -616,9 +718,26 @@ Generated by [AVA](https://avajs.dev).
616718 ␊
617719 #[contractimpl]␊
618720 impl CustomToken {␊
619- pub fn __constructor(e: &Env, recipient: Address, owner: Address) {␊
620- Base::set_metadata(e, 18, String::from_str(e, "Custom $ Token"), String::from_str(e, "MTK"));␊
621- Base::mint(e, &recipient, 2000000000000000000000);␊
721+ // deploy this smart contract with the Stellar CLI:␊
722+ //␊
723+ // stellar contract deploy \\␊
724+ // --wasm path/to/file.wasm \\␊
725+ // -- \\␊
726+ // --name Custom $ Token \\␊
727+ // --symbol MTK \\␊
728+ // --recipient <recipient address> \\␊
729+ // --premint 2000000000000000000000 \\␊
730+ // --owner <owner address>␊
731+ pub fn __constructor(␊
732+ e: &Env,␊
733+ name: String,␊
734+ symbol: String,␊
735+ recipient: Address,␊
736+ premint: i128,␊
737+ owner: Address,␊
738+ ) {␊
739+ Base::set_metadata(e, 18, name, symbol);␊
740+ Base::mint(e, &recipient, premint);␊
622741 ownable::set_owner(e, &owner);␊
623742 }␊
624743 ␊
0 commit comments