Skip to content

Instantly share code, notes, and snippets.

View Juan-cc's full-sized avatar
🌍
Buidling dApps...

Juan C Juan-cc

🌍
Buidling dApps...
View GitHub Profile
@Juan-cc
Juan-cc / BC.sol
Created December 17, 2018 06:55
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.24;
import "./Owned.sol";
import "./KMToken.sol";
contract BC is Owned {
mapping (address => bool) public admins;
string public name;
string public phone;
string public url;
@Juan-cc
Juan-cc / BC.sol
Created December 17, 2018 07:11
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.24;
import "./Owned.sol";
import "./KMToken.sol";
contract BC is Owned {
mapping (address => bool) public admins;
string public name;
string public phone;
string public url;
@Juan-cc
Juan-cc / BC.sol
Created December 20, 2018 01:36
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.24;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
contract BCFactory is Owned {
/* Copy of KMP shared storage to allow DELEGATECALL*/
uint8 constant MAX_OWNER_COMPANIES = 5; //1 owner could register up to 5 companies.
mapping (address => address[MAX_OWNER_COMPANIES]) private companies; // (owner => companies[5])
@Juan-cc
Juan-cc / DelegateCallandEvents.sol
Created December 20, 2018 03:22
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.21;
contract A{
string v1;
string v2;
string v3;
event AEvent(string val1, string val2, string val3);
event AMSGSender(address msgSender);
@Juan-cc
Juan-cc / BC.sol
Last active December 20, 2018 05:22
USING 5.1.0 - 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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
contract BCFactory is Owned {
/* Copy of KMP shared storage to allow DELEGATECALL*/
uint8 constant MAX_OWNER_COMPANIES = 5; // 1 owner could register up to 5 companies.
uint8 constant MAX_COMPANY_TOKENS = 10; // 1 company could register up to 10 tokens.
@Juan-cc
Juan-cc / BC.sol
Last active December 20, 2018 06:49
Using 5.1.0 and decoding returnedData - 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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
contract BCFactory is Owned {
/* Copy of KMP shared storage to allow DELEGATECALL*/
uint8 constant MAX_OWNER_COMPANIES = 5; // 1 owner could register up to 5 companies.
uint8 constant MAX_COMPANY_TOKENS = 10; // 1 company could register up to 10 tokens.
@Juan-cc
Juan-cc / BC.sol
Created December 20, 2018 23:34
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
import "./Storage.sol";
contract BCFactory is Owned, Storage {
@Juan-cc
Juan-cc / BC.sol
Created December 21, 2018 23:26
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
import "./Storage.sol";
contract BCFactory is Owned, Storage {
@Juan-cc
Juan-cc / BC.sol
Created December 22, 2018 01: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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
import "./Storage.sol";
contract BCFactory is Owned, Storage {
@Juan-cc
Juan-cc / BC.sol
Created December 22, 2018 02:15
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
import "./Owned.sol";
import "./KMToken.sol";
import "./TokenFactory.sol";
import "./Storage.sol";
contract BCFactory is Owned, Storage {