content_title | link_text |
---|---|
How to build eosio.token |
How to build eosio.token |
Ensure an appropriate version of eosio.cdt
is installed. Installing eosio.cdt
from binaries is sufficient, follow the eosio.cdt
installation instructions steps to install it. To verify if you have eosio.cdt
installed and its version run the following command
eosio-cpp -v
To build the eosio.token
execute the following commands.
On all platforms except macOS:
cd you_local_path_to/eosio.token/
rm -fr build
mkdir build
cd build
cmake ..
make -j$( nproc )
cd ..
For macOS:
cd you_local_path_to/eosio.token/
rm -fr build
mkdir build
cd build
cmake ..
make -j$(sysctl -n hw.ncpu)
cd ..
- Ensure an appropriate version of
eosio
has been built from source and installed. Installingeosio
from binariesis not
sufficient. You can find instructions on how to do it in section Building from Sources. - Run the below command to build all the contracts and the unit tests for these contracts.
rm -fr build
mkdir build
cd build
cmake -DBUILD_TESTS=true ..
make
* If the build was configured to also build unit tests, the unit tests executable is placed in the build/tests folder and is named unit_test.
* The contracts (both .wasm
and .abi
files) are built into their corresponding build/contracts/<contract name> folder.
* Finally, simply use cleos to set contract by pointing to the previously mentioned directory for the specific contract.
Let's assume your account name to which you want to deploy the contract is testertoken
cleos set contract testertoken you_local_path_to/eosio.token/build/contracts/eosio.token/ -p testertoken