Skip to content

Instantly share code, notes, and snippets.

View code-brewer's full-sized avatar

wangyouhua code-brewer

View GitHub Profile
@code-brewer
code-brewer / ByteStringOp.sol
Created October 12, 2018 09:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 12, 2018 09:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 12, 2018 14:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 13, 2018 13:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 14:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 15:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 16:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 16:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 15, 2018 00:51
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created January 3, 2019 11:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //