// SPDX-License-Identifier: BSD-3-Clause
/**
*
* ##### / ####### /
* ###### / # / ### #/
* /# / / ### / ## ##
* / / / # ## # ##
* / / ### ##
* ## ## ### /### ### /### /### ## ### ## /## /### ### /### /##
* ## ## ### / ### / ###/ #### / / #### / ### ### ## / ### / ### / ###/ #### / / ###
* ## ## ## / ###/ ## ###/ ## ###/ ### ### ##/ ### / ###/ ## ###/ / ###
* ## ## ## ## ## ## ## k #### ### /## ## ## ## ## ## ## ###
* ## ## ## ## ## ## ## a ### #/ /## ## ## ## ## ## ########
* # ## ## ## ## ## ## i ### #/ ## ## ## ## ## ## #######
* / ## ## ## ## ## z ### # / ## ## ## ## ## ##
* /##/ / ## ## ## ## ## e /### ## /## / ## ## ## /# ## #### /
* / ############/ ### / ###### ### ### n / #### / / ########/ ## ## ####/ ## ### ######/
* / ######### ##/ #### ### ### - ###/ / ##### ## ## ### ## ### #####
* # w | /
* ## e \) /
* b /
* /
*
*
* Lion's Share is the very first true follow-me matrix smart contract ever created.
* Now you can build an organization and earn on up to 15 levels.
* https://www.lionsshare.io
* Get your share, join today!
*/
pragma solidity ^0.6.8;
import './DataStorage.sol';
contract Access is DataStorage {
uint internal constant ENTRY_ENABLED = 1;
uint internal constant ENTRY_DISABLED = 2;
uint internal reentryStatus;
modifier isOwner(address _account) {
require(owner == _account, "Restricted Access!");
_;
}
modifier isMember(address _addr) {
require(members[_addr].id > 0, "Register Account First!");
_;
}
modifier blockReEntry() {
require(reentryStatus != ENTRY_DISABLED, "Security Block");
reentryStatus = ENTRY_DISABLED;
_;
reentryStatus = ENTRY_ENABLED;
}
}
// SPDX-License-Identifier: BSD-3-Clause
/**
*
* ##### / ####### /
* ###### / # / ### #/
* /# / / ### / ## ##
* / / / # ## # ##
* / / ### ##
* ## ## ### /### ### /### /### ## ### ## /## /### ### /### /##
* ## ## ### / ### / ###/ #### / / #### / ### ### ## / ### / ### / ###/ #### / / ###
* ## ## ## / ###/ ## ###/ ## ###/ ### ### ##/ ### / ###/ ## ###/ / ###
* ## ## ## ## ## ## ## k #### ### /## ## ## ## ## ## ## ###
* ## ## ## ## ## ## ## a ### #/ /## ## ## ## ## ## ########
* # ## ## ## ## ## ## i ### #/ ## ## ## ## ## ## #######
* / ## ## ## ## ## z ### # / ## ## ## ## ## ##
* /##/ / ## ## ## ## ## e /### ## /## / ## ## ## /# ## #### /
* / ############/ ### / ###### ### ### n / #### / / ########/ ## ## ####/ ## ### ######/
* / ######### ##/ #### ### ### - ###/ / ##### ## ## ### ## ### #####
* # w | /
* ## e \) /
* b /
* /
*
*
* Lion's Share is the very first true follow-me matrix smart contract ever created.
* Now you can build an organization and earn on up to 15 levels.
* https://www.lionsshare.io
* Get your share, join today!
*/
pragma solidity ^0.6.8;
import './LionShareABI.sol';
contract DataStorage {
LionShareABI internal ls_handle;
struct Account {
uint id;
uint activeLevel;
address sponsor;
mapping(uint => Position) Positions;
}
struct Position {
uint depth;
address sponsor;
}
struct Level {
uint cost;
uint[] commission;
uint fee;
}
mapping(address => Account) public members;
mapping(uint => address) public idToMember;
mapping(uint => Level) public levelCost;
uint public orderId;
uint public topLevel;
bool public contractEnabled;
address internal owner;
address internal feeSystem;
address internal proxied;
}
// SPDX-License-Identifier: BSD-3-Clause
/**
*
* ##### / ####### /
* ###### / # / ### #/
* /# / / ### / ## ##
* / / / # ## # ##
* / / ### ##
* ## ## ### /### ### /### /### ## ### ## /## /### ### /### /##
* ## ## ### / ### / ###/ #### / / #### / ### ### ## / ### / ### / ###/ #### / / ###
* ## ## ## / ###/ ## ###/ ## ###/ ### ### ##/ ### / ###/ ## ###/ / ###
* ## ## ## ## ## ## ## k #### ### /## ## ## ## ## ## ## ###
* ## ## ## ## ## ## ## a ### #/ /## ## ## ## ## ## ########
* # ## ## ## ## ## ## i ### #/ ## ## ## ## ## ## #######
* / ## ## ## ## ## z ### # / ## ## ## ## ## ##
* /##/ / ## ## ## ## ## e /### ## /## / ## ## ## /# ## #### /
* / ############/ ### / ###### ### ### n / #### / / ########/ ## ## ####/ ## ### ######/
* / ######### ##/ #### ### ### - ###/ / ##### ## ## ### ## ### #####
* # w | /
* ## e \) /
* b /
* /
*
*
* Lion's Share is the very first true follow-me matrix smart contract ever created.
* Now you can build an organization and earn on up to 15 levels.
* https://www.lionsshare.io
* Get your share, join today!
*/
pragma solidity ^0.6.8;
contract Events {
event Registration(address member, uint memberId, address sponsor, uint orderId);
event Upgrade(address member, address sponsor, uint level, uint orderId);
event Placement(address member, address sponsor, uint level, uint depth, uint orderId);
event FundsPayout(address indexed member, address payoutFrom, uint level, uint tier, uint orderId);
event FundsPassup(address indexed member, address passupFrom, uint level, uint orderId);
}
// SPDX-License-Identifier: BSD-3-Clause
/**
*
* ##### / ####### /
* ###### / # / ### #/
* /# / / ### / ## ##
* / / / # ## # ##
* / / ### ##
* ## ## ### /### ### /### /### ## ### ## /## /### ### /### /##
* ## ## ### / ### / ###/ #### / / #### / ### ### ## / ### / ### / ###/ #### / / ###
* ## ## ## / ###/ ## ###/ ## ###/ ### ### ##/ ### / ###/ ## ###/ / ###
* ## ## ## ## ## ## ## k #### ### /## ## ## ## ## ## ## ###
* ## ## ## ## ## ## ## a ### #/ /## ## ## ## ## ## ########
* # ## ## ## ## ## ## i ### #/ ## ## ## ## ## ## #######
* / ## ## ## ## ## z ### # / ## ## ## ## ## ##
* /##/ / ## ## ## ## ## e /### ## /## / ## ## ## /# ## #### /
* / ############/ ### / ###### ### ### n / #### / / ########/ ## ## ####/ ## ### ######/
* / ######### ##/ #### ### ### - ###/ / ##### ## ## ### ## ### #####
* # w | /
* ## e \) /
* b /
* /
*
*
* Lion's Share is the very first true follow-me matrix smart contract ever created.
* Now you can build an organization and earn on up to 15 levels.
* https://www.lionsshare.io
* Get your share, join today!
*/
pragma solidity ^0.6.8;
abstract contract LionShareABI {
function members(address) external virtual returns (uint, address);
}
// SPDX-License-Identifier: BSD-3-Clause
/**
*
* ##### / ####### /
* ###### / # / ### #/
* /# / / ### / ## ##
* / / / # ## # ##
* / / ### ##
* ## ## ### /### ### /### /### ## ### ## /## /### ### /### /##
* ## ## ### / ### / ###/ #### / / #### / ### ### ## / ### / ### / ###/ #### / / ###
* ## ## ## / ###/ ## ###/ ## ###/ ### ### ##/ ### / ###/ ## ###/ / ###
* ## ## ## ## ## ## ## k #### ### /## ## ## ## ## ## ## ###
* ## ## ## ## ## ## ## a ### #/ /## ## ## ## ## ## ########
* # ## ## ## ## ## ## i ### #/ ## ## ## ## ## ## #######
* / ## ## ## ## ## z ### # / ## ## ## ## ## ##
* /##/ / ## ## ## ## ## e /### ## /## / ## ## ## /# ## #### /
* / ############/ ### / ###### ### ### n / #### / / ########/ ## ## ####/ ## ### ######/
* / ######### ##/ #### ### ### - ###/ / ##### ## ## ### ## ### #####
* # w | /
* ## e \) /
* b /
* /
*
*
* Lion's Share is the very first true follow-me matrix smart contract ever created.
* Now you can build an organization and earn on up to 15 levels.
* https://www.lionsshare.io
* Get your share, join today!
*/
pragma solidity ^0.6.8;
import './DataStorage.sol';
import './Access.sol';
import './Events.sol';
contract Proxy is DataStorage, Access, Events {
constructor(address _proxied) public {
owner = msg.sender;
proxied = _proxied;
reentryStatus = ENTRY_ENABLED;
contractEnabled = false;
}
fallback() external payable {
address proxy = proxied;
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), proxy, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
receive() external payable {
address proxy = proxied;
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), proxy, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
function setProxy(address _addr) external isOwner(msg.sender) {
proxied = _addr;
}
}
{
"compilationTarget": {
"Proxy.sol": "Proxy"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_proxied","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"address","name":"passupFrom","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"FundsPassup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"address","name":"payoutFrom","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"FundsPayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"address","name":"sponsor","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"Placement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"uint256","name":"memberId","type":"uint256"},{"indexed":false,"internalType":"address","name":"sponsor","type":"address"},{"indexed":false,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"Registration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"address","name":"sponsor","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"Upgrade","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"contractEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelCost","outputs":[{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"members","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"activeLevel","type":"uint256"},{"internalType":"address","name":"sponsor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"orderId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"topLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]