The guide will introduce you to working with an ERC20 token contract via the EthVigil API endpoints.
These steps are also packaged into a CLI tool designed in Python for you to play around with a pre-supplied ERC20 contract.
Please refer to this doc for a walkthrough.
Rename settings.example.json to settings.json
These are the initial contents of the file:
{
"development": {
"privatekey": "",
"contractAddress": "",
"REST_API_ENDPOINT": "https://beta-api.ethvigil.com/v0.1",
"INTERNAL_API_ENDPOINT": "https://beta.ethvigil.com/api",
"ETHVIGIL_USER_ADDRESS": "0xaddr",
"ETHVIGIL_API_KEY": "1212-1212-12-12"
}
}Enter the appropriate values for the following keys
privatekeyETHVIGIL_USER_ADDRESS-- associated with the above private keyETHVIGIL_API_KEY-- a token passed in HTTP request headers to authenticate POST calls. Works with GET calls too.
Hint: If you have
ev-cliinstalled, you can use dumpsettings to recover your EthVigil credentials
Leave the contractAddress field as it is.
Fill it up once you deploy the ERC20Mintable.sol contract through the python script.
python webhook_listener.py
Install the package requirements
pip install -r requirements.txt
python cli.py deploy
----OR----
pip install -e .
If everything goes well,
erc20-cli deploy
python cli.py --help
python cli.py increaseallowance --help
OR
erc20-cli --help