SushiswapGreenSwapWrapper

Git Source

Inherits: Initializable, ContextUpgradeable, OwnableUpgradeable

Author: KlimaDAO

This contracts allows for a sushiswap swap to be offset in a 2nd txn triggered

State Variables

retirementHoldingAddress

address payable public retirementHoldingAddress;

sushiRouterMain

address public sushiRouterMain;

sushiAmountOffset

uint256 public sushiAmountOffset;

Functions

initialize

function initialize() public initializer;

GreenSwapTokensForTokens

This function will do a retirement as well as a swap, while it is
configurable, it can be pre-populated with default values from the Sushi UI

function GreenSwapTokensForTokens(
    uint256 amountIn,
    uint256 amountOutMin,
    address[] calldata path,
    address to,
    uint256 deadline
) public payable;

setRetirementHoldingAddress

function setRetirementHoldingAddress(address _newHoldingAddress) public onlyOwner;

setSushiRouterMain

function setSushiRouterMain(address _newSushiRouter) public onlyOwner;

setSushiAmountOffset

function setSushiAmountOffset(uint256 _newSushiAmountOffset) public onlyOwner;

Events

newRetirementHolder

event newRetirementHolder(address newHolder);

newSushiRouter

event newSushiRouter(address newRouter);

newSushiAmountOffset

event newSushiAmountOffset(uint256 newAmount);