-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
8 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,9 +1,8 @@ | ||
# 🏗 Scaffold-ETH 2 | ||
# 🚨FairDrop | ||
|
||
<h4 align="center"> | ||
<a href="https://docs.scaffoldeth.io">Documentation</a> | | ||
<a href="https://scaffoldeth.io">Website</a> | ||
</h4> | ||
- [Quickstart](https://raw.githubusercontent.com/piotrostr/fairdrop/docs/usage.md) | ||
- [Development Docs](https://raw.githubusercontent.com/piotrostr/fairdrop/docs/setup.md) | ||
|
||
- [Setup Instructions](https://raw.githubusercontent.com/piotrostr/fairdrop/docs/setup.md) | ||
- [Usage Guide](https://raw.githubusercontent.com/piotrostr/fairdrop/docs/usage.md) | ||
Let's make Ethereum fair again! 🚀 | ||
|
||
<sub>Made with <3 by piotrostr.eth</sub> |
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 |
---|---|---|
@@ -1 +1,52 @@ | ||
# Usage | ||
|
||
- [WorldID Orb](https://worldcoin.org/world-id) | ||
- [Wormhole](https://docs.wormhole.com/wormhole/quick-start/tutorials/hello-wormhole/hello-wormhole-explained) | ||
|
||
You can power-up your smart contract to only serve WorldID Orb verified users | ||
by calling the `isVerified` function of the smart contract on the network of | ||
your choice. | ||
|
||
## Mainnet Addresses: | ||
|
||
- Optimism: `0x04a85361c22eD1DDF4f3EcB998570FC71A5df991` | ||
- Arbitrum: `0x146174BD95fB5b71Dd6aa6dd003d52D0bC4dA799` (Satellite) | ||
|
||
## Testnet Addresses: | ||
|
||
Coming soon:) | ||
|
||
## Code Example | ||
|
||
The `IFairDrop` interface is tiny, it has one function that is relevant: | ||
|
||
```solidity | ||
interface IFairDrop { | ||
function isVerified(address _user) external view returns (bool); | ||
} | ||
``` | ||
|
||
after defining the interface, you can use it in your smart contract like this: | ||
|
||
```solidity | ||
modifier onlyVerified() { | ||
require(IFairDrop(fairDropAddress).isVerified(msg.sender), "FairDrop: User is not verified"); | ||
_; | ||
} | ||
``` | ||
|
||
and then | ||
|
||
```solidity | ||
function antiSybilFunction() public onlyVerified { | ||
// only humans allowed here! | ||
} | ||
``` | ||
|
||
## How it works | ||
|
||
There is a Satellite contract on Arbitrum that receives data from Optimism core | ||
FairDrop contract through Wormhole | ||
|
||
Satellite cannot perform verification, it is only a mirror of the data in the | ||
core contract |
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