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
<div class="row"> | |
<div class="col-lg-12"> | |
<h1 class="page-header">New Call</h1> | |
</div> | |
<!-- /.col-lg-12 --> | |
</div> | |
<div class="row"> | |
<div class="col-lg-12"> |
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
//Load Cryptopunks contract and print the owner for each one - takes a long long time and freezes! | |
var PunkContract = web3.eth.contract(contract_abi); | |
var contractInstance = PunkContract.at('0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB'); | |
var punk_id = 0; | |
for(punk_id=0;punk_id<10000;punk_id++) | |
{ |
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.18; | |
library ECRecovery { | |
/** | |
* @dev Recover signer address from a message by using their signature | |
* @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. | |
* @param sig bytes signature, the signature is generated using web3.eth.sign() | |
*/ | |
function recover(bytes32 hash, bytes sig) public pure returns (address) { |
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.18; | |
// File: contracts/ECRecovery.sol | |
library ECRecovery { | |
/** | |
* @dev Recover signer address from a message by using their signature | |
* @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. | |
* @param sig bytes signature, the signature is generated using web3.eth.sign() |
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
contract Bitcoinereum { | |
string public symbol = "BTCM"; | |
string public name = "Bitcoinereum"; | |
uint8 public constant decimals = 8; | |
uint256 _totalSupply = 0; | |
uint256 _maxTotalSupply = 2100000000000000; | |
uint256 _miningReward = 100000000; //1 BTCM - To be halved every 4 years | |
uint256 _maxMiningReward = 5000000000; //50 BTCM - To be halved every 4 years | |
uint256 _rewardHalvingTimePeriod = 126227704; //4 years | |
uint256 _nextRewardHalving = now + _rewardHalvingTimePeriod; |
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
static async detectInjectedWeb3( ) | |
{ | |
return new Promise(async function(resolve, reject) { | |
// window.addEventListener('load', async () => { | |
// Modern dapp browsers... |
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
{ | |
"networks": { | |
"mainnet": { | |
"contracts": { | |
"_0xbitcointoken": {"name":"0xBitcoinToken", "blockchain_address":"0xb6ed7644c69416d67b522e20bc294a9a9b405b31"}, | |
"batchedpayments": {"name":"BatchedPayments", "blockchain_address":"0xebf6245689194a6e43096551567827c6726ede0b"}, | |
"mintforwarder":{"name":"MintHelper", "blockchain_address":"0xf118fde3f634e5c47638030ab0514debf39465d1"} | |
} | |
}, |
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 _toLower(string str) internal returns (string) { | |
bytes memory bStr = bytes(str); | |
bytes memory bLower = new bytes(bStr.length); | |
for (uint i = 0; i < bStr.length; i++) { | |
// Uppercase character... | |
if ((bStr[i] >= 65) && (bStr[i] <= 90)) { | |
// So we add 32 to make it lowercase | |
bLower[i] = bytes1(int(bStr[i]) + 32); | |
} else { | |
bLower[i] = bStr[i]; |
OlderNewer