More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 56 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Reclaim Contribu... | 11874899 | 1393 days ago | IN | 0 ETH | 0.01096225 | ||||
Reclaim Contribu... | 10697119 | 1574 days ago | IN | 0 ETH | 0.00823564 | ||||
Reclaim Local No... | 10530279 | 1600 days ago | IN | 0 ETH | 0.00295001 | ||||
Reclaim Ethic Hu... | 10530244 | 1600 days ago | IN | 0 ETH | 0.00471304 | ||||
Reclaim Contribu... | 10253829 | 1642 days ago | IN | 0 ETH | 0.00242856 | ||||
Reclaim Contribu... | 10233646 | 1646 days ago | IN | 0 ETH | 0.00416124 | ||||
Change Investor ... | 10231609 | 1646 days ago | IN | 0 ETH | 0.00154461 | ||||
Reclaim Contribu... | 10153738 | 1658 days ago | IN | 0 ETH | 0.00350854 | ||||
Reclaim Contribu... | 10118540 | 1663 days ago | IN | 0 ETH | 0.00209163 | ||||
Reclaim Contribu... | 10111097 | 1665 days ago | IN | 0 ETH | 0.00344107 | ||||
Reclaim Contribu... | 10110887 | 1665 days ago | IN | 0 ETH | 0.00344107 | ||||
Reclaim Contribu... | 10110883 | 1665 days ago | IN | 0 ETH | 0.00344107 | ||||
Reclaim Contribu... | 10110804 | 1665 days ago | IN | 0 ETH | 0.00344046 | ||||
Reclaim Contribu... | 10110795 | 1665 days ago | IN | 0 ETH | 0.00344107 | ||||
Reclaim Contribu... | 10110427 | 1665 days ago | IN | 0 ETH | 0.00398014 | ||||
Reclaim Contribu... | 10110389 | 1665 days ago | IN | 0 ETH | 0.00438568 | ||||
Reclaim Contribu... | 10110124 | 1665 days ago | IN | 0 ETH | 0.00570813 | ||||
Reclaim Contribu... | 10109965 | 1665 days ago | IN | 0 ETH | 0.00220954 | ||||
Reclaim Contribu... | 10109962 | 1665 days ago | IN | 0 ETH | 0.00607248 | ||||
Reclaim Contribu... | 10109962 | 1665 days ago | IN | 0 ETH | 0.00607248 | ||||
Reclaim Contribu... | 10109893 | 1665 days ago | IN | 0 ETH | 0.0055327 | ||||
Reclaim Contribu... | 10109738 | 1665 days ago | IN | 0 ETH | 0.00610292 | ||||
Transfer | 10109686 | 1665 days ago | IN | 35.26 ETH | 0.007216 | ||||
Set Borrower Ret... | 10109512 | 1665 days ago | IN | 0 ETH | 0.00138499 | ||||
Finish Initial E... | 7542117 | 2072 days ago | IN | 0 ETH | 0.000216 |
Latest 23 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11874899 | 1393 days ago | 0.51441074 ETH | ||||
10697119 | 1574 days ago | 1.22215303 ETH | ||||
10530279 | 1600 days ago | 1.13835916 ETH | ||||
10530244 | 1600 days ago | 0.85376937 ETH | ||||
10253829 | 1642 days ago | 0.16443043 ETH | ||||
10233646 | 1646 days ago | 0.68345509 ETH | ||||
10153738 | 1658 days ago | 0.82215216 ETH | ||||
10118540 | 1663 days ago | 0.7385213 ETH | ||||
10111097 | 1665 days ago | 1.72651955 ETH | ||||
10110887 | 1665 days ago | 0.60017108 ETH | ||||
10110883 | 1665 days ago | 5.07009977 ETH | ||||
10110804 | 1665 days ago | 0.61661412 ETH | ||||
10110795 | 1665 days ago | 5.75317421 ETH | ||||
10110427 | 1665 days ago | 0.82215216 ETH | ||||
10110389 | 1665 days ago | 4.30366815 ETH | ||||
10110124 | 1665 days ago | 4.43795602 ETH | ||||
10109962 | 1665 days ago | 0.39463304 ETH | ||||
10109962 | 1665 days ago | 0.700227 ETH | ||||
10109893 | 1665 days ago | 3.29581318 ETH | ||||
10109738 | 1665 days ago | 0.82215216 ETH | ||||
10109686 | 1665 days ago | 0.00217072 ETH | ||||
7508842 | 2077 days ago | 40.46173212 ETH | ||||
7508756 | 2077 days ago | 0.34702187 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xeFeaC98F...F55830e07 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
EthicHubLending
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-01-28 */ pragma solidity ^0.4.13; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract EthicHubBase { uint8 public version; EthicHubStorageInterface public ethicHubStorage = EthicHubStorageInterface(0); constructor(address _storageAddress) public { require(_storageAddress != address(0)); ethicHubStorage = EthicHubStorageInterface(_storageAddress); } } contract EthicHubStorageInterface { //modifier for access in sets and deletes modifier onlyEthicHubContracts() {_;} // Setters function setAddress(bytes32 _key, address _value) external; function setUint(bytes32 _key, uint _value) external; function setString(bytes32 _key, string _value) external; function setBytes(bytes32 _key, bytes _value) external; function setBool(bytes32 _key, bool _value) external; function setInt(bytes32 _key, int _value) external; // Deleters function deleteAddress(bytes32 _key) external; function deleteUint(bytes32 _key) external; function deleteString(bytes32 _key) external; function deleteBytes(bytes32 _key) external; function deleteBool(bytes32 _key) external; function deleteInt(bytes32 _key) external; // Getters function getAddress(bytes32 _key) external view returns (address); function getUint(bytes32 _key) external view returns (uint); function getString(bytes32 _key) external view returns (string); function getBytes(bytes32 _key) external view returns (bytes); function getBool(bytes32 _key) external view returns (bool); function getInt(bytes32 _key) external view returns (int); } contract EthicHubReputationInterface { modifier onlyUsersContract(){_;} modifier onlyLendingContract(){_;} function burnReputation(uint delayDays) external; function incrementReputation(uint completedProjectsByTier) external; function initLocalNodeReputation(address localNode) external; function initCommunityReputation(address community) external; function getCommunityReputation(address target) public view returns(uint256); function getLocalNodeReputation(address target) public view returns(uint256); } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract EthicHubLending is EthicHubBase, Ownable, Pausable { using SafeMath for uint256; //uint256 public minContribAmount = 0.1 ether; // 0.1 ether enum LendingState { Uninitialized, AcceptingContributions, ExchangingToFiat, AwaitingReturn, ProjectNotFunded, ContributionReturned, Default } mapping(address => Investor) public investors; uint256 public investorCount; uint256 public reclaimedContributions; uint256 public reclaimedSurpluses; uint256 public fundingStartTime; // Start time of contribution period in UNIX time uint256 public fundingEndTime; // End time of contribution period in UNIX time uint256 public totalContributed; bool public capReached; LendingState public state; uint256 public annualInterest; uint256 public totalLendingAmount; uint256 public lendingDays; uint256 public borrowerReturnDays; uint256 public initialEthPerFiatRate; uint256 public totalLendingFiatAmount; address public borrower; address public localNode; address public ethicHubTeam; uint256 public borrowerReturnDate; uint256 public borrowerReturnEthPerFiatRate; uint256 public ethichubFee; uint256 public localNodeFee; uint256 public tier; // interest rate is using base uint 100 and 100% 10000, this means 1% is 100 // this guarantee we can have a 2 decimal presicion in our calculation uint256 public constant interestBaseUint = 100; uint256 public constant interestBasePercent = 10000; bool public localNodeFeeReclaimed; bool public ethicHubTeamFeeReclaimed; uint256 public surplusEth; uint256 public returnedEth; struct Investor { uint256 amount; bool isCompensated; bool surplusEthReclaimed; } // events event onCapReached(uint endTime); event onContribution(uint totalContributed, address indexed investor, uint amount, uint investorsCount); event onCompensated(address indexed contributor, uint amount); event onSurplusSent(uint256 amount); event onSurplusReclaimed(address indexed contributor, uint amount); event StateChange(uint state); event onInitalRateSet(uint rate); event onReturnRateSet(uint rate); event onReturnAmount(address indexed borrower, uint amount); event onBorrowerChanged(address indexed newBorrower); event onInvestorChanged(address indexed oldInvestor, address indexed newInvestor); // modifiers modifier checkProfileRegistered(string profile) { bool isRegistered = ethicHubStorage.getBool(keccak256(abi.encodePacked("user", profile, msg.sender))); require(isRegistered, "Sender not registered in EthicHub.com"); _; } modifier checkIfArbiter() { address arbiter = ethicHubStorage.getAddress(keccak256(abi.encodePacked("arbiter", this))); require(arbiter == msg.sender, "Sender not authorized"); _; } modifier onlyOwnerOrLocalNode() { require(localNode == msg.sender || owner == msg.sender,"Sender not authorized"); _; } modifier onlyInvestorOrPaymentGateway() { bool isInvestor = ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "investor", msg.sender))); bool isPaymentGateway = ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "paymentGateway", msg.sender))); require(isPaymentGateway || isInvestor, "Sender not authorized"); _; } constructor( uint256 _fundingStartTime, uint256 _fundingEndTime, address _borrower, uint256 _annualInterest, uint256 _totalLendingAmount, uint256 _lendingDays, address _storageAddress, address _localNode, address _ethicHubTeam, uint256 _ethichubFee, uint256 _localNodeFee ) EthicHubBase(_storageAddress) public { require(_fundingEndTime > fundingStartTime, "fundingEndTime should be later than fundingStartTime"); require(_borrower != address(0), "No borrower set"); require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "representative", _borrower))), "Borrower not registered representative"); require(_localNode != address(0), "No Local Node set"); require(_ethicHubTeam != address(0), "No EthicHub Team set"); require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "localNode", _localNode))), "Local Node is not registered"); require(_totalLendingAmount > 0, "_totalLendingAmount must be > 0"); require(_lendingDays > 0, "_lendingDays must be > 0"); require(_annualInterest > 0 && _annualInterest < 100, "_annualInterest must be between 0 and 100"); version = 6; reclaimedContributions = 0; reclaimedSurpluses = 0; borrowerReturnDays = 0; fundingStartTime = _fundingStartTime; fundingEndTime = _fundingEndTime; localNode = _localNode; ethicHubTeam = _ethicHubTeam; borrower = _borrower; annualInterest = _annualInterest; totalLendingAmount = _totalLendingAmount; lendingDays = _lendingDays; ethichubFee = _ethichubFee; localNodeFee = _localNodeFee; state = LendingState.Uninitialized; } function saveInitialParametersToStorage(uint256 _maxDelayDays, uint256 _tier, uint256 _communityMembers, address _community) external onlyOwnerOrLocalNode { require(_maxDelayDays != 0, "_maxDelayDays must be > 0"); require(state == LendingState.Uninitialized, "State must be Uninitialized"); require(_tier > 0, "_tier must be > 0"); require(_communityMembers > 0, "_communityMembers must be > 0"); require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "community", _community))), "Community is not registered"); ethicHubStorage.setUint(keccak256(abi.encodePacked("lending.maxDelayDays", this)), _maxDelayDays); ethicHubStorage.setAddress(keccak256(abi.encodePacked("lending.community", this)), _community); ethicHubStorage.setAddress(keccak256(abi.encodePacked("lending.localNode", this)), localNode); ethicHubStorage.setUint(keccak256(abi.encodePacked("lending.tier", this)), _tier); ethicHubStorage.setUint(keccak256(abi.encodePacked("lending.communityMembers", this)), _communityMembers); tier = _tier; state = LendingState.AcceptingContributions; emit StateChange(uint(state)); } function setBorrower(address _borrower) external checkIfArbiter { require(_borrower != address(0), "No borrower set"); require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "representative", _borrower))), "Borrower not registered representative"); borrower = _borrower; emit onBorrowerChanged(borrower); } function changeInvestorAddress(address oldInvestor, address newInvestor) external checkIfArbiter { require(newInvestor != address(0)); require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "investor", newInvestor)))); //oldInvestor should have invested in this project require(investors[oldInvestor].amount != 0); //newInvestor should not have invested anything in this project to not complicate return calculation require(investors[newInvestor].amount == 0); investors[newInvestor].amount = investors[oldInvestor].amount; investors[newInvestor].isCompensated = investors[oldInvestor].isCompensated; investors[newInvestor].surplusEthReclaimed = investors[oldInvestor].surplusEthReclaimed; delete investors[oldInvestor]; emit onInvestorChanged(oldInvestor, newInvestor); } function() public payable whenNotPaused { require(state == LendingState.AwaitingReturn || state == LendingState.AcceptingContributions || state == LendingState.ExchangingToFiat, "Can't receive ETH in this state"); if(state == LendingState.AwaitingReturn) { returnBorrowedEth(); } else if (state == LendingState.ExchangingToFiat) { // borrower can send surplus eth back to contract to avoid paying interest sendBackSurplusEth(); } else { require(ethicHubStorage.getBool(keccak256(abi.encodePacked("user", "investor", msg.sender))), "Sender is not registered lender"); contributeWithAddress(msg.sender); } } function sendBackSurplusEth() internal { require(state == LendingState.ExchangingToFiat); require(msg.sender == borrower); surplusEth = surplusEth.add(msg.value); require(surplusEth <= totalLendingAmount); emit onSurplusSent(msg.value); } /** * After the contribution period ends unsuccesfully, this method enables the contributor * to retrieve their contribution */ function declareProjectNotFunded() external onlyOwnerOrLocalNode { require(totalContributed < totalLendingAmount); require(state == LendingState.AcceptingContributions); require(now > fundingEndTime); state = LendingState.ProjectNotFunded; emit StateChange(uint(state)); } function declareProjectDefault() external onlyOwnerOrLocalNode { require(state == LendingState.AwaitingReturn); uint maxDelayDays = getMaxDelayDays(); require(getDelayDays(now) >= maxDelayDays); EthicHubReputationInterface reputation = EthicHubReputationInterface(ethicHubStorage.getAddress(keccak256(abi.encodePacked("contract.name", "reputation")))); require(reputation != address(0)); ethicHubStorage.setUint(keccak256(abi.encodePacked("lending.delayDays", this)), maxDelayDays); reputation.burnReputation(maxDelayDays); state = LendingState.Default; emit StateChange(uint(state)); } function setBorrowerReturnEthPerFiatRate(uint256 _borrowerReturnEthPerFiatRate) external onlyOwnerOrLocalNode { require(state == LendingState.AwaitingReturn, "State is not AwaitingReturn"); borrowerReturnEthPerFiatRate = _borrowerReturnEthPerFiatRate; emit onReturnRateSet(borrowerReturnEthPerFiatRate); } /** * Marks the initial exchange period as over (the ETH collected amount has been exchanged for local Fiat currency) * If there was surplus, the amount returned is substracted over the total amount collected * Sets the local currency to return, on the basis of which the interest will be calculated * @param _initialEthPerFiatRate the rate with 2 decimals. i.e. 444.22 is 44422 , 1245.00 is 124500 */ function finishInitialExchangingPeriod(uint256 _initialEthPerFiatRate) external onlyOwnerOrLocalNode { require(capReached == true, "Cap not reached"); require(state == LendingState.ExchangingToFiat, "State is not ExchangingToFiat"); initialEthPerFiatRate = _initialEthPerFiatRate; if (surplusEth > 0) { totalLendingAmount = totalLendingAmount.sub(surplusEth); } totalLendingFiatAmount = totalLendingAmount.mul(initialEthPerFiatRate); emit onInitalRateSet(initialEthPerFiatRate); state = LendingState.AwaitingReturn; emit StateChange(uint(state)); } /** * Method to reclaim contribution after project is declared default (% of partial funds) * @param beneficiary the contributor * */ function reclaimContributionDefault(address beneficiary) external { require(state == LendingState.Default); require(!investors[beneficiary].isCompensated); // contribution = contribution * partial_funds / total_funds uint256 contribution = checkInvestorReturns(beneficiary); require(contribution > 0); investors[beneficiary].isCompensated = true; reclaimedContributions = reclaimedContributions.add(1); doReclaim(beneficiary, contribution); } /** * Method to reclaim contribution after a project is declared as not funded * @param beneficiary the contributor * */ function reclaimContribution(address beneficiary) external { require(state == LendingState.ProjectNotFunded, "State is not ProjectNotFunded"); require(!investors[beneficiary].isCompensated, "Contribution already reclaimed"); uint256 contribution = investors[beneficiary].amount; require(contribution > 0, "Contribution is 0"); investors[beneficiary].isCompensated = true; reclaimedContributions = reclaimedContributions.add(1); doReclaim(beneficiary, contribution); } function reclaimSurplusEth(address beneficiary) external { require(surplusEth > 0, "No surplus ETH"); // only can be reclaimed after cap reduced require(state != LendingState.ExchangingToFiat, "State is ExchangingToFiat"); require(!investors[beneficiary].surplusEthReclaimed, "Surplus already reclaimed"); uint256 surplusContribution = investors[beneficiary].amount.mul(surplusEth).div(surplusEth.add(totalLendingAmount)); require(surplusContribution > 0, "Surplus is 0"); investors[beneficiary].surplusEthReclaimed = true; reclaimedSurpluses = reclaimedSurpluses.add(1); emit onSurplusReclaimed(beneficiary, surplusContribution); doReclaim(beneficiary, surplusContribution); } function reclaimContributionWithInterest(address beneficiary) external { require(state == LendingState.ContributionReturned, "State is not ContributionReturned"); require(!investors[beneficiary].isCompensated, "Lender already compensated"); uint256 contribution = checkInvestorReturns(beneficiary); require(contribution > 0, "Contribution is 0"); investors[beneficiary].isCompensated = true; reclaimedContributions = reclaimedContributions.add(1); doReclaim(beneficiary, contribution); } function reclaimLocalNodeFee() external { require(state == LendingState.ContributionReturned, "State is not ContributionReturned"); require(localNodeFeeReclaimed == false, "Local Node's fee already reclaimed"); uint256 fee = totalLendingFiatAmount.mul(localNodeFee).mul(interestBaseUint).div(interestBasePercent).div(borrowerReturnEthPerFiatRate); require(fee > 0, "Local Node's team fee is 0"); localNodeFeeReclaimed = true; doReclaim(localNode, fee); } function reclaimEthicHubTeamFee() external { require(state == LendingState.ContributionReturned, "State is not ContributionReturned"); require(ethicHubTeamFeeReclaimed == false, "EthicHub team's fee already reclaimed"); uint256 fee = totalLendingFiatAmount.mul(ethichubFee).mul(interestBaseUint).div(interestBasePercent).div(borrowerReturnEthPerFiatRate); require(fee > 0, "EthicHub's team fee is 0"); ethicHubTeamFeeReclaimed = true; doReclaim(ethicHubTeam, fee); } function reclaimLeftoverEth() external checkIfArbiter { require(state == LendingState.ContributionReturned || state == LendingState.Default, "State is not ContributionReturned or Default"); require(localNodeFeeReclaimed, "Local Node fee is not reclaimed"); require(ethicHubTeamFeeReclaimed, "Team fee is not reclaimed"); require(investorCount == reclaimedContributions, "Not all investors have reclaimed their share"); if(surplusEth > 0) { require(investorCount == reclaimedSurpluses, "Not all investors have reclaimed their surplus"); } doReclaim(ethicHubTeam, address(this).balance); } function doReclaim(address target, uint256 amount) internal { if ( address(this).balance < amount ) { target.transfer(address(this).balance); } else { target.transfer(amount); } } function returnBorrowedEth() internal { require(state == LendingState.AwaitingReturn, "State is not AwaitingReturn"); require(msg.sender == borrower, "Only the borrower can repay"); require(borrowerReturnEthPerFiatRate > 0, "Second exchange rate not set"); bool projectRepayed = false; uint excessRepayment = 0; uint newReturnedEth = 0; emit onReturnAmount(msg.sender, msg.value); (newReturnedEth, projectRepayed, excessRepayment) = calculatePaymentGoal(borrowerReturnAmount(), returnedEth, msg.value); returnedEth = newReturnedEth; if (projectRepayed == true) { borrowerReturnDays = getDaysPassedBetweenDates(fundingEndTime, now); state = LendingState.ContributionReturned; emit StateChange(uint(state)); updateReputation(); } if (excessRepayment > 0) { msg.sender.transfer(excessRepayment); } } // @notice make cotribution throught a paymentGateway // @param contributor Address function contributeForAddress(address contributor) external checkProfileRegistered('paymentGateway') payable whenNotPaused { contributeWithAddress(contributor); } // @notice Function to participate in contribution period // Amounts from the same address should be added up // If cap is reached, end time should be modified // Funds should be transferred into multisig wallet // @param contributor Address function contributeWithAddress(address contributor) internal whenNotPaused { require(state == LendingState.AcceptingContributions, "state is not AcceptingContributions"); require(isContribPeriodRunning(), "can't contribute outside contribution period"); uint oldTotalContributed = totalContributed; uint newTotalContributed = 0; uint excessContribValue = 0; (newTotalContributed, capReached, excessContribValue) = calculatePaymentGoal(totalLendingAmount, oldTotalContributed, msg.value); totalContributed = newTotalContributed; if (capReached) { fundingEndTime = now; emit onCapReached(fundingEndTime); } if (investors[contributor].amount == 0) { investorCount = investorCount.add(1); } if (excessContribValue > 0) { msg.sender.transfer(excessContribValue); investors[contributor].amount = investors[contributor].amount.add(msg.value).sub(excessContribValue); emit onContribution(newTotalContributed, contributor, msg.value.sub(excessContribValue), investorCount); } else { investors[contributor].amount = investors[contributor].amount.add(msg.value); emit onContribution(newTotalContributed, contributor, msg.value, investorCount); } } /** * Calculates if a target value is reached after increment, and by how much it was surpassed. * @param goal the target to achieve * @param oldTotal the total so far after the increment * @param contribValue the increment * @return (the incremented count, not bigger than max), (goal has been reached), (excess to return) */ function calculatePaymentGoal(uint goal, uint oldTotal, uint contribValue) internal pure returns(uint, bool, uint) { uint newTotal = oldTotal.add(contribValue); bool goalReached = false; uint excess = 0; if (newTotal >= goal && oldTotal < goal) { goalReached = true; excess = newTotal.sub(goal); contribValue = contribValue.sub(excess); newTotal = goal; } return (newTotal, goalReached, excess); } function sendFundsToBorrower() external onlyOwnerOrLocalNode { //Waiting for Exchange require(state == LendingState.AcceptingContributions); require(capReached); state = LendingState.ExchangingToFiat; emit StateChange(uint(state)); borrower.transfer(totalContributed); } function updateReputation() internal { EthicHubReputationInterface reputation = EthicHubReputationInterface( ethicHubStorage.getAddress(keccak256(abi.encodePacked("contract.name", "reputation"))) ); require(reputation != address(0)); uint delayDays = getDelayDays(now); if (delayDays > 0) { ethicHubStorage.setUint(keccak256(abi.encodePacked("lending.delayDays", this)), delayDays); reputation.burnReputation(delayDays); } else { uint completedProjectsByTier = ethicHubStorage.getUint(keccak256(abi.encodePacked("community.completedProjectsByTier", this, tier))).add(1); ethicHubStorage.setUint(keccak256(abi.encodePacked("community.completedProjectsByTier", this, tier)), completedProjectsByTier); reputation.incrementReputation(completedProjectsByTier); } } /** * Calculates days passed after defaulting * @param date timestamp to calculate days * @return day number */ function getDelayDays(uint date) public view returns(uint) { uint lendingDaysSeconds = lendingDays * 1 days; uint defaultTime = fundingEndTime.add(lendingDaysSeconds); if (date < defaultTime) { return 0; } else { return getDaysPassedBetweenDates(defaultTime, date); } } /** * Calculates days passed between two dates in seconds * @param firstDate timestamp * @param lastDate timestamp * @return days passed */ function getDaysPassedBetweenDates(uint firstDate, uint lastDate) public pure returns(uint) { require(firstDate <= lastDate, "lastDate must be bigger than firstDate"); return lastDate.sub(firstDate).div(60).div(60).div(24); } /** Returns lending days for interest calculations. Once payed, it will return fundingEndTime + days passed until proyect repayment /* @return days */ function getLendingDays() public view returns(uint) { if(borrowerReturnDays > 0) { return borrowerReturnDays; } else { return getDaysPassedBetweenDates(fundingEndTime, now); } } // lendingInterestRate with 2 decimal // 15 * (lending days)/ 365 + 4% local node fee + 3% LendingDev fee function lendingInterestRatePercentage() public view returns(uint256){ return annualInterest.mul(interestBaseUint) // current days .mul(getLendingDays()).div(365) .add(localNodeFee.mul(interestBaseUint)) .add(ethichubFee.mul(interestBaseUint)) .add(interestBasePercent); } // lendingInterestRate with 2 decimal function investorInterest() public view returns(uint256){ return annualInterest.mul(interestBaseUint).mul(getLendingDays()).div(365).add(interestBasePercent); } function borrowerReturnFiatAmount() public view returns(uint256) { return totalLendingFiatAmount.mul(lendingInterestRatePercentage()).div(interestBasePercent); } function borrowerReturnAmount() public view returns(uint256) { return borrowerReturnFiatAmount().div(borrowerReturnEthPerFiatRate); } function isContribPeriodRunning() public view returns(bool) { return fundingStartTime <= now && fundingEndTime > now && !capReached; } function checkInvestorContribution(address investor) public view returns(uint256){ return investors[investor].amount; } function checkInvestorReturns(address investor) public view returns(uint256) { uint256 investorAmount = 0; if (state == LendingState.ContributionReturned) { investorAmount = investors[investor].amount; if (surplusEth > 0){ investorAmount = investors[investor].amount.mul(totalLendingAmount).div(totalContributed); } return investorAmount.mul(initialEthPerFiatRate).mul(investorInterest()).div(borrowerReturnEthPerFiatRate).div(interestBasePercent); } else if (state == LendingState.Default){ investorAmount = investors[investor].amount; // contribution = contribution * partial_funds / total_funds return investorAmount.mul(returnedEth).div(totalLendingAmount); } else { return 0; } } function getMaxDelayDays() public view returns(uint256){ return ethicHubStorage.getUint(keccak256(abi.encodePacked("lending.maxDelayDays", this))); } function getUserContributionReclaimStatus(address userAddress) public view returns(bool isCompensated, bool surplusEthReclaimed){ isCompensated = investors[userAddress].isCompensated; surplusEthReclaimed = investors[userAddress].surplusEthReclaimed; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"totalContributed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"localNodeFeeReclaimed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"interestBasePercent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"localNode","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sendFundsToBorrower","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalLendingAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tier","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"reclaimSurplusEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"fundingStartTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowerReturnFiatAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethicHubTeam","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lendingInterestRatePercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMaxDelayDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"oldInvestor","type":"address"},{"name":"newInvestor","type":"address"}],"name":"changeInvestorAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"reclaimLeftoverEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"declareProjectDefault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initialEthPerFiatRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"capReached","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"date","type":"uint256"}],"name":"getDelayDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"reclaimContributionDefault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxDelayDays","type":"uint256"},{"name":"_tier","type":"uint256"},{"name":"_communityMembers","type":"uint256"},{"name":"_community","type":"address"}],"name":"saveInitialParametersToStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"investorInterest","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"interestBaseUint","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethicHubStorage","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowerReturnDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_borrowerReturnEthPerFiatRate","type":"uint256"}],"name":"setBorrowerReturnEthPerFiatRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"investors","outputs":[{"name":"amount","type":"uint256"},{"name":"isCompensated","type":"bool"},{"name":"surplusEthReclaimed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ethicHubTeamFeeReclaimed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_initialEthPerFiatRate","type":"uint256"}],"name":"finishInitialExchangingPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"declareProjectNotFunded","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"fundingEndTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"localNodeFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"surplusEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrower","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"firstDate","type":"uint256"},{"name":"lastDate","type":"uint256"}],"name":"getDaysPassedBetweenDates","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"userAddress","type":"address"}],"name":"getUserContributionReclaimStatus","outputs":[{"name":"isCompensated","type":"bool"},{"name":"surplusEthReclaimed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reclaimedSurpluses","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lendingDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"investor","type":"address"}],"name":"checkInvestorReturns","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"reclaimContributionWithInterest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"borrowerReturnAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reclaimedContributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"annualInterest","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"contributor","type":"address"}],"name":"contributeForAddress","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"reclaimEthicHubTeamFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"borrowerReturnDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_borrower","type":"address"}],"name":"setBorrower","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getLendingDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isContribPeriodRunning","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethichubFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"investorCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"reclaimLocalNodeFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalLendingFiatAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowerReturnEthPerFiatRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"reclaimContribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"investor","type":"address"}],"name":"checkInvestorContribution","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"returnedEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_fundingStartTime","type":"uint256"},{"name":"_fundingEndTime","type":"uint256"},{"name":"_borrower","type":"address"},{"name":"_annualInterest","type":"uint256"},{"name":"_totalLendingAmount","type":"uint256"},{"name":"_lendingDays","type":"uint256"},{"name":"_storageAddress","type":"address"},{"name":"_localNode","type":"address"},{"name":"_ethicHubTeam","type":"address"},{"name":"_ethichubFee","type":"uint256"},{"name":"_localNodeFee","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"endTime","type":"uint256"}],"name":"onCapReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"totalContributed","type":"uint256"},{"indexed":true,"name":"investor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"investorsCount","type":"uint256"}],"name":"onContribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contributor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"onCompensated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"onSurplusSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contributor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"onSurplusReclaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"state","type":"uint256"}],"name":"StateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"rate","type":"uint256"}],"name":"onInitalRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"rate","type":"uint256"}],"name":"onReturnRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"borrower","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"onReturnAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newBorrower","type":"address"}],"name":"onBorrowerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"oldInvestor","type":"address"},{"indexed":true,"name":"newInvestor","type":"address"}],"name":"onInvestorChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Deployed Bytecode
0x6080604052600436106102e75763ffffffff60e060020a600035041663023f4147811461058b57806306c7a603146105b25780630f226b6c146105db5780630f82c53e146105f0578063106099021461062157806315d28e111461063657806316f4d0221461064b5780631a776b3c146106605780631df935581461068157806327f397a9146106965780632e7cece3146106ab5780633f4ba83a146106c057806341c8b1de146106d557806342159ca3146106ea5780634419da33146106ff57806348f918e01461072657806349b882031461073b5780634b3c5513146107505780634f93594514610765578063532da8f91461077a578063534ddf1914610792578063547ac053146107b357806354fd4d50146107dd5780635c07993b146108085780635c975abb1461081d57806361c4adaa1461083257806367453969146108475780636ab4f9211461085c5780636ca78a1e146108715780636f7bc9be14610889578063715018a6146108ca578063717ba064146108df57806372ea2e6d146108f4578063742ba8de1461090c57806374eedd461461092157806375079cf5146109365780637ce64dfb1461094b5780637df1f1b91461096057806381c9a114146109755780638456cb591461099057806387cf34cf146109a55780638da5cb5b146109e15780638e74e19e146109f657806397299d8a14610a0b5780639ab4d3a814610a205780639b82860914610a41578063a5f2e07914610a62578063aceefefd14610a77578063b2552fc414610a8c578063bb316f0614610aa1578063bd366ddc14610ab5578063bda6c49714610aca578063c19d93fb14610adf578063c762d5f714610b18578063c7d5ed0d14610b39578063cfefe5a214610b4e578063d6b37ce914610b63578063d7e64c0014610b78578063da7855a314610b8d578063dee1bfbe14610ba2578063e0341ff914610bb7578063e78686eb14610bcc578063f2fde38b14610bed578063f8a321e114610c0e578063f98db28d14610c2f575b60015460a060020a900460ff16156102fe57600080fd5b6003600954610100900460ff16600681111561031657fe5b148061033757506001600954610100900460ff16600681111561033557fe5b145b8061035757506002600954610100900460ff16600681111561035557fe5b145b15156103ad576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e277420726563656976652045544820696e207468697320737461746500604482015290519081900360640190fd5b6003600954610100900460ff1660068111156103c557fe5b14156103d8576103d3610c44565b610589565b6002600954610100900460ff1660068111156103f057fe5b14156103fe576103d3610e75565b6000546040805160e160020a633ab9b2b9026020808301919091527f696e766573746f72000000000000000000000000000000000000000000000000602483015233606060020a02602c830152825180830382018152918301928390528151610100909404600160a060020a031693637ae1cfca93918291908401908083835b6020831061049d5780518252601f19909201916020918201910161047e565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b505050506040513d602081101561052857600080fd5b50511515610580576040805160e560020a62461bcd02815260206004820152601f60248201527f53656e646572206973206e6f742072656769737465726564206c656e64657200604482015290519081900360640190fd5b61058933610f09565b005b34801561059757600080fd5b506105a0611264565b60408051918252519081900360200190f35b3480156105be57600080fd5b506105c761126a565b604080519115158252519081900360200190f35b3480156105e757600080fd5b506105a0611273565b3480156105fc57600080fd5b50610605611279565b60408051600160a060020a039092168252519081900360200190f35b34801561062d57600080fd5b50610589611288565b34801561064257600080fd5b506105a06113a6565b34801561065757600080fd5b506105a06113ac565b34801561066c57600080fd5b50610589600160a060020a03600435166113b2565b34801561068d57600080fd5b506105a061162d565b3480156106a257600080fd5b506105a0611633565b3480156106b757600080fd5b5061060561165b565b3480156106cc57600080fd5b5061058961166a565b3480156106e157600080fd5b506105a06116e2565b3480156106f657600080fd5b506105a0611758565b34801561070b57600080fd5b50610589600160a060020a036004358116906024351661187d565b34801561073257600080fd5b50610589611c1d565b34801561074757600080fd5b50610589612011565b34801561075c57600080fd5b506105a06123de565b34801561077157600080fd5b506105c76123e4565b34801561078657600080fd5b506105a06004356123ed565b34801561079e57600080fd5b50610589600160a060020a0360043516612435565b3480156107bf57600080fd5b50610589600435602435604435600160a060020a03606435166124e0565b3480156107e957600080fd5b506107f2612e10565b6040805160ff9092168252519081900360200190f35b34801561081457600080fd5b506105a0612e19565b34801561082957600080fd5b506105c7612e32565b34801561083e57600080fd5b506105a0612e42565b34801561085357600080fd5b50610605612e47565b34801561086857600080fd5b506105a0612e5b565b34801561087d57600080fd5b50610589600435612e61565b34801561089557600080fd5b506108aa600160a060020a0360043516612f70565b604080519384529115156020840152151582820152519081900360600190f35b3480156108d657600080fd5b50610589612f95565b3480156108eb57600080fd5b506105c7613003565b34801561090057600080fd5b50610589600435613011565b34801561091857600080fd5b50610589613202565b34801561092d57600080fd5b506105a06132f0565b34801561094257600080fd5b506105a06132f6565b34801561095757600080fd5b506105a06132fc565b34801561096c57600080fd5b50610605613302565b34801561098157600080fd5b506105a0600435602435613311565b34801561099c57600080fd5b506105896133b4565b3480156109b157600080fd5b506109c6600160a060020a0360043516613431565b60408051921515835290151560208301528051918290030190f35b3480156109ed57600080fd5b5061060561345c565b348015610a0257600080fd5b506105a061346b565b348015610a1757600080fd5b506105a0613471565b348015610a2c57600080fd5b506105a0600160a060020a0360043516613477565b348015610a4d57600080fd5b50610589600160a060020a0360043516613585565b348015610a6e57600080fd5b506105a06136df565b348015610a8357600080fd5b506105a06136ef565b348015610a9857600080fd5b506105a06136f5565b610589600160a060020a03600435166136fb565b348015610ac157600080fd5b5061058961394a565b348015610ad657600080fd5b506105a0613afa565b348015610aeb57600080fd5b50610af4613b00565b60405180826006811115610b0457fe5b60ff16815260200191505060405180910390f35b348015610b2457600080fd5b50610589600160a060020a0360043516613b0e565b348015610b4557600080fd5b506105a0613ee9565b348015610b5a57600080fd5b506105c7613f11565b348015610b6f57600080fd5b506105a0613f38565b348015610b8457600080fd5b506105a0613f3e565b348015610b9957600080fd5b50610589613f44565b348015610bae57600080fd5b506105a06140ed565b348015610bc357600080fd5b506105a06140f3565b348015610bd857600080fd5b50610589600160a060020a03600435166140f9565b348015610bf957600080fd5b50610589600160a060020a036004351661424d565b348015610c1a57600080fd5b506105a0600160a060020a036004351661426d565b348015610c3b57600080fd5b506105a0614288565b600080806003600954610100900460ff166006811115610c6057fe5b14610cb5576040805160e560020a62461bcd02815260206004820152601b60248201527f5374617465206973206e6f74204177616974696e6752657475726e0000000000604482015290519081900360640190fd5b601054600160a060020a03163314610d17576040805160e560020a62461bcd02815260206004820152601b60248201527f4f6e6c792074686520626f72726f7765722063616e2072657061790000000000604482015290519081900360640190fd5b601454600010610d71576040805160e560020a62461bcd02815260206004820152601c60248201527f5365636f6e642065786368616e67652072617465206e6f742073657400000000604482015290519081900360640190fd5b5050604080513481529051600092508291829133917f0e128ee884ff8004f547a4cb1730d37374f537cb49dfc3813955457399f1b006919081900360200190a2610dc5610dbc6136df565b601a543461428e565b601a8390559094509250905060018315151415610e3857610de860075442613311565b600d556009805461ff0019166105001790819055600080516020614a7883398151915290610100900460ff166006811115610e1f57fe5b60408051918252519081900360200190a1610e386142fe565b6000821115610e7057604051339083156108fc029084906000818181858888f19350505050158015610e6e573d6000803e3d6000fd5b505b505050565b6002600954610100900460ff166006811115610e8d57fe5b14610e9757600080fd5b601054600160a060020a03163314610eae57600080fd5b601954610ec1903463ffffffff61492116565b6019819055600b541015610ed457600080fd5b6040805134815290517f0b4c8d1b2cae9c489899020a2321c20022e928a3f605fc963d318092e4260c329181900360200190a1565b6001546000908190819060a060020a900460ff1615610f2757600080fd5b6001600954610100900460ff166006811115610f3f57fe5b14610fba576040805160e560020a62461bcd02815260206004820152602360248201527f7374617465206973206e6f7420416363657074696e67436f6e7472696275746960448201527f6f6e730000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610fc2613f11565b151561103e576040805160e560020a62461bcd02815260206004820152602c60248201527f63616e277420636f6e74726962757465206f75747369646520636f6e7472696260448201527f7574696f6e20706572696f640000000000000000000000000000000000000000606482015290519081900360840190fd5b60085492506000915060009050611058600b54843461428e565b6009805460ff19169215159290921791829055600883905591935090915060ff16156110b75742600781905560408051918252517fcdf2a87753a725b409e9ce02d5505652d7e5f5e226b2b4aa7b2ec3f1b4454d2f9181900360200190a15b600160a060020a03841660009081526002602052604090205415156110ee576003546110ea90600163ffffffff61492116565b6003555b60008111156111d357604051339082156108fc029083906000818181858888f19350505050158015611124573d6000803e3d6000fd5b50600160a060020a038416600090815260026020526040902054611160908290611154903463ffffffff61492116565b9063ffffffff61492e16565b600160a060020a0385166000818152600260205260409020919091557fa4343ae98cbe49a830f8d4239e189409bfc6939e7f70d8af07acd896d89580a5836111ae348563ffffffff61492e16565b60035460408051938452602084019290925282820152519081900360600190a2610e6e565b600160a060020a0384166000908152600260205260409020546111fc903463ffffffff61492116565b600160a060020a0385166000818152600260209081526040918290209390935560035481518681523494810194909452838201525190917fa4343ae98cbe49a830f8d4239e189409bfc6939e7f70d8af07acd896d89580a5919081900360600190a250505050565b60085481565b60185460ff1681565b61271081565b601154600160a060020a031681565b601154600160a060020a03163314806112ab5750600154600160a060020a031633145b15156112ef576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b6001600954610100900460ff16600681111561130757fe5b1461131157600080fd5b60095460ff16151561132257600080fd5b6009805461ff0019166102001790819055600080516020614a7883398151915290610100900460ff16600681111561135657fe5b60408051918252519081900360200190a1601054600854604051600160a060020a039092169181156108fc0291906000818181858888f193505050501580156113a3573d6000803e3d6000fd5b50565b600b5481565b60175481565b60008060195411151561140f576040805160e560020a62461bcd02815260206004820152600e60248201527f4e6f20737572706c757320455448000000000000000000000000000000000000604482015290519081900360640190fd5b6002600954610100900460ff16600681111561142757fe5b141561147d576040805160e560020a62461bcd02815260206004820152601960248201527f53746174652069732045786368616e67696e67546f4669617400000000000000604482015290519081900360640190fd5b600160a060020a038216600090815260026020526040902060010154610100900460ff16156114f6576040805160e560020a62461bcd02815260206004820152601960248201527f537572706c757320616c7265616479207265636c61696d656400000000000000604482015290519081900360640190fd5b611547611510600b5460195461492190919063ffffffff16565b601954600160a060020a03851660009081526002602052604090205461153b9163ffffffff61494016565b9063ffffffff61496916565b9050600081116115a1576040805160e560020a62461bcd02815260206004820152600c60248201527f537572706c757320697320300000000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03821660009081526002602052604090206001908101805461ff0019166101001790556005546115dd9163ffffffff61492116565b600555604080518281529051600160a060020a038416917ffe1013231e75cf275d3c8a58285a703c0d1ad21d583517ed94c8b686412f4ca0919081900360200190a2611629828261497e565b5050565b60065481565b600061165561271061153b6116466116e2565b600f549063ffffffff61494016565b90505b90565b601254600160a060020a031681565b600154600160a060020a0316331461168157600080fd5b60015460a060020a900460ff16151561169957600080fd5b6001805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600061165561271061174c611703606460155461494090919063ffffffff16565b60165461174c9061171b90606463ffffffff61494016565b61174c61016d61153b61172c613ee9565b600a5461174090606463ffffffff61494016565b9063ffffffff61494016565b9063ffffffff61492116565b60008054604080517f6c656e64696e672e6d617844656c61794461797300000000000000000000000060208083019190915230606060020a026034830152825180830360280181526048909201928390528151610100909404600160a060020a03169363bd02d0f593918291908401908083835b602083106117eb5780518252601f1990920191602091820191016117cc565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561184c57600080fd5b505af1158015611860573d6000803e3d6000fd5b505050506040513d602081101561187657600080fd5b5051905090565b60008054604080517f617262697465720000000000000000000000000000000000000000000000000060208083019190915230606060020a0260278301528251808303601b018152603b909201928390528151610100909404600160a060020a0316936321f8a72193918291908401908083835b602083106119105780518252601f1990920191602091820191016118f1565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561197157600080fd5b505af1158015611985573d6000803e3d6000fd5b505050506040513d602081101561199b57600080fd5b50519050600160a060020a03811633146119ed576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b600160a060020a0382161515611a0257600080fd5b6000546040805160e160020a633ab9b2b9026020808301919091527f696e766573746f720000000000000000000000000000000000000000000000006024830152600160a060020a03868116606060020a02602c8401528351808403830181529284019384905282516101009095041693637ae1cfca93918291908401908083835b60208310611aa35780518252601f199092019160209182019101611a84565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611b0457600080fd5b505af1158015611b18573d6000803e3d6000fd5b505050506040513d6020811015611b2e57600080fd5b50511515611b3b57600080fd5b600160a060020a0383166000908152600260205260409020541515611b5f57600080fd5b600160a060020a03821660009081526002602052604090205415611b8257600080fd5b600160a060020a0383811660008181526002602052604080822080549487168084528284209586556001808301805491909701805460ff191660ff928316151517808255885461ff00199091166101009182900490931615150291909117905584845290839055845461ffff1916909455517fe885da7a4af28452538a02823a397cd8734085c273324cc6d5feb174fa352c2d9190a3505050565b60008054604080517f617262697465720000000000000000000000000000000000000000000000000060208083019190915230606060020a0260278301528251808303601b018152603b909201928390528151610100909404600160a060020a0316936321f8a72193918291908401908083835b60208310611cb05780518252601f199092019160209182019101611c91565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611d1157600080fd5b505af1158015611d25573d6000803e3d6000fd5b505050506040513d6020811015611d3b57600080fd5b50519050600160a060020a0381163314611d8d576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b6005600954610100900460ff166006811115611da557fe5b1480611dc657506006600954610100900460ff166006811115611dc457fe5b145b1515611e30576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020614a9883398151915260448201527f64206f722044656661756c740000000000000000000000000000000000000000606482015290519081900360840190fd5b60185460ff161515611e8c576040805160e560020a62461bcd02815260206004820152601f60248201527f4c6f63616c204e6f646520666565206973206e6f74207265636c61696d656400604482015290519081900360640190fd5b601854610100900460ff161515611eed576040805160e560020a62461bcd02815260206004820152601960248201527f5465616d20666565206973206e6f74207265636c61696d656400000000000000604482015290519081900360640190fd5b60045460035414611f6e576040805160e560020a62461bcd02815260206004820152602c60248201527f4e6f7420616c6c20696e766573746f72732068617665207265636c61696d656460448201527f2074686569722073686172650000000000000000000000000000000000000000606482015290519081900360840190fd5b60006019541115611ffa5760055460035414611ffa576040805160e560020a62461bcd02815260206004820152602e60248201527f4e6f7420616c6c20696e766573746f72732068617665207265636c61696d656460448201527f20746865697220737572706c7573000000000000000000000000000000000000606482015290519081900360840190fd5b6012546113a390600160a060020a0316303161497e565b6011546000908190600160a060020a03163314806120395750600154600160a060020a031633145b151561207d576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b6003600954610100900460ff16600681111561209557fe5b1461209f57600080fd5b6120a7611758565b9150816120b3426123ed565b10156120be57600080fd5b600060019054906101000a9004600160a060020a0316600160a060020a03166321f8a72160405160200180807f636f6e74726163742e6e616d6500000000000000000000000000000000000000815250600d01807f72657075746174696f6e00000000000000000000000000000000000000000000815250600a0190506040516020818303038152906040526040518082805190602001908083835b602083106121795780518252601f19909201916020918201910161215a565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156121da57600080fd5b505af11580156121ee573d6000803e3d6000fd5b505050506040513d602081101561220457600080fd5b50519050600160a060020a038116151561221d57600080fd5b600054604080517f6c656e64696e672e64656c61794461797300000000000000000000000000000060208083019190915230606060020a026031830152825180830360250181526045909201928390528151610100909404600160a060020a03169363e2a4853a93918291908401908083835b602083106122af5780518252601f199092019160209182019101612290565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101899052915160448084019550600094509092839003019050818387803b15801561231b57600080fd5b505af115801561232f573d6000803e3d6000fd5b5050505080600160a060020a0316639c6c3439836040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b15801561237c57600080fd5b505af1158015612390573d6000803e3d6000fd5b50506009805461ff0019166106001790819055600080516020614a788339815191529250610100900460ff16905060068111156123c957fe5b60408051918252519081900360200190a15050565b600e5481565b60095460ff1681565b600c54600754600091620151800290829061240e908363ffffffff61492116565b905080841015612421576000925061242e565b61242b8185613311565b92505b5050919050565b60006006600954610100900460ff16600681111561244f57fe5b1461245957600080fd5b600160a060020a03821660009081526002602052604090206001015460ff161561248257600080fd5b61248b82613477565b90506000811161249a57600080fd5b600160a060020a03821660009081526002602052604090206001908101805460ff1916821790556004546124d39163ffffffff61492116565b600455611629828261497e565b601154600160a060020a03163314806125035750600154600160a060020a031633145b1515612547576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b83151561259e576040805160e560020a62461bcd02815260206004820152601960248201527f5f6d617844656c617944617973206d757374206265203e203000000000000000604482015290519081900360640190fd5b6000600954610100900460ff1660068111156125b657fe5b1461260b576040805160e560020a62461bcd02815260206004820152601b60248201527f5374617465206d75737420626520556e696e697469616c697a65640000000000604482015290519081900360640190fd5b60008311612663576040805160e560020a62461bcd02815260206004820152601160248201527f5f74696572206d757374206265203e2030000000000000000000000000000000604482015290519081900360640190fd5b600082116126bb576040805160e560020a62461bcd02815260206004820152601d60248201527f5f636f6d6d756e6974794d656d62657273206d757374206265203e2030000000604482015290519081900360640190fd5b6000546040805160e160020a633ab9b2b9026020808301919091527f636f6d6d756e69747900000000000000000000000000000000000000000000006024830152600160a060020a03858116606060020a02602d8401528351808403602101815260419093019384905282516101009095041693637ae1cfca93918291908401908083835b6020831061275f5780518252601f199092019160209182019101612740565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156127c057600080fd5b505af11580156127d4573d6000803e3d6000fd5b505050506040513d60208110156127ea57600080fd5b50511515612842576040805160e560020a62461bcd02815260206004820152601b60248201527f436f6d6d756e697479206973206e6f7420726567697374657265640000000000604482015290519081900360640190fd5b600054604080517f6c656e64696e672e6d617844656c61794461797300000000000000000000000060208083019190915230606060020a026034830152825180830360280181526048909201928390528151610100909404600160a060020a03169363e2a4853a93918291908401908083835b602083106128d45780518252601f1990920191602091820191016128b5565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152602481018b9052915160448084019550600094509092839003019050818387803b15801561294057600080fd5b505af1158015612954573d6000803e3d6000fd5b5050600054604080517f6c656e64696e672e636f6d6d756e69747900000000000000000000000000000060208083019190915230606060020a026031830152825180830360250181526045909201928390528151610100909404600160a060020a0316955063ca446dd99450909282918401908083835b602083106129ea5780518252601f1990920191602091820191016129cb565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152600160a060020a0388166024820152915160448084019550600094509092839003019050818387803b158015612a5e57600080fd5b505af1158015612a72573d6000803e3d6000fd5b5050600054604080517f6c656e64696e672e6c6f63616c4e6f646500000000000000000000000000000060208083019190915230606060020a026031830152825180830360250181526045909201928390528151610100909404600160a060020a0316955063ca446dd99450909282918401908083835b60208310612b085780518252601f199092019160209182019101612ae9565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812060115463ffffffff881660e060020a0283526004830191909152600160a060020a03166024820152915160448084019550600094509092839003019050818387803b158015612b8157600080fd5b505af1158015612b95573d6000803e3d6000fd5b5050600054604080517f6c656e64696e672e74696572000000000000000000000000000000000000000060208083019190915230606060020a02602c830152825180830382018152918301928390528151610100909404600160a060020a0316955063e2a4853a9450909282918401908083835b60208310612c285780518252601f199092019160209182019101612c09565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152602481018a9052915160448084019550600094509092839003019050818387803b158015612c9457600080fd5b505af1158015612ca8573d6000803e3d6000fd5b5050600054604080517f6c656e64696e672e636f6d6d756e6974794d656d62657273000000000000000060208083019190915230606060020a0260388301528251808303602c018152604c909201928390528151610100909404600160a060020a0316955063e2a4853a9450909282918401908083835b60208310612d3e5780518252601f199092019160209182019101612d1f565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101899052915160448084019550600094509092839003019050818387803b158015612daa57600080fd5b505af1158015612dbe573d6000803e3d6000fd5b5050506017849055506009805461ff00191661010090811791829055600080516020614a78833981519152910460ff166006811115612df957fe5b60408051918252519081900360200190a150505050565b60005460ff1681565b600061165561271061174c61016d61153b61172c613ee9565b60015460a060020a900460ff1681565b606481565b6000546101009004600160a060020a031681565b600d5481565b601154600160a060020a0316331480612e845750600154600160a060020a031633145b1515612ec8576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b6003600954610100900460ff166006811115612ee057fe5b14612f35576040805160e560020a62461bcd02815260206004820152601b60248201527f5374617465206973206e6f74204177616974696e6752657475726e0000000000604482015290519081900360640190fd5b60148190556040805182815290517f499bfdefd9cffe675ab5ceb2d530c45fc77e72ac9993fcafa283fa4f693f58cc9181900360200190a150565b6002602052600090815260409020805460019091015460ff8082169161010090041683565b600154600160a060020a03163314612fac57600080fd5b600154604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26001805473ffffffffffffffffffffffffffffffffffffffff19169055565b601854610100900460ff1681565b601154600160a060020a03163314806130345750600154600160a060020a031633145b1515613078576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b60095460ff1615156001146130d7576040805160e560020a62461bcd02815260206004820152600f60248201527f436170206e6f7420726561636865640000000000000000000000000000000000604482015290519081900360640190fd5b6002600954610100900460ff1660068111156130ef57fe5b14613144576040805160e560020a62461bcd02815260206004820152601d60248201527f5374617465206973206e6f742045786368616e67696e67546f46696174000000604482015290519081900360640190fd5b600e8190556019546000101561316d57601954600b546131699163ffffffff61492e16565b600b555b600e54600b546131829163ffffffff61494016565b600f55600e5460408051918252517fc58ca3e22df5440a4929f433f6a66fa434ad60e93f5beccf99c9d4e4a8620ca69181900360200190a16009805461ff0019166103001790819055600080516020614a7883398151915290610100900460ff1660068111156131ee57fe5b60408051918252519081900360200190a150565b601154600160a060020a03163314806132255750600154600160a060020a031633145b1515613269576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b600b546008541061327957600080fd5b6001600954610100900460ff16600681111561329157fe5b1461329b57600080fd5b60075442116132a957600080fd5b6009805461ff0019166104001790819055600080516020614a7883398151915290610100900460ff1660068111156132dd57fe5b60408051918252519081900360200190a1565b60075481565b60165481565b60195481565b601054600160a060020a031681565b600081831115613391576040805160e560020a62461bcd02815260206004820152602660248201527f6c61737444617465206d75737420626520626967676572207468616e2066697260448201527f7374446174650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6133ab601861153b603c818181888a63ffffffff61492e16565b90505b92915050565b600154600160a060020a031633146133cb57600080fd5b60015460a060020a900460ff16156133e257600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600160a060020a031660009081526002602052604090206001015460ff808216926101009092041690565b600154600160a060020a031681565b60055481565b600c5481565b6000806005600954610100900460ff16600681111561349257fe5b14156135265750600160a060020a038216600090815260026020526040812054601954909110156134f457600854600b54600160a060020a0385166000908152600260205260409020546134f1929161153b919063ffffffff61494016565b90505b61351f61271061153b60145461153b61350b612e19565b600e5461174090889063ffffffff61494016565b915061357f565b6006600954610100900460ff16600681111561353e57fe5b141561357a5750600160a060020a038216600090815260026020526040902054600b54601a5461351f919061153b90849063ffffffff61494016565b600091505b50919050565b60006005600954610100900460ff16600681111561359f57fe5b14613608576040805160e560020a62461bcd0281526020600482015260216024820152600080516020614a9883398151915260448201527f6400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03821660009081526002602052604090206001015460ff161561367c576040805160e560020a62461bcd02815260206004820152601a60248201527f4c656e64657220616c726561647920636f6d70656e7361746564000000000000604482015290519081900360640190fd5b61368582613477565b90506000811161249a576040805160e560020a62461bcd02815260206004820152601160248201527f436f6e747269627574696f6e2069732030000000000000000000000000000000604482015290519081900360640190fd5b600061165560145461153b611633565b60045481565b600a5481565b6040805190810160405280600e81526020017f7061796d656e744761746577617900000000000000000000000000000000000081525060008060019054906101000a9004600160a060020a0316600160a060020a0316637ae1cfca8333604051602001808060e160020a633ab9b2b90281525060040183805190602001908083835b6020831061379c5780518252601f19909201916020918201910161377d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061381e5780518252601f1990920191602091820191016137ff565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561387f57600080fd5b505af1158015613893573d6000803e3d6000fd5b505050506040513d60208110156138a957600080fd5b5051905080151561392a576040805160e560020a62461bcd02815260206004820152602560248201527f53656e646572206e6f74207265676973746572656420696e204574686963487560448201527f622e636f6d000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60015460a060020a900460ff161561394157600080fd5b610e7083610f09565b60006005600954610100900460ff16600681111561396457fe5b146139cd576040805160e560020a62461bcd0281526020600482015260216024820152600080516020614a9883398151915260448201527f6400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b601854610100900460ff1615613a53576040805160e560020a62461bcd02815260206004820152602560248201527f4574686963487562207465616d27732066656520616c7265616479207265636c60448201527f61696d6564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b613a7b60145461153b61271061153b6064611740601554600f5461494090919063ffffffff16565b905060008111613ad5576040805160e560020a62461bcd02815260206004820152601860248201527f45746869634875622773207465616d2066656520697320300000000000000000604482015290519081900360640190fd5b6018805461ff0019166101001790556012546113a390600160a060020a03168261497e565b60135481565b600954610100900460ff1681565b60008054604080517f617262697465720000000000000000000000000000000000000000000000000060208083019190915230606060020a0260278301528251808303601b018152603b909201928390528151610100909404600160a060020a0316936321f8a72193918291908401908083835b60208310613ba15780518252601f199092019160209182019101613b82565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015613c0257600080fd5b505af1158015613c16573d6000803e3d6000fd5b505050506040513d6020811015613c2c57600080fd5b50519050600160a060020a0381163314613c7e576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614ab8833981519152604482015290519081900360640190fd5b600160a060020a0382161515613cde576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f20626f72726f776572207365740000000000000000000000000000000000604482015290519081900360640190fd5b6000546040805160e160020a633ab9b2b9026020808301919091527f726570726573656e7461746976650000000000000000000000000000000000006024830152600160a060020a03868116606060020a0260328401528351808403602601815260469093019384905282516101009095041693637ae1cfca93918291908401908083835b60208310613d825780518252601f199092019160209182019101613d63565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015613de357600080fd5b505af1158015613df7573d6000803e3d6000fd5b505050506040513d6020811015613e0d57600080fd5b50511515613e8b576040805160e560020a62461bcd02815260206004820152602660248201527f426f72726f776572206e6f74207265676973746572656420726570726573656e60448201527f7461746976650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6010805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384811691909117918290556040519116907f6adac3ed7dd72483b9de68eaf670500779a4bfbef4b611ffcd782b9085aa7e1090600090a25050565b600080600d541115613efe5750600d54611658565b613f0a60075442613311565b9050611658565b60004260065411158015613f26575042600754115b801561165557505060095460ff161590565b60155481565b60035481565b60006005600954610100900460ff166006811115613f5e57fe5b14613fc7576040805160e560020a62461bcd0281526020600482015260216024820152600080516020614a9883398151915260448201527f6400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60185460ff1615614048576040805160e560020a62461bcd02815260206004820152602260248201527f4c6f63616c204e6f646527732066656520616c7265616479207265636c61696d60448201527f6564000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61407060145461153b61271061153b6064611740601654600f5461494090919063ffffffff16565b9050600081116140ca576040805160e560020a62461bcd02815260206004820152601a60248201527f4c6f63616c204e6f64652773207465616d206665652069732030000000000000604482015290519081900360640190fd5b6018805460ff191660011790556011546113a390600160a060020a03168261497e565b600f5481565b60145481565b60006004600954610100900460ff16600681111561411357fe5b14614168576040805160e560020a62461bcd02815260206004820152601d60248201527f5374617465206973206e6f742050726f6a6563744e6f7446756e646564000000604482015290519081900360640190fd5b600160a060020a03821660009081526002602052604090206001015460ff16156141dc576040805160e560020a62461bcd02815260206004820152601e60248201527f436f6e747269627574696f6e20616c7265616479207265636c61696d65640000604482015290519081900360640190fd5b50600160a060020a03811660009081526002602052604081205490811161249a576040805160e560020a62461bcd02815260206004820152601160248201527f436f6e747269627574696f6e2069732030000000000000000000000000000000604482015290519081900360640190fd5b600154600160a060020a0316331461426457600080fd5b6113a3816149f9565b600160a060020a031660009081526002602052604090205490565b601a5481565b600080808080806142a5888863ffffffff61492116565b925060009150600090508883101580156142be57508888105b156142ef57600191506142d7838a63ffffffff61492e16565b90506142e9878263ffffffff61492e16565b96508892505b91989097509095509350505050565b60008060008060019054906101000a9004600160a060020a0316600160a060020a03166321f8a72160405160200180807f636f6e74726163742e6e616d6500000000000000000000000000000000000000815250600d01807f72657075746174696f6e00000000000000000000000000000000000000000000815250600a0190506040516020818303038152906040526040518082805190602001908083835b602083106143bd5780518252601f19909201916020918201910161439e565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561441e57600080fd5b505af1158015614432573d6000803e3d6000fd5b505050506040513d602081101561444857600080fd5b50519250600160a060020a038316151561446157600080fd5b61446a426123ed565b915060008211156145f157600054604080517f6c656e64696e672e64656c61794461797300000000000000000000000000000060208083019190915230606060020a026031830152825180830360250181526045909201928390528151610100909404600160a060020a03169363e2a4853a93918291908401908083835b602083106145075780518252601f1990920191602091820191016144e8565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101899052915160448084019550600094509092839003019050818387803b15801561457357600080fd5b505af1158015614587573d6000803e3d6000fd5b5050505082600160a060020a0316639c6c3439836040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b1580156145d457600080fd5b505af11580156145e8573d6000803e3d6000fd5b50505050610e70565b6147726001600060019054906101000a9004600160a060020a0316600160a060020a031663bd02d0f53060175460405160200180807f636f6d6d756e6974792e636f6d706c6574656450726f6a65637473427954696581526020017f720000000000000000000000000000000000000000000000000000000000000081525060210183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106146d95780518252601f1990920191602091820191016146ba565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561473a57600080fd5b505af115801561474e573d6000803e3d6000fd5b505050506040513d602081101561476457600080fd5b50519063ffffffff61492116565b600054601754604080517f636f6d6d756e6974792e636f6d706c6574656450726f6a6563747342795469656020808301919091527f72000000000000000000000000000000000000000000000000000000000000008284015230606060020a026041830152605580830194909452825180830390940184526075909101918290528251949550610100909304600160a060020a03169363e2a4853a938291908401908083835b602083106148375780518252601f199092019160209182019101614818565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101889052915160448084019550600094509092839003019050818387803b1580156148a357600080fd5b505af11580156148b7573d6000803e3d6000fd5b5050505082600160a060020a03166337681083826040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b15801561490457600080fd5b505af1158015614918573d6000803e3d6000fd5b50505050505050565b818101828110156133ae57fe5b60008282111561493a57fe5b50900390565b6000821515614951575060006133ae565b5081810281838281151561496157fe5b04146133ae57fe5b6000818381151561497657fe5b049392505050565b30318111156149c357604051600160a060020a03831690303180156108fc02916000818181858888f193505050501580156149bd573d6000803e3d6000fd5b50611629565b604051600160a060020a0383169082156108fc029083906000818181858888f19350505050158015610e70573d6000803e3d6000fd5b600160a060020a0381161515614a0e57600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055560049628ca47affc2c0364f092b96d5c6037157da8dd90c96c281f775bd576a45b95374617465206973206e6f7420436f6e747269627574696f6e52657475726e6553656e646572206e6f7420617574686f72697a65640000000000000000000000a165627a7a723058202e2189ab9e946ac177ba53eb91a88221b3b24e09de9c500873762cc80b48789e0029
Swarm Source
bzzr://2e2189ab9e946ac177ba53eb91a88221b3b24e09de9c500873762cc80b48789e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,828.01 | 0.5774 | $2,210.28 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.