saveDAI
Search…
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 is the function called in order to create a new SaveToken
1
function createSaveToken(
2
address underlyingToken,
3
address assetAdapter,
4
address assetToken,
5
address insuranceAdapter,
6
address insuranceToken,
7
address exchangeFactory,
8
address farmerAddress,
9
string memory name,
10
string memory symbol,
11
uint8 decimals
12
) public returns (address)
Copied!
  • parameter: underlyingToken The underlying token address
  • parameter: assetAdapter The address of the Asset adapter to be used
  • parameter: assetToken The address for the asset token
  • parameter: insuranceAdapter The address of the Insurance adapter to be used
  • parameter: insuranceToken The address for the insurance token
  • parameter: exchangeFactory The address for the exchange factory
  • parameter: farmerAddress The address for the SaveToken farmer
  • returns: the address of the newly generated SaveToken contract
  • emits: SaveTokenCreated, an event for indexing the address of the newly created SaveToken
  • outcome: generates new SaveToken contract with a new asset and insurance token pairing

How createSaveToken works

  1. 1.
    Accepts all arguments necessary to create a new SaveToken
  2. 2.
    Generates a new SaveToken contract with the attributes provided
  3. 3.
    Pushes the address of the new SaveToken to the saveTokens array for future reference
Last modified 7mo ago