Skip to content

Commit

Permalink
basic dapptools structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Oct 19, 2021
1 parent 546c33e commit 67c3fac
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .dapprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export DAPP_SOLC_VERSION=0.6.10
export DAPP_REMAPPINGS=$(cat remappings.txt)
export DAPP_BUILD_OPTIMIZE=1
export DAPP_BUILD_OPTIMIZE_RUNS=1000000000
export DAPP_TEST_VERBOSITY=1
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.packageDefaultDependenciesContractsDirectory": "src"
}
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ds-test/=lib/ds-test/src/
7 changes: 5 additions & 2 deletions src/IndexCoopSymbolicExecution.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.6;
// SPDX-License-Identifier: Apache License, Version 2.0
pragma solidity ^0.6.10;

contract IndexCoopSymbolicExecution {
function isPasswordCorrect(uint256 _password) external pure returns (bool) {
return _password == 1337;
}
}
10 changes: 3 additions & 7 deletions src/IndexCoopSymbolicExecution.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.6;
pragma solidity 0.6.10;

import "ds-test/test.sol";

Expand All @@ -12,11 +12,7 @@ contract IndexCoopSymbolicExecutionTest is DSTest {
execution = new IndexCoopSymbolicExecution();
}

function testFail_basic_sanity() public {
assertTrue(false);
}

function test_basic_sanity() public {
assertTrue(true);
function prove_password(uint256 _password) public {
assertTrue(!execution.isPasswordCorrect(_password));
}
}

0 comments on commit 67c3fac

Please sign in to comment.