Comment on page

SEuroOffering

All public interfaces for the SEuroOffering contract
SEuroOffering contract extends Ownable, Pausable and Drainable contracts.

Deployment

address _seuroAddr address of the sEURO token that will be minted
address _sEuroRateCalculator address of the SEuroCalculator dependency
address _tokenManager address of the TokenManager dependency
address _bondingCurve address of the BondingCurve dependency

swap

Given an ERC20 token, swaps for an equivalent amount of sEURO.
parameters: string _token, uint256 _amount
_token is the symbol of the ERC20 you'd like to swap.
_amount is the amount of the token that you'd like to swap.
  • SEuroOffering must be activated
  • SEuroOffering must not be paused
  • Given token name is one of the tokens accepted by the TokenManager contract
  • User has approved the SEuroOffering contract to spend the given amount of the ERC20

swapETH

Payable function that swaps the value of the transaction for the equivalent amount of sEURO.
  • SEuroOffering must be activated
  • SEuroOffering must not be paused

readOnlyCalculateSwap

Read-only function to estimate how much sEURO will be purchased with the given amount of given token/coin.
parameters: string _token, uint256 _amount
returns: uint256 seuros
_token is the symbol of the ERC20 you'd like to swap. To estimate an ETH swap, provide "ETH" as the _token parameter.
_amount is the amount of the token/coin that you'd like to swap.
seuros is the amount of seuros received by the user in the swap

activate

Makes the SEuroOffering active for public use, allowing users to swap. Records the time the offering was activated.
User must be contract owner

complete

Deactivates the SEuroOffering, thus preventing users from swapping. Records the time the offering was completed.
User must be contract owner

setCalculator

Updates the address of the contract's SEuroCalculator dependency, given it is not a zero address.
parameters: address _newAddress
_newAddress is the address of the new SEuroCalculator
User must be contract owner

setTokenManager

Updates the address of the contract's TokenManager dependency, given it is not a zero address.
parameters: address _newAddress
_newAddress is the address of the new TokenManager
User must be contract owner

setBondingCurve

Updates the address of the contract's BondingCurve dependency, given it is not a zero address.
parameters: address _newAddress
_newAddress is the address of the new BondingCurve
User must be contract owner

setCollateralWallet

Updates the address of the wallet, to which you would like all swapped collateral to be transferred.
parameters: address _collateralWallet
_collateralWallet is the address of the new wallet
User must be contract owner

State Variables

address collateralWallet the address of the wallet, to which you would like all swapped ETH and ERC20 collateral to be sent
Status status the current activity status of the SEuroOffering contract, the timestamp of when it was activated, and the timestamp of when it was completed.
address Seuro the address of the sEURO ERC20 token contract
address sEuroRateCalculator the address of the SEuroCalculator dependency.
address tokenManager the address of the TokenManager dependency.
address bondingCurve the address of the BondingCurve dependency.

Structs

Status
  • bool active
  • uint256 start
  • uint256 stop