Skip to content

Instantly share code, notes, and snippets.

View yakkomajuri's full-sized avatar

Yakko Majuri yakkomajuri

View GitHub Profile
@yakkomajuri
yakkomajuri / helloworld.sol
Last active August 5, 2018 19:30
Hello World Contract
pragma solidity ^0.4.24;
contract Hello {
address owner;
constructor () public {
owner = msg.sender;
}
function HelloWorld () public view returns (string) {
<!DOCTYPE html>
<html lang="en">
<head>
<title>HODL dApp</title>
<style>
body {
background-color:rgb(218, 201, 154);
<label for="definirsenha" class="col-lg-2 control-label">Senha:</label>
<input id="defsenha" type="text">
<button id="button3">Escolha uma senha</button>
<!DOCTYPE html>
<html lang="en">
<head>
<title>HODL dApp</title>
<style>
body {
pragma solidity ^0.4.21;
contract VaccineRegistration {
address owner;
address secondary;
address tertiary;
constructor(address _secondary, address _tertiary) public {
owner = msg.sender;
pragma solidity^0.5.0;
contract Registry {
function getImplementation(address _user) public view returns (address) {}
}
contract ProxyStorage {
Registry registryAddress;
pragma solidity^0.5.0;
contract Registry {
address owner;
constructor() public {
owner = msg.sender;
}
contract Proxy {
modifier onlyOwner() {
address owner;
assembly {
owner := sload(0xfffffffffffffffffffffffffffffffffffffffe)
}
require(msg.sender == owner);
_;
}
pragma solidity^0.5.0;
contract CertificateReg {
struct Certificate {
string name;
string course;
string date;
string instructor;
}
pragma solidity ^0.5.0;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;