Skip to content

Instantly share code, notes, and snippets.

@jpn0424
jpn0424 / BytesToTypes.sol
Created June 4, 2019 00:25
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.0+commit.1d4f565a.js&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* @title BytesToTypes
* @dev The BytesToTypes contract converts the memory byte arrays to the standard solidity types
* @author [email protected]
*/
contract BytesToTypes {
@jpn0424
jpn0424 / BytesToTypes.sol
Created May 31, 2019 06:03
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.0+commit.1d4f565a.js&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* @title BytesToTypes
* @dev The BytesToTypes contract converts the memory byte arrays to the standard solidity types
* @author [email protected]
*/
contract BytesToTypes {
@jpn0424
jpn0424 / BytesToTypes.sol
Last active May 19, 2019 08:05
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.0+commit.1d4f565a.js&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* @title BytesToTypes
* @dev The BytesToTypes contract converts the memory byte arrays to the standard solidity types
* @author [email protected]
*/
contract BytesToTypes {
@jpn0424
jpn0424 / 【智能合約】範例合約.sol
Created May 1, 2019 15:09
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.18;
contract Fbethorder {
event ActivityInfor(string location, string Abstract);
uint256 constant public ticketFee = 5 ether; // 票價 + 押金
uint256 constant public deposit = 2 ether; // 壓金
mapping (address => uint256) public ticketNumberMap;
@jpn0424
jpn0424 / self-signed-certificate-with-custom-ca.md
Created January 25, 2019 09:15 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@jpn0424
jpn0424 / templateDesign.sol
Last active November 7, 2018 03:42
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.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.24;
contract ManagePermission {
address private _admin;
constructor() public {
_admin = msg.sender;
}
@jpn0424
jpn0424 / templateDesign.sol
Created October 31, 2018 08:24
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.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.24;
/* Template */
contract TemplateTest {
/* Permission */
/* status */
bool contracEff;
@jpn0424
jpn0424 / templateDesign.sol
Last active November 1, 2018 09: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.4.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.24;
contract TemplateTest {
}
/* Main content */
@jpn0424
jpn0424 / CreateContract.sol
Last active May 8, 2019 05:35
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.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.24;
contract ManagePermission {
address private _admin;
constructor() public {
_admin = msg.sender;
}
@jpn0424
jpn0424 / CreateContract.sol
Created September 11, 2018 09:40
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.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.24;
contract Factory {
address[] newContracts;
function createContract (bytes32 name) public {
address newContract = new Contract(name);
newContracts.push(newContract);
}
}