Skip to content

Instantly share code, notes, and snippets.

View bitcoinbrisbane's full-sized avatar
💭
I may be slow to respond.

Lucas Cullen bitcoinbrisbane

💭
I may be slow to respond.
View GitHub Profile
// Concate string
function strConcat(string _a, string _b, string _c) internal pure returns (string) {
bytes memory _ba = bytes(_a);
bytes memory _bb = bytes(_b);
bytes memory _bc = bytes(_c);
string memory abcde = new string(_ba.length + _bb.length + _bc.length);
bytes memory babcde = bytes(abcde);
uint k = 0;
for (uint i = 0; i < _ba.length; i++) {
babcde[k++] = _ba[i];
pragma solidity ^0.5.2;
contract TheTimes {
uint256 public TotalSupply;
uint256 public MaxSupply = 21000;
uint256 public Price;
address[] public Hodlers;
#On Ubuntu 18
#MVN
mvn add 8
#Install python 2
sudo apt install python-minimal
#Make
sudo apt-get install libtool pkg-config build-essential autoconf automake
@bitcoinbrisbane
bitcoinbrisbane / truffleTestHelper.js
Last active October 26, 2018 11:35 — forked from AndyWatt83/truffleTestHelper.js
A helper file with a couple of functions for advancing the blockchain in time, and blocks.
advanceTimeAndBlock = async (time) => {
await advanceTime(time);
await advanceBlock();
return Promise.resolve(web3.eth.getBlock('latest'));
}
advanceTime = (time) => {
return new Promise((resolve, reject) => {
web3.currentProvider.send({
# Changes
Unit tests around new "change" methods.
Implement fall back function for payable
Explicty set access modifiers
Change some methods to use safe math (must have been missed)
# Comments
Safe math now added
Good use of modifiers
Does gas price need to be public? [282]

Keybase proof

I hereby claim:

  • I am bitcoinbrisbane on github.
  • I am bitcoinbrisbane (https://keybase.io/bitcoinbrisbane) on keybase.
  • I have a public key whose fingerprint is 089A 0A71 3B01 C158 F396 4E05 8816 DF2B 5410 409C

To claim this, I am signing this object: