Deployment
Refer to the deployment document here.Public Functions
The price-setter function:
Parameters:
- tokenContract (address): the address for the token contract.
- price (uint256): the price in wei of dollars for a whole token (see example).
The price-getter function:
Parameters:
- tokenContract (address): the address for the token contract.
Returns:
- price (uint256): the price in wei of dollars for a whole token (see example).
The version-getter function:
Returns:
- version (string): the string of the protocol version of this template file.
Set an ERC20-Pricing Contract in an Asset Handler
Use the following function in the asset handler:Parameters:
- _address (address): the address of the ERC20 pricing contract.
Events:
- event AD1467_ERC20PricingAddressSet(address indexed _address);
- Parameters:
- _address: the address of the pricing contract.
- Parameters:
Upgrading:
To upgrade the pricing contracts, ensure your new pricing contract is deployed to the same network your Application Handler is deployed to. Next, you will call the appropriate functionsetERC20Pricing
or setNFTPricing
from the Application Handler contract.