dsa-connectors/contracts/mainnet/connectors/sushi-incentive/interface.sol

128 lines
2.8 KiB
Solidity
Raw Normal View History

2021-12-27 15:41:55 +00:00
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
struct UserInfo {
2021-12-16 06:12:11 +00:00
uint256 amount;
uint256 rewardDebt;
}
struct PoolInfo {
2021-12-16 06:12:11 +00:00
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SUSHIs to distribute per block.
uint256 lastRewardBlock; // Last block number that SUSHIs distribution occurs.
uint256 accSushiPerShare; // Accumulated SUSHIs per share, times 1e12. See below.
}
2021-11-15 14:58:14 +00:00
interface IERC20 {
2021-12-16 06:12:11 +00:00
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
/// @notice EIP 2612
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
2021-11-15 14:58:14 +00:00
}
interface IMasterChef {
2021-12-16 06:12:11 +00:00
function poolLength() external view returns (uint256);
2021-12-16 06:12:11 +00:00
function updatePool(uint256 pid) external returns (PoolInfo memory);
2021-12-16 06:12:11 +00:00
function poolInfo(uint256 pid)
external
view
returns (
address,
uint256,
uint256,
uint256
);
2021-12-16 06:12:11 +00:00
function userInfo(uint256 _pid, address _user)
external
view
returns (uint256, uint256);
2021-12-16 06:12:11 +00:00
function deposit(uint256 pid, uint256 amount) external;
2021-12-16 06:12:11 +00:00
function withdraw(uint256 pid, uint256 amount) external;
2021-12-16 06:12:11 +00:00
function emergencyWithdraw(uint256 pid, address to) external;
}
interface IMasterChefV2 {
2021-12-16 06:12:11 +00:00
function poolLength() external view returns (uint256);
2021-12-16 06:12:11 +00:00
function updatePool(uint256 pid) external returns (PoolInfo memory);
2021-12-16 06:12:11 +00:00
function lpToken(uint256 pid) external view returns (address);
2021-12-16 06:12:11 +00:00
function userInfo(uint256 _pid, address _user)
external
view
returns (uint256, uint256);
2021-12-16 06:12:11 +00:00
function deposit(
uint256 pid,
uint256 amount,
address to
) external;
2021-12-16 06:12:11 +00:00
function withdraw(
uint256 pid,
uint256 amount,
address to
) external;
2021-12-16 06:12:11 +00:00
function emergencyWithdraw(uint256 pid, address to) external;
2021-12-16 06:12:11 +00:00
function harvest(uint256 pid, address to) external;
2021-12-16 06:12:11 +00:00
function withdrawAndHarvest(
uint256 pid,
uint256 amount,
address to
) external;
}
interface ISushiSwapFactory {
2021-12-16 06:12:11 +00:00
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
2021-12-16 06:12:11 +00:00
function allPairs(uint256) external view returns (address pair);
2021-12-16 06:12:11 +00:00
function allPairsLength() external view returns (uint256);
2021-12-16 06:12:11 +00:00
function feeTo() external view returns (address);
2021-12-16 06:12:11 +00:00
function feeToSetter() external view returns (address);
2021-12-16 06:12:11 +00:00
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}