EOSIO Configuration handler pluggable into any contract
A simple way to handle configuration values for EOSIO contracts that fits any pre-existing contract code.
Check the code at eosio-config repo
How it works
The only thing needed is to plug the config header file. Then on your contract constructor load the singleton config data and on the destructor save it.
1 |
|
Then you just need to add the action to configure your contract… Please refer to the included test contract for a complete working example, like:
1 | [[eosio::action]] |
Throughout the code all configuration is accessible through the cfg
member variable…