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 -vRun the build.sh script in the top directory to build all the contracts.
- Ensure an appropriate version of
eosiohas been built from source and installed. Installingeosiofrom binariesis notsufficient. You can find instructions on how to do it here in sectionBuilding from Sources. - Run the
build.shscript in the top directory with the-tflag to build all the contracts and the unit tests for these contracts.
To build the eosio.contracts execute the following commands.
On all platforms except macOS:
cd you_local_path_to/eosio.contracts/
rm -fr build
mkdir build
cd build
cmake ..
make -j$( nproc )
cd ..For macOS:
cd you_local_path_to/eosio.contracts/
rm -fr build
mkdir build
cd build
cmake ..
make -j$(sysctl -n hw.ncpu)
cd ..* 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 testerbios
cleos set contract testerbios you_local_path_to/eosio.contracts/build/contracts/eosio.bios/ -p testerbios
Let's assume your account name to which you want to deploy the contract is testermsig
cleos set contract testermsig you_local_path_to/eosio.contracts/build/contracts/eosio.msig/ -p testermsig
Let's assume your account name to which you want to deploy the contract is testersystem
cleos set contract testersystem you_local_path_to/eosio.contracts/build/contracts/eosio.system/ -p testersystem
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.contracts/build/contracts/eosio.token/ -p testertoken
Let's assume your account name to which you want to deploy the contract is testerwrap
cleos set contract testerwrap you_local_path_to/eosio.contracts/build/contracts/eosio.wrap/ -p testerwrap