Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidity API

ETHPool

DepositInfo

struct DepositInfo {
  uint256 amount;
  uint256 depositTime;
}

totalDeposits

uint256 totalDeposits

totalRewards

uint256 totalRewards

deposits

mapping(address => struct ETHPool.DepositInfo) deposits

Deposit

event Deposit(address user, uint256 amount)

Withdraw

event Withdraw(address user, uint256 amount)

RewardAdded

event RewardAdded(uint256 amount)

InvalidAmount

error InvalidAmount()

InsufficientBalance

error InsufficientBalance()

TransferFailed

error TransferFailed()

constructor

constructor() public

deposit

function deposit() external payable

Deposit

withdraw

function withdraw(uint256 amount) external

Withdraw

Parameters

Name Type Description
amount uint256 Amount

addReward

function addReward() external payable

Add reward function, only callable by contract owner

About

奖励池 储蓄代币 每周获得奖励

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages