-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contract): add points for tipping (#2272)
Co-authored-by: g <[email protected]>
- Loading branch information
1 parent
392f2ad
commit e304536
Showing
9 changed files
with
123 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"address": "0x1265FD7f05E9700DA0A4d459BcE38376bb3a1475" | ||
"address": "0x2E0F3c30e5164dA369B40C531b7EDAa497734807" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"address": "0xE5e358e11986E48461652ebc2111ddce05AaA0d8" | ||
"address": "0x09e710567B7fB466E3e904a70a8bD60aFcE51f70" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"address": "0x6b2179482Ee8432a3650A0742e3968c96b1F487f" | ||
"address": "0x32a6c393a7F2434975B29f1Ff7dF838A03610F31" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"address": "0xc6F202b4A06FAbf5c838289514e41fd37611C9e1" | ||
"address": "0x98323458f8A214c805a0615764e66CA4b3c26A7c" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
// interfaces | ||
import {IImplementationRegistry} from "contracts/src/factory/facets/registry/IImplementationRegistry.sol"; | ||
import {ITownsPoints} from "contracts/src/airdrop/points/ITownsPoints.sol"; | ||
|
||
// libraries | ||
|
||
// contracts | ||
import {MembershipStorage} from "contracts/src/spaces/facets/membership/MembershipStorage.sol"; | ||
|
||
/// @title PointsProxyLib | ||
/// @notice Library for interacting with the TownsPoints contract | ||
library PointsProxyLib { | ||
/// @dev The implementation ID for the TownsPoints contract | ||
bytes32 internal constant POINTS_DIAMOND = bytes32("RiverAirdrop"); | ||
|
||
// ============================================================= | ||
// GETTERS | ||
// ============================================================= | ||
|
||
function airdropDiamond() internal view returns (address) { | ||
return | ||
IImplementationRegistry(MembershipStorage.layout().spaceFactory) | ||
.getLatestImplementation(POINTS_DIAMOND); | ||
} | ||
|
||
function getPoints( | ||
ITownsPoints.Action action, | ||
bytes memory data | ||
) internal view returns (uint256) { | ||
return ITownsPoints(airdropDiamond()).getPoints(action, data); | ||
} | ||
|
||
function mint(address to, uint256 amount) internal { | ||
ITownsPoints(airdropDiamond()).mint(to, amount); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters