Skip to content

Commit

Permalink
added mappings for Receipt erc115 token
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi8960git committed Sep 15, 2024
1 parent 3005de6 commit dd4d8fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/TakeProfitHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ contract TakeProfitsHook is BaseHook, ERC1155 {
mapping(PoolId poolId => mapping(int24 tick => mapping(bool zeroForOne => int256 amount)))
public takeProfitPositions;

// tokenIdExists is a mapping to store whether a given tokenId (i.e. a take-profit order) exists given a token id
mapping(uint256 tokenId => bool exists) public tokenIdExists;
// tokenIdClaimable is a mapping that stores how many swapped tokens are claimable for a given tokenId
mapping(uint256 tokenId => uint256 claimable) public tokenIdClaimable;
// tokenIdTotalSupply is a mapping that stores how many tokens need to be sold to execute the take-profit order
mapping(uint256 tokenId => uint256 supply) public tokenIdTotalSupply;
// tokenIdData is a mapping that stores the PoolKey, tickLower, and zeroForOne values for a given tokenId
mapping(uint256 tokenId => TokenData) public tokenIdData;
struct TokenData {
PoolKey poolKey;
int24 tick;
bool zeroForOne;
}

constructor(
IPoolManager _poolManager,
string memory _url
Expand Down

0 comments on commit dd4d8fb

Please sign in to comment.