Development resources at your finger tips
Build with the coolest Web3 projects
Recurring funding for 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.
In partnership with Protocol Labs, we’re excited to welcome builders from everywhere to APOLLO, your mission control to engage with the builder…
We’re excited to publically announce that Matic Network is partnering with Gitcoin to launch the Build-n-Earn Program – assisting dApps t…
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.
The Gnosis MockContract is a smart contract enabling developers to quickly mock contract interactions for unit tests.
It enables developers to
- Make dependent contracts return predefined values for different methods and arguments
- Simulate exceptions such as revert and outOfGas
- Assert on how often a dependency is called
The MockContract facilitates these features without requiring any separate test contracts.
Check out the repo: https://github.com/gnosis/mock-contract
Extend the functionality of the MockContract to partially matching arguments.
- Develop a framework allowing developers to define partially matching calldata for specific methods.
Defining partially matched call data should look similar to:
const particallyMatchedCalldata = contract.methods.methodName(
accounts, ANY, ..., ANY
Here, ANY would be some sort of constant defined in the smart contract.
- Write the logic for the MockContract to expose predefined returns to the partially matched calldata.
It is expected that the following functions for partially matched calldata are provided:
function givenPartialCalldataReturn(bytes calldata call, bytes calldata response) external;
function givenPartialCalldataReturnBool(bytes calldata call, bool response) external;
function givenPartialCalldataReturnUint(bytes calldata call, uint response) external;
function givenPartialCalldataReturnAddress(bytes calldata call, address response) external;
function givenPartialCalldataRevert(bytes calldata call) external;
function givenPartialCalldataRevertWithMessage(bytes calldata call, string calldata message) external;
function givenPartialCalldataRunOutOfGas(bytes calldata call) external;
They should enable the same functionality on partially matching calldata as the current respective functions with the same function names, but without the word "Partial".
- Make sure the invocation count functions are still returning the expected numbers
function invocationCount() external returns (uint);
function invocationCountForMethod(bytes calldata method) external returns (uint);
function invocationCountForCalldata(bytes calldata call) external returns (uint);
- Current naming conventions need to be preseved
- All functionality must have 100 % line and branch coverage
- The [solidity style guide](https://solidity.readthedocs.io/en/v0.5.3/style-guide.html) must be considered and code must be linted
Additional GNO can be tipped according to the level of technical implementation