3

For example, in the contract "eosio.token.hpp", in the line 20:

class [[eosio::contract("eosio.token")]] token : public contract {

Is that a special grammar defined in eos.io? What does it mean?

Thanks so much.

2

The double square bracket in c++ indicates attribute specifier.

The eosio::contract in this case guides eosio-cpp compiler to locate the smart contract class and make use of it when generating abi file with --abigen flag.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.