You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make a new python notebook, and follow the steps as mentioned in **SCORE Interaction**. Now you should have deployer_wallet and caller_wallet address. Load funds to deployer_wallet address. caller_wallet will be used as a random wallet to test methods.
31
+
Make a new python notebook, and follow the steps as mentioned in **SCORE Interaction**.<br> Now you should have deployer_wallet and caller_wallet address. Load funds to deployer_wallet address. caller_wallet will be used as a random wallet to test methods.
32
32
33
33
34
34
### Deploying the contract
@@ -128,4 +128,4 @@ get_tx_result(tx_hash)
128
128
129
129
Now reexecute the block to check the balance of deployer and caller address. 5 tokens will be transferred to the random address from deployer address.
130
130
<br>
131
-
You have successfully created a token in ICON blockchain, and transferred fund from to another address!
131
+
**You have successfully created a token in ICON blockchain, and transferred fund from to another address!**
Copy file name to clipboardexpand all lines: docs/testMintBurnToken.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
1
# Implement mintable and burnable tokens
2
2
3
-
Change token.py to implement IRC2burnable and IRC2mintable.<br>
4
-
IRC2 Mintable and IRC2 Burnable inherits from IRC2.
3
+
To implement mintable and burnable token, change token.py to implement IRC2burnable and IRC2mintable.<br>
5
4
6
5
```Python
7
6
from iconservice import*
8
-
from .tokens.IRC2burnable import IRC2Burnable
9
-
from .tokens.IRC2mintable import IRC2Mintable
7
+
from .ODIContracts.tokens.IRC2burnable import IRC2Burnable
8
+
from .ODIContracts.tokens.IRC2mintable import IRC2Mintable
10
9
11
10
TAG='SampleToken'
12
11
@@ -18,9 +17,9 @@ Now, since we changed the token, we need to update the contract. Execute this bl
18
17
19
18
```Python
20
19
UPDATE_PARAMS= {
21
-
"_tokenName": "TestToken1",
22
-
"_symbolName": "TK1",
23
-
"_initialSupply": 1100,
20
+
"_tokenName": "TestToken",
21
+
"_symbolName": "TK",
22
+
"_initialSupply": 1000,
24
23
"_decimals": 18
25
24
}
26
25
@@ -51,6 +50,7 @@ get_tx_result(tx_hash)
51
50
52
51
53
52
### Testing minting of tokens
53
+
To test minting of tokens, execute this block. `_amount` , the number of token to be minted, is given as a parameter.
54
54
```Python
55
55
params={
56
56
"_amount": 5,
@@ -83,7 +83,7 @@ After this block finishes executing, now reexecute the block to check the total
83
83
84
84
### Testing mintTo method
85
85
86
-
Using this method, tokens can be minted to other address as well. However, only the deployer can call this method.
86
+
Using this method, tokens can be minted to other address as well. However, only the deployer can call this method. Here, `_amount` number of tokens will be minted to `_account`.
0 commit comments