Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { Drizzle } from "drizzle";
import HelloWorld from "./contracts/HelloWorld.json";
const options = {
@Chanutg
Chanutg / HelloWorld.sol
Created April 12, 2019 12:10
HelloWorld
pragma solidity ^0.5.0;
contract HelloWorld {
string public sentence;
string public userName;
constructor() public {
sentence = "HelloWorld !";
userName = "Guillaume";
}
@Chanutg
Chanutg / concat
Created April 12, 2019 10:41
Concat
function concat(string memory _base, string memory _value) internal pure returns (string memory) {
bytes memory _baseBytes = bytes(_base);
bytes memory _valueBytes = bytes(_value);
string memory _tmpValue = new string(_baseBytes.length + _valueBytes.length);
bytes memory _newValue = bytes(_tmpValue);
uint i;
uint j;
const Migrations = artifacts.require("Migrations");
const HelloWorld = artifacts.require("HelloWorld");
module.exports = function(deployer) {
deployer.deploy(Migrations);
deployer.deploy(HelloWorld);
};
pragma solidity ^0.5.0;
contract HelloWorld {
string public sentence;
constructor() public {
sentence = "HelloWorld !";
}