This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'a3afb7926133c90ceaf7df873dcf789bc8dfed95' into xavier-s…
…taking
- Loading branch information
Showing
56 changed files
with
2,268 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ target | |
## Npm | ||
package-lock.json | ||
node_modules | ||
build | ||
|
||
# Test Data | ||
## Pangolin Local Testnet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "dvm-tests", | ||
"name": "darwinia-tests", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pragma solidity 0.8.2; | ||
|
||
contract ECRecoverTests { | ||
function ecrecover(bytes memory input) public returns(bytes memory) { | ||
address ecrecoverAddress = address(0x0000000000000000000000000000000000000001); | ||
(bool success, bytes memory returnData) = ecrecoverAddress.call(input); | ||
return returnData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pragma solidity 0.8.2; | ||
|
||
contract ExplicitRevertReason { | ||
function max10(uint256 a) public returns (uint256) { | ||
if (a > 10) | ||
revert("Value must not be greater than 10."); | ||
return a; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pragma solidity ^0.8.2; | ||
|
||
contract Storage { | ||
function getStorage(bytes32 key) public view returns (bytes32 value) { | ||
assembly { | ||
value := sload(key) | ||
} | ||
} | ||
function setStorage(bytes32 key, bytes32 value) public { | ||
assembly { | ||
sstore(key, value) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pragma solidity 0.8.2; | ||
|
||
contract Test { | ||
function multiply(uint a) public pure returns(uint d) { | ||
return a * 7; | ||
} | ||
function gasLimit() public view returns(uint) { | ||
return block.gaslimit; | ||
} | ||
function currentBlock() public view returns(uint) { | ||
return block.number; | ||
} | ||
function blockHash(uint number) public view returns(bytes32) { | ||
return blockhash(number); | ||
} | ||
} |
Oops, something went wrong.