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
{ | |
"network": { | |
"name": "2-dirty-raft", | |
"verbosity": 5, | |
"consensus": "raft", | |
"quorumVersion": "21.1.0", | |
"transactionManager": "21.1.0", | |
"permissioned": true, | |
"genesisFile": "none", | |
"generateKeys": true, |
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
{ | |
"alloc": { | |
"0xed9d02e382b34818e88b88a309c7fe71e65f419d": { | |
"balance": "1000000000000000000000000000" | |
}, | |
"0xca843569e3427144cead5e4d5999a3d0ccf92b8e": { | |
"balance": "1000000000000000000000000000" | |
}, | |
"0x0fbdc686b912d7722dc86510934589e0aaf3b55a": { | |
"balance": "1000000000000000000000000000" |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
contract Token is ERC20 { | |
// name Token | |
// symbol TKN | |
// decimals 18 (default) | |
// totalSupply 1000000 |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.1; | |
interface IPRNG { | |
struct Entropy { | |
address signer; | |
bytes32 hash; | |
bytes sig; | |
} |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; | |
import "@openzeppelin/contracts/security/Pausable.sol"; | |
contract Crowdsale is Ownable, ReentrancyGuard, Pausable { | |
IERC20 private _tokenA; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.7.5; | |
contract Calculator { | |
function add(uint256 x, uint256 y) public pure returns (uint256) { | |
/* start function*/ | |
require(x + y >= x); | |
return /*first number*/x + y/*second number*/ | |
/* end function*/; |
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
// SPDX-License-Identifier: NONE | |
pragma solidity =0.7.5; | |
/* | |
* @source: https://youtu.be/P_Mtd5Fc_3E | |
* @author: Shahar Zini | |
* @revised: 0x91d9 | |
*/ | |
contract GuessTheNumber { |
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
[ | |
{ | |
"inputs": [], | |
"name": "rand", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} |
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
#!usr/bin/bash | |
docker pull sirawitt42/iroha-1.5.0-rockdb:develop | |
git clone https://github.com/MASDXI/iroha.git -b masdxi/docker/hotfix | |
cd iroha | |
docker run --name iroha \ | |
-d \ | |
-p 50051:50051 \ |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.14; | |
contract TrieDB { | |
enum TRIE_STATUS { INACTIVE, ACTIVE } | |
struct TrieNode { | |
bytes32 origin; | |
TRIE_STATUS status; |
OlderNewer