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
createSaveToken
createSaveToken
is the function called in order to create a new SaveToken
parameter:
underlyingToken
The underlying token addressparameter:
assetAdapter
The address of the Asset adapter to be usedparameter:
assetToken
The address for the asset tokenparameter:
insuranceAdapter
The address of the Insurance adapter to be usedparameter:
insuranceToken
The address for the insurance tokenparameter:
exchangeFactory
The address for the exchange factoryparameter:
farmerAddress
The 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
saveTokens
array for future reference
Last updated