Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volumefi/somm_airdrop_contract
Sommelier Airdrop Vyper contracts for claiming SOMM tokens on Ethereum Blockchain
https://github.com/volumefi/somm_airdrop_contract
Last synced: about 2 months ago
JSON representation
Sommelier Airdrop Vyper contracts for claiming SOMM tokens on Ethereum Blockchain
- Host: GitHub
- URL: https://github.com/volumefi/somm_airdrop_contract
- Owner: VolumeFi
- Created: 2021-12-10T22:08:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T20:02:19.000Z (almost 3 years ago)
- Last Synced: 2024-04-16T01:42:26.428Z (9 months ago)
- Language: Python
- Homepage:
- Size: 929 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Somm Airdrop Contract
## Testing and Development on testnet
### Dependencies
* [nodejs](https://nodejs.org/en/download/) - >=v8, tested with version v16.13.1
* [python3](https://www.python.org/downloads/release/python-368/) from version 3.6 to 3.9, python3-dev
* [brownie](https://github.com/iamdefinitelyahuman/brownie) - tested with version [1.17.2](https://github.com/eth-brownie/brownie/releases/tag/v1.17.2)
* [ganache-cli](https://github.com/trufflesuite/ganache-cli) - tested with version [6.12.2](https://github.com/trufflesuite/ganache-cli/releases/tag/v6.12.2)### Deploy on testnet
```bash
brownie run scripts/deploy_tesnet.py --network rinkeby
```### Deploy on mainnet
Replace `SOMM` token address and `Gravity Bridge` Address in `scripts/deploy_mainnet.py`
```bash
brownie run scripts/deploy_mainnet.py --network mainnet
```
Transfer `SOMM` token to the airdrop address.### Running the Tests
```bash
brownie test -s
```### Contracts
- Airdrop - Main contract to airdrop using Merkle tree
- ERC20 - Test ERC20 contract## External functions
| Function Name | Parameters | Note | Description |
| -------------- | ---------------------------------------------------------- | ---- | -------------------------------------------------------- |
| claim | address receiver, uint256 amount, Bytes32[15] merkle_proof | | claim function to airdrop. verify merkle proof with root |
| return_tokens | | | return all remaining tokens to `Gravity` after deadline |
| somm_token | | view | SOMM_TOKEN address |
| received | address receiver | view | returns `true` if received once |
| deadline | | view | airdrop deadline |
| gravity_bridge | | view | Gravity Bridge address |
| merkle_root | | view | root of merkle tree |