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
test |
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
pragma solidity ^0.4.8; | |
contract ERC20Interface { | |
function totalSupply() public constant returns (uint256 supply); | |
function balance() public constant returns (uint256); | |
function balanceOf(address _owner) public constant returns (uint256); | |
function transfer(address _to, uint256 _value) public returns (bool success); | |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); | |
function approve(address _spender, uint256 _value) public returns (bool success); | |
function allowance(address _owner, address _spender) public constant returns (uint256 remaining); |
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
#!/bin/bash | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=3.2.0 | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
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
test |
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
/* | |
* References: | |
* 1. https://uploads-ssl.webflow.com/5ad71ffeb79acc67c8bcdaba/5ad8d1193a40977462982470_scalable-reward-distribution-paper.pdf | |
* 2. https://eips.ethereum.org/EIPS/eip-1973 | |
*/ | |
pragma solidity 0.4.24; | |
contract Test { | |
// using SafeMath for 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
pragma solidity ^0.4.24; | |
/** | |
* Utility library of inline functions on addresses | |
*/ | |
library Address { | |
/** | |
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to | |
* `recipient`, forwarding all available gas and reverting on errors. | |
*/ |
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
function external_call0(address destination, uint value, uint dataLength, bytes data) internal returns (bool) { | |
return (destination.call.value(tx.value)(tx.data)) | |
} | |
function external_call1(address destination, uint value, uint dataLength, bytes data) internal returns (bool) { | |
bool result; | |
assembly { | |
let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) | |
let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that |
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: GPL-3.0 | |
pragma solidity ^0.8.0; | |
contract Impl { | |
event LogData(bytes lData); | |
function log() public { |