Skip to content

Instantly share code, notes, and snippets.

Avatar

Dennison Bertram crazyrabbitLTC

View GitHub Profile
@crazyrabbitLTC
crazyrabbitLTC / SolidityLinkedList.sol
Created Nov 28, 2018
SolidityLinkedListv.02 - improved
View SolidityLinkedList.sol
pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
contract LinkedList is Initializable {
event AddEntry(bytes32 head, string data, bytes32 next);
//Struct will be our Node
struct Node {
View LinkedList.sol
pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
contract LinkedList is Initializable {
event AddEntry(bytes32 head, string data, bytes32 next);
//Struct will be our Node
struct Node {
@crazyrabbitLTC
crazyrabbitLTC / linkedlist.sol
Created Dec 5, 2018
ZeppelinOS - LinkedList Tutorial code
View linkedlist.sol
pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
contract LinkedList is Initializable {
event AddEntry(bytes32 head, string data, bytes32 next);
//Struct will be our Node
struct Node {
@crazyrabbitLTC
crazyrabbitLTC / QuickContract.sol
Created Dec 5, 2018
A contract to demonstrate linking to our Linked List Contract
View QuickContract.sol
pragma solidity ^0.4.24;
import "dennison-linkedlist/contracts/LinkedList.sol";
contract QuickContract {
LinkedList private _linkedlist;
function setLinkedList(LinkedList linkedlist) external {
require(linkedlist != address(0), "You must provide a non-0x0 address");
@crazyrabbitLTC
crazyrabbitLTC / StringToLower.sol
Created Jan 16, 2019 — forked from ottodevs/StringToLower.sol
Ethereum/Solidity toLower() equivalent, to transform strings to lowercase
View StringToLower.sol
pragma solidity ^0.4.11;
contract StringToLower {
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
@crazyrabbitLTC
crazyrabbitLTC / LinkedList.sol
Created Jan 17, 2019
LinkedList upgraded to Solidity v5
View LinkedList.sol
pragma solidity ^0.5.0;
import "zos-lib/contracts/Initializable.sol";
contract LinkedList is Initializable{
event AddEntry(bytes32 head, string data, bytes32 next);
//Struct will be our Node
struct Node {
View LinkedList.sol
pragma solidity ^0.5.0;
//import "zos-lib/contracts/Initializable.sol";
//contract LinkedList is Initializable{
contract LinkedList {
event EntryAdded(bytes32 head, string data, bytes32 next);
//Struct will be our Node
@crazyrabbitLTC
crazyrabbitLTC / LinkedList.sol
Last active Jan 18, 2019
LinkedList educational EVM package in Solidity v5.
View LinkedList.sol
pragma solidity >=0.4.24 <0.6.0;
import "zos-lib/contracts/Initializable.sol";
contract LinkedList is Initializable{
event EntryAdded(bytes32 head, string data, bytes32 next);
//Struct will be our Node
struct Node {
@crazyrabbitLTC
crazyrabbitLTC / QuickContract.sol
Created Jan 22, 2019
QuickContract.sol - ZeppelinOS Tutorial Demo Contract
View QuickContract.sol
pragma solidity >=0.4.24 <0.6.0;
import "zos-linkedlist/contracts/LinkedList.sol";
//The NPM package name will have it's own folder under modules
contract QuickContract {
LinkedList private _linkedlist;
function setLinkedList(LinkedList linkedlist) external {
_linkedlist = linkedlist;
}
@crazyrabbitLTC
crazyrabbitLTC / LowerCase.sol
Created Jan 28, 2019
LowerCase EVM Package
View LowerCase.sol
//Original Code:
//https://gist.github.com/ottodevs/c43d0a8b4b891ac2da675f825b1d1dbf
//Credit: ottodevs
//EVM Package: Dennison Bertram, dennison@dennisonbertram.com
pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
contract LowerCase is Initializable{