Development resources at your finger tips
Build with the coolest Web3 projects
Recurring funding for Open Source
Ethical ads to power Open Source
Learn about Web3 & earn rewards
Show appreciation for each other
Meet fellow developers, designers, futurists and more. Collaborate and BUIDL awesome projects together.
Discover great web3 organizations, work on meaningful projects and build relationships with like minded people. Browse Tribes
Meet the top hunters and contributors from our community.
KERNEL is an 8-week, invite-only program for top tech talent looking to build relationships, products, and companies in blockchain and Web 3. 100 tal…
Heyo Gitcoiners! With an entire city of hackers, coders and blockchain innovators relocated on our platform, the atmosphere is just buzzing with crea…
Type in [[ 2- term.length]] more characters to get results
[[ result.title ]]
[[ result.description | truncate(70) ]]
No matches found
Gitcoin is GDPR complaint. Learn more in
Gitcoin's Terms & Conditions.
Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
When deploying a contract, the user must pay enough ETH into the contract in order to fund future queries from Oraclize.it and the gas costs associated with those queries. Any unused amount is reclaimable by the creator upon contract expiration.
The costs of each query is set by [Oraclize.it pricing](http://docs.oraclize.it/#pricing) and we also must add the needed gas for the `_callback()` function to be executed from Oraclize.it
As the user modifies the query frequency or expiration date in the contract deployer, the needed amount of pre-funding should be dynamically calculated in the same manner shown [here](https://github.com/MarketProject/MarketProtocol/blob/d0c5c3efd4c3922a187de87d65f91b87eb6347c3/contracts/oraclize/MarketContractOraclize.sol#L160)
The above calculation and check doesn't really need to occur on chain. It just adds to the deployment costs of contracts.
We should be able to suggest to a user the correct `payable()` amount for contract creation in order to ensure successful deployment, and future query execution but with minimal capital requirements.
http://docs.oraclize.it/#ethereum-quick-start-custom-gas-limit-and-gas-price - currently we are using the default gas price in Oraclize.it of 20 gwei
Eventually the protocol needs to support functionality for the `creator` to change the gas price of the callbacks to by dynamic in situations of high network gas costs, but for now that is outside of the scope if this issue.
### Tasks for this bounty
- [x] Create the ability to find the estimated cost per query from Oraclize.it - we have exposed this [here](https://github.com/MarketProject/MarketProtocol/blob/b2817deab6bddaac28d5954ccde149e8174ab74a/contracts/oraclize/OraclizeQueryTest.sol#L73)
- [x] Using the same calculation as the protocol layer, suggest a pre-funding amount for the contract deployer
- [x] Use this amount for the deployment of contracts in the dApp
- [x] Create needed tests covering all new code generated