Comments (3)
Proposed messages (all from UniswapV3Staker.sol). What do you think @ewilz @moodysalem ?
The proposed messages are a little verbose. If the contract is too big, here's what we will do to reduce it:
- Change all the
UniswapV3Staker::
prefixes toStaker:
- Omit the
Staker:
prefix - Omit the function names
- Make descriptions more terse
Before | After |
---|---|
claimDeadline_not_gte_endTime |
UniswapV3Staker::createIncentive: claim deadline before end time |
endTime_not_gte_startTime |
UniswapV3Staker::createIncentive: end time before start time |
INCENTIVE_EXISTS |
UniswapV3Staker::createIncentive: incentive already exists |
INVALID_REWARD_ADDRESS |
UniswapV3Staker::createIncentive: invalid reward address |
INVALID_REWARD_AMOUNT |
UniswapV3Staker::createIncentive: invalid reward amount |
REWARD_TRANSFER_FAILED |
UniswapV3Staker::createIncentive: reward transfer failed |
TIMESTAMP_LTE_CLAIMDEADLINE |
UniswapV3Staker::endIncentive: claim deadline before block timestamp |
INVALID_INCENTIVE |
UniswapV3Staker::endIncentive: incentive is invalid |
uniswap v3 nft only |
UniswapV3Staker::onERC721Received: uniswap v3 nft only |
NUMBER_OF_STAKES_NOT_ZERO |
UniswapV3Staker::withdrawToken: nonzero number of stakes |
NOT_YOUR_NFT |
UniswapV3Staker::withdrawToken: nft does not belong to msg.sender |
NOT_YOUR_DEPOSIT |
UniswapV3Staker::stakeToken: deposit owner is not msg.sender |
INVALID_POSITION |
UniswapV3Staker::unstakeToken: specified position is invalid |
BAD INCENTIVE |
UniswapV3Staker::unstakeToken: incentive not found |
non-existent incentive |
UniswapV3Staker::_stakeToken: incentive not found |
from v3-staker.
I would propose the following if the goal is to be terse / save bytespace. Added a few recent ones to this list. All have been made shorter where possible, except for already staked which I proposed "incentive already staked".
Before | After |
---|---|
claimDeadline_not_gte_endTime | claim deadline before end time |
endTime_not_gte_startTime | end time before start |
INCENTIVE_EXISTS | incentive already exists |
INVALID_REWARD_ADDRESS | invalid reward address |
INVALID_REWARD_AMOUNT | invalid reward amount |
REWARD_TRANSFER_FAILED | reward transfer failed |
TIMESTAMP_LTE_CLAIMDEADLINE | claim deadline before block time |
INVALID_INCENTIVE | invalid incentive |
uniswap v3 nft only | not a univ3 nft |
NUMBER_OF_STAKES_NOT_ZERO | nonzero num of stakes |
NOT_YOUR_NFT | sender is not nft owner |
NOT_YOUR_DEPOSIT | sender is not deposit owner |
INVALID_POSITION | position is invalid |
BAD INCENTIVE | incentive not found |
non-existent incentive | incentive not found |
Stake does not exist | nonexistent stake |
incentive not started yet | incentive not started |
incentive ended | incentive ended |
already staked | incentive already staked |
from v3-staker.
These messages look good.
If we have the space, it might be good to prefix them with the function name (invalid incentive
would become createIncentive: invalid incentive
), but I don't feel strongly about that.
@ewilz @moodysalem looks good to you?
from v3-staker.
Related Issues (20)
- consider time-vesting rewards by how long the position was in range HOT 1
- After endTime, the profit will still be calculated? why is that
- Add polygon deployment addresses in readme HOT 1
- How to get the IncentiveId after the creation ? HOT 1
- How to get Reward Info ? HOT 1
- Cannot find module '../../typechain'
- yarn test error on v1.0.2 tag HOT 1
- How to deploy to hardhat network
- No way to read all staked positions of a user address, in univ3 staker contract HOT 1
- invalid arrayify value when providing bytes argument to safeTransferFrom(address,address,uint256,bytes)
- Critical Security Issue
- Return
- - - [ ] #- [ ] #_@`~~~~`_
- Implement solidity 0.8 like v3-core and v3-periphery
- Withdraw remaining incentive token when incentive end HOT 1
- blockchains/binance/assets/AERGO-46B/logo.png
- blockchains/binance/assets/AERGO-46B/logo.png HOT 1
- github.com/trustwallet/asset
- Ace100
- Add Support for Base Network in v3-Staker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v3-staker.