- Get started
Once you have installed Mallet 2.0, follow the tutorial to:
To run Mallet and connect to a testnet:
//connect to the IELE or KEVM testnet ./mallet iele
This will open a session in the read-eval-print-loop (Repl) environment for Node.js. Mallet commands are imported automatically.
mallet> myAccount = newAccount('password')
The newAccount command takes one argument, which is your password.
This will return your new account:
Note that we are assigning the return value of newAccount to a variable named myAccount so that we can refer to it later.
Will return a list of all existing accounts.
Get the balance of your account.
If you don’t give any argument, this will return the balance of the selected account.
It may take a few minutes for the funds to be transferred.
Now that you have created and funded your account, you can compile and deploy smart contracts.
The ability to compile contracts is currently only supported for IELE. Both IELE assembly code and Solidity (using the Solidity to IELE compiler) contracts can be compiled. Both compilers are services of the testnet that Mallet connects to (no additional dependencies).
Mallet can work with .sol or .iele files. Keep in mind that Solidity files will take a two-step compilation:
To get the bytecode needed to deploy your smart contract, you can assign its value to a variable so that you can refer to it.
mallet> myBytecode = iele.compile('../filename.extension').bytecode