Skip to content

Instantly share code, notes, and snippets.

@ashgansh
Created March 14, 2018 15:48
Show Gist options
  • Save ashgansh/bc0313f35054fcc5c17dc46a222c1f66 to your computer and use it in GitHub Desktop.
Save ashgansh/bc0313f35054fcc5c17dc46a222c1f66 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.17;
contract AssetFactory {
event NewAsset(string name);
struct Asset {
string name;
}
string public asset;
function AssetFactory() public {
createAsset("initial asset");
}
function createAsset(string _name) public {
asset = _name;
NewAsset("New Asset");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment