SaveToken Factory
The factory contract that is used to generate new SaveTokens by referencing the SaveToken implementation contract
The SaveTokenFactory creates new, unique SaveTokens for savers with that will wrap both asset and insurance tokens.
createSaveToken
createSaveTokencreateSaveToken is the function called in order to create a new SaveToken
function createSaveToken(
address underlyingToken,
address assetAdapter,
address assetToken,
address insuranceAdapter,
address insuranceToken,
address exchangeFactory,
address farmerAddress,
string memory name,
string memory symbol,
uint8 decimals
) public returns (address)parameter:
underlyingTokenThe underlying token addressparameter:
assetAdapterThe address of the Asset adapter to be usedparameter:
assetTokenThe address for the asset tokenparameter:
insuranceAdapterThe address of the Insurance adapter to be usedparameter:
insuranceTokenThe address for the insurance tokenparameter:
exchangeFactoryThe address for the exchange factoryparameter:
farmerAddressThe address for the SaveToken farmerreturns: the address of the newly generated SaveToken contract
emits:
SaveTokenCreated, an event for indexing the address of the newly created SaveTokenoutcome: generates new SaveToken contract with a new asset and insurance token pairing
How createSaveToken works
createSaveToken worksAccepts all arguments necessary to create a new SaveToken
Generates a new SaveToken contract with the attributes provided
Pushes the address of the new SaveToken to the
saveTokensarray for future reference
Last updated