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

grant/new: contribute to gitcoin grant (dual contribution) #4376

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
60dc26b
grant/new: add grant amount splitter frontend code
thelostone-mc Apr 29, 2019
14b3c65
addressed review comments
thelostone-mc May 13, 2019
dbcb23c
make one time splitter payments
danlipert May 14, 2019
f7b6f63
send user back to correct page after one-time
danlipert May 14, 2019
6fa6e85
use multiple contract versions
danlipert May 18, 2019
4090f2a
add new abi to grant models
danlipert May 19, 2019
cb58f83
update contract version in template
danlipert May 19, 2019
3602775
fix naming
danlipert May 19, 2019
60c37dc
use gas widget for grant funding gas cost
danlipert May 19, 2019
0e2af01
fix args and set donation address
danlipert May 20, 2019
7f18e7f
fix style, bugs
danlipert May 21, 2019
7722151
working recurring with 105% bug
danlipert May 21, 2019
68226f6
working fee on contract v1
danlipert May 21, 2019
0496f30
util page to create v0 grant
danlipert May 21, 2019
69a16b7
fix v0 grant new, hide fee form on v0
danlipert May 21, 2019
d26ea67
fix js error in grant detail
danlipert May 22, 2019
b4b4ea1
cleanup caveman debugging
danlipert May 22, 2019
850fc20
load addresses from env
danlipert May 22, 2019
c6baa2c
fix env
danlipert May 22, 2019
31cbe2b
fix quotes in contract v1
danlipert May 22, 2019
476e046
pin slackclient
danlipert May 22, 2019
b43248d
update reqs
danlipert May 22, 2019
afc4b5a
add taggit
danlipert May 22, 2019
b4f0556
fix eslint
danlipert May 22, 2019
017b288
fix req
danlipert May 22, 2019
6898220
Merge pull request #4385 from gitcoinco/grant_fee_wiring
danlipert May 22, 2019
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
9 changes: 9 additions & 0 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,15 @@
# Grants
GRANTS_OWNER_ACCOUNT = env('GRANTS_OWNER_ACCOUNT', default='0xD386793F1DB5F21609571C0164841E5eA2D33aD8')
GRANTS_PRIVATE_KEY = env('GRANTS_PRIVATE_KEY', default='')
GRANTS_SPLITTER_ROPSTEN = env('GRANTS_SPLITTER_ROPSTEN', default='0xe2fd6dfe7f371e884e782d46f043552421b3a9d9')
GRANTS_SPLITTER_MAINNET = env('GRANTS_SPLITTER_MAINNET', default='0xdf869FAD6dB91f437B59F1EdEFab319493D4C4cE')
GRANTS_NETWORK = env('GRANTS_NETWORK', default='mainnet')
GITCOIN_DONATION_ADDRESS = env('GITCOIN_DONATION_ADDRESS', default='0x00De4B13153673BCAE2616b67bf822500d325Fc3')
SPLITTER_CONTRACT_ADDRESS = ''
if GRANTS_NETWORK == 'mainnet':
SPLITTER_CONTRACT_ADDRESS = GRANTS_SPLITTER_MAINNET
else:
SPLITTER_CONTRACT_ADDRESS = GRANTS_SPLITTER_ROPSTEN

METATX_GAS_PRICE_THRESHOLD = float(env('METATX_GAS_PRICE_THRESHOLD', default='10000.0'))

Expand Down
94 changes: 91 additions & 3 deletions app/assets/v2/css/grants/fund.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@media (min-width: 1200px) {
#gitcoin-grant-section .row {
border-bottom: 1px solid #515151;
}
}

.admin_profile a,
#grant-link {
color: #0D0764;
Expand All @@ -14,12 +20,13 @@
object-fit: cover;
}

#grants_form .form__input.valid,
#grants_form .form__input.error {
background-position: top 0.55rem right 0.5rem;
background-position: top 0.5rem right 0.5rem;
}

#grants_form input {
height: 2.5rem !important;
#grants_form input.form__input {
height: 2.5rem;
}

.select2-container--default .select2-selection--single,
Expand Down Expand Up @@ -54,6 +61,87 @@
font-size: 12px;
}

#gitcoin-grant-section .custom {
width: 4.25rem;
position: relative;
top: -10px;
}

#gitcoin-grant-section input.form__input {
height: 46px;
font-size: var(--fs-title);
}

#gitcoin-grant-section input.form__input.form__input.valid {
padding: 0;
background-image: none;
}

#gitcoin-grant-input-amount-error {
position: absolute;
top: 4rem
}

#gitcoin-grant-section .form__input.error {
background-position: top 0.75rem right 0.5rem;
background-size: auto 1.013rem;
padding-right: 1.8rem;
}

#gitcoin-grant-section input.form__input[type=number]::-webkit-inner-spin-button,
#gitcoin-grant-section input.form__input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}

#gitcoin-grant-input-error {
position: absolute;
top: 4rem;
}

#gitcoin-grant-section .badge {
padding: 16px 24px;
}

#gitcoin-grant-section .badge-active {
background-color: #72AAEB;
color: white;
}

#gitcoin-grant-section .badge-inactive {
background: #E8F3FF;
color: #4A90E2;
}

.inactive {
background-color: #E5E5E5 !important;
color: #9B9B9B !important;
}

#gitcoin-grant-section .gitcoin-grant-summary p {
position: relative;
top: 10px;
}

#gitcoin-grant-section .gitcoin-grant-summary i {
position: relative;
top: -2px;
}

#gitcoin-grant-section .gitcoin-grant-summary p:last-child {
top: 1.2rem;
left: 1rem;
}

.helper-text {
position: absolute;
left: 0;
right: 0;
bottom: -1.2rem;
}

@media (max-width: 767.98px) {

.banner-img {
Expand Down
68 changes: 68 additions & 0 deletions app/assets/v2/js/grants/compiledSplitter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
let compiledSplitter0 = {
'className': 'Splitter',
'args': [],
'code': '608060405234801561001057600080fd5b5061022e806100206000396000f3fe6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ab832b438114610045575b600080fd5b34801561005157600080fd5b506100a3600480360360a081101561006857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604082013591606081013591608090910135166100a5565b005b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018690529151918316916323b872dd916064808201926020929091908290030181600087803b15801561012457600080fd5b505af1158015610138573d6000803e3d6000fd5b505050506040513d602081101561014e57600080fd5b5050604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590529151918316916323b872dd916064808201926020929091908290030181600087803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5050505050505056fea165627a7a7230582040d38dee362e14bbc2f24c3ecf83e3e17941ae353766bfcad45738f1fb9d4b2d0029',
'runtimeBytecode': '6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ab832b438114610045575b600080fd5b34801561005157600080fd5b506100a3600480360360a081101561006857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604082013591606081013591608090910135166100a5565b005b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018690529151918316916323b872dd916064808201926020929091908290030181600087803b15801561012457600080fd5b505af1158015610138573d6000803e3d6000fd5b505050506040513d602081101561014e57600080fd5b5050604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590529151918316916323b872dd916064808201926020929091908290030181600087803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5050505050505056fea165627a7a7230582040d38dee362e14bbc2f24c3ecf83e3e17941ae353766bfcad45738f1fb9d4b2d0029',
'realRuntimeBytecode': '6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ab832b438114610045575b600080fd5b34801561005157600080fd5b506100a3600480360360a081101561006857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604082013591606081013591608090910135166100a5565b005b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018690529151918316916323b872dd916064808201926020929091908290030181600087803b15801561012457600080fd5b505af1158015610138573d6000803e3d6000fd5b505050506040513d602081101561014e57600080fd5b5050604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590529151918316916323b872dd916064808201926020929091908290030181600087803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5050505050505056fea165627a7a72305820',
'linkReferences': {},
'swarmHash': '40d38dee362e14bbc2f24c3ecf83e3e17941ae353766bfcad45738f1fb9d4b2d',
'gasEstimates': {
'creation': {
'codeDepositCost': '111600',
'executionCost': '159',
'totalCost': '111759'
},
'external': {
'splitTransfer(address,address,uint256,uint256,address)': 'infinite'
}
},
'functionHashes': {
'splitTransfer(address,address,uint256,uint256,address)': 'ab832b43'
},
'abiDefinition': [
{
'constant': false,
'inputs': [
{
'name': 'toFirst',
'type': 'address'
},
{
'name': 'toSecond',
'type': 'address'
},
{
'name': 'valueFirst',
'type': 'uint256'
},
{
'name': 'valueSecond',
'type': 'uint256'
},
{
'name': 'tokenAddress',
'type': 'address'
}
],
'name': 'splitTransfer',
'outputs': [],
'payable': false,
'stateMutability': 'nonpayable',
'type': 'function',
'signature': '0xab832b43'
}
],
'filename': '/Users/danlipert/gitcoin/splitter/.embark/contracts/Splitter.sol',
'originalFilename': 'contracts/Splitter.sol',
'path': '/Users/danlipert/gitcoin/splitter/contracts/Splitter.sol',
'gas': 198208,
'gasPrice': '20000000000',
'type': 'file',
'deploy': true,
'_gasLimit': 6000000,
'error': false,
'deploymentAccount': '0x4867228a029A44bf1814cA26A459bba578c03c9A',
'realArgs': [],
'deployedAddress': '0xCD32F7CF408e98B2e15C686A3a6f10B27D2563EF',
'transactionHash': '0x4ed10b2c826d66a0e2ccb4a5caeb39e2a9693333bc064b9ca4aa8b4dbbbbeeb9'
};
Loading