Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to swap ERC-20 token balances in Gitcoin Fee address to ETH using Uniswap #4517

Merged
merged 8 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/app/local.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ GITHUB_CLIENT_SECRET=
GITHUB_APP_NAME=

INFURA_USE_V3=True

SENDGRID_API_KEY=
CONTACT_EMAIL=

FEE_ADDRESS=
FEE_ADDRESS_PRIVATE_KEY=
8 changes: 8 additions & 0 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
'revenue',
'event_ethdenver2019',
'inbox',
'feeswapper',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -696,3 +697,10 @@
'name': 'Index View',
}]
SILKY_MAX_RECORDED_REQUESTS_CHECK_PERCENT = env.int('SILKY_MAX_RECORDED_REQUESTS_CHECK_PERCENT', default=10)

# Gitcoin Bounty Funding Fee settings
FEE_ADDRESS = env('FEE_ADDRESS', default='')
FEE_ADDRESS_PRIVATE_KEY = env('FEE_ADDRESS_PRIVATE_KEY', default='')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to test this on the mainnet, a la FEE_ADDRESS_NETWORK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, though I don't think you need to specify a special network setting in .env for that. You would just need to put an address and key with some mainnet ERC-20 balance in it, set the overall network in the .env for Mainnet, and then run the management command from the docker shell.

SLIPPAGE = env.float('SLIPPAGE', default=0.05)
UNISWAP_LIQUIDITY_FEE = env.float('UNISWAP_LIQUDITY_FEE', default=0.003)
UNISWAP_TRADE_DEADLINE = env.int('UNISWAP_TRADE_DEADLINE', default=300)
Empty file added app/feeswapper/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions app/feeswapper/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin

from .models import CurrencyConversion

admin.site.register(CurrencyConversion)
5 changes: 5 additions & 0 deletions app/feeswapper/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class FeeswapperConfig(AppConfig):
name = 'feeswapper'
Empty file.
Loading