Contract Address Details

0xa2dAE9e70D5A08B781DeE134617Cf5E7D23043c2

Contract Name
EnergiswapFactoryGovernedProxy
Creator
0x875adb–f594e4 at 0xf6378c–1cf675
Implementation
0x875adbaf8109c9cc9abcc708a42607f573f594e4
Balance
0.00 NRG
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
2447642
Contract name:
EnergiswapFactoryGovernedProxy




Optimization enabled
true
Compiler version
v0.5.16+commit.9c3226ce




Optimization runs
200
EVM Version
petersburg




Verified at
2021-09-22 07:26:29.786399Z

Constructor Arguments

000000000000000000000000875adbaf8109c9cc9abcc708a42607f573f594e40000000000000000000000000000000000000000000000000000000000000305

Arg [0] (address) : 0x875adbaf8109c9cc9abcc708a42607f573f594e4
Arg [1] (address) : 0x0000000000000000000000000000000000000305

              

Contract source code

// File: NonReentrant.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity = 0.5.16;
/**
* A little helper to protect contract from being re-entrant in state
* modifying functions.
*/
contract NonReentrant {
uint private entry_guard;
modifier noReentry {
require(entry_guard == 0, "Reentry");
entry_guard = 1;
_;
entry_guard = 0;
}
}
// File: energiswapFactory/IEnergiswapFactory.sol
// Copyright (C) 2020 Energi Core
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity >=0.5.0;
interface IEnergiswapFactory {
function initialized() external view returns (bool);
function _storage() external view returns (address);
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function initialize(address _routerProxy, address _pairsManagerProxy, address _pairsERC20Proxy) external;
function destroy(address _newImpl) external;
function migrate(address _oldImpl) external;
function createPair(
address tokenA,
address tokenB
) external returns (address pairProxy);
function setFeeTo(address _feeTo) external;
function setFeeToSetter(address _feeToSetter) external;
function feeTo() external view returns (address _feeTo);
function feeToSetter() external view returns (address _feeToSetter);
function sporkProxy() external view returns (address _sporkProxy);
function getPair(address tokenA, address tokenB) external view returns (address _pair);
function allPairs(uint index) external view returns (address _pair);
function allPairsLength() external view returns (uint);
}
// File: interfaces/IGovernedContract.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
/**
* Genesis version of GovernedContract interface.
*
* Base Consensus interface for upgradable contracts.
* Unlike common approach, the implementation is NOT expected to be
* called through delegatecall() to minimize risks of shared storage.
*
* NOTE: it MUST NOT change after blockchain launch!
*/
interface IGovernedContract {
// Return actual proxy address for secure validation
function proxy() external returns(address);
// It must check that the caller is the proxy
// and copy all required data from the old address.
function migrate(IGovernedContract _oldImpl) external;
// It must check that the caller is the proxy
// and self destruct to the new address.
function destroy(IGovernedContract _newImpl) external;
// function () external payable; // This line (from original Energi IGovernedContract) is commented because it
// makes truffle migrations fail
}
// File: interfaces/IProposal.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity >=0.5.0;
interface IProposal {
function parent() external view returns(address);
function created_block() external view returns(uint);
function deadline() external view returns(uint);
function fee_payer() external view returns(address payable);
function fee_amount() external view returns(uint);
function accepted_weight() external view returns(uint);
function rejected_weight() external view returns(uint);
function total_weight() external view returns(uint);
function quorum_weight() external view returns(uint);
function isFinished() external view returns(bool);
function isAccepted() external view returns(bool);
function withdraw() external;
function destroy() external;
function collect() external;
function voteAccept() external;
function voteReject() external;
function setFee() external payable;
function canVote(address owner) external view returns(bool);
}
// File: interfaces/IUpgradeProposal.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity >=0.5.0;
/**
* Interface of UpgradeProposal
*/
contract IUpgradeProposal is IProposal {
function impl() external view returns(IGovernedContract);
}
// File: interfaces/IGovernedProxy.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity >=0.5.0;
//pragma experimental SMTChecker;
/**
* Genesis version of IGovernedProxy interface.
*
* Base Consensus interface for upgradable contracts proxy.
* Unlike common approach, the implementation is NOT expected to be
* called through delegatecall() to minimize risks of shared storage.
*
* NOTE: it MUST NOT change after blockchain launch!
*/
interface IGovernedProxy {
event UpgradeProposal(
IGovernedContract indexed impl,
IUpgradeProposal proposal
);
event Upgraded(
IGovernedContract indexed impl,
IUpgradeProposal proposal
);
function impl() external view returns(IGovernedContract);
function proposeUpgrade(IGovernedContract _newImpl, uint _period)
external payable returns(IUpgradeProposal);
function upgrade(IUpgradeProposal _proposal) external;
function upgradeProposalImpl(IUpgradeProposal _proposal) external view returns(IGovernedContract new_impl);
function listUpgradeProposals() external view returns(IUpgradeProposal[] memory proposals);
function collectUpgradeProposal(IUpgradeProposal _proposal) external;
function () external payable;
}
// File: energiswapFactory/IEnergiswapFactoryGovernedProxy.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity >=0.5.0;
//pragma experimental SMTChecker;
/**
* Genesis version of IGovernedProxy interface.
*
* Base Consensus interface for upgradable contracts proxy.
* Unlike common approach, the implementation is NOT expected to be
* called through delegatecall() to minimize risks of shared storage.
*
* NOTE: it MUST NOT change after blockchain launch!
*/
interface IEnergiswapFactoryGovernedProxy {
event UpgradeProposal(
IGovernedContract indexed impl,
IUpgradeProposal proposal
);
event Upgraded(
IGovernedContract indexed impl,
IUpgradeProposal proposal
);
function impl() external view returns (IGovernedContract);
function spork_proxy() external view returns (IGovernedProxy);
function emitPairCreated(address token0, address token1, address pair, uint allPairsLength) external;
function proposeUpgrade(IGovernedContract _newImpl, uint _period) external payable returns(IUpgradeProposal);
function upgrade(IUpgradeProposal _proposal) external;
function upgradeProposalImpl(IUpgradeProposal _proposal) external view returns(IGovernedContract new_impl);
function collectUpgradeProposal(IUpgradeProposal _proposal) external;
function proxy() external view returns (address);
function migrate(IGovernedContract) external pure;
function destroy(IGovernedContract) external pure;
function () external payable;
}
// File: interfaces/ISporkRegistry.sol
// Copyright 2019 The Energi Core Authors
// This file is part of Energi Core.
//
// Energi Core is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Energi Core is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
// Energi Governance system is the fundamental part of Energi Core.
// NOTE: It's not allowed to change the compiler due to byte-to-byte
// match requirement.
pragma solidity >=0.5.0;
interface ISporkRegistry {
function createUpgradeProposal(
IGovernedContract _impl,
uint _period,
address payable _fee_payer
)
external payable
returns (IUpgradeProposal);
function consensusGasLimits()
external view
returns(uint callGas, uint xferGas);
}
// File: energiswapFactory/EnergiswapFactoryGovernedProxy.sol
// Copyright (C) 2020 Energi Core
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity = 0.5.16;
/**
* SC-9: This contract has no chance of being updated. It must be stupid simple.
*
* If another upgrade logic is required in the future - it can be done as proxy stage II.
*/
contract EnergiswapFactoryGovernedProxy is IEnergiswapFactoryGovernedProxy, NonReentrant {
IGovernedContract public impl;
IGovernedProxy public spork_proxy;
mapping(address => IGovernedContract) public upgrade_proposals;
IUpgradeProposal[] public upgrade_proposal_list;
event PairCreated(address indexed token0, address indexed token1, address pair, uint allPairsLength);
modifier senderOrigin {
// Internal calls are expected to use impl directly.
// That's due to use of call() instead of delegatecall() on purpose.
// solium-disable-next-line security/no-tx-origin
require(
tx.origin == msg.sender,
"EnergiswapFactoryGovernedProxy: FORBIDDEN, not a direct call");
_;
}
modifier requireImpl {
require(msg.sender == address(impl), "EnergiswapFactoryGovernedProxy: FORBIDDEN, not impl");
_;
}
constructor(address _impl, address payable _sporkProxy) public {
impl = IGovernedContract(_impl);
spork_proxy = IGovernedProxy(_sporkProxy);
}
// Emit PairCreated event
function emitPairCreated(address token0, address token1, address pair, uint allPairsLength) external requireImpl {
emit PairCreated(token0, token1, pair, allPairsLength);
}
/**
* Pre-create a new contract first.
* Then propose upgrade based on that.
*/
function proposeUpgrade(IGovernedContract _newImpl, uint _period)
external payable
senderOrigin
noReentry
returns(IUpgradeProposal)
{
require(_newImpl != impl, "Already active!");
require(_newImpl.proxy() == address(this), "Wrong proxy!");
ISporkRegistry spork_reg = ISporkRegistry(address(spork_proxy.impl()));
IUpgradeProposal proposal = spork_reg.createUpgradeProposal.value(msg.value)(_newImpl, _period, msg.sender);
upgrade_proposals[address(proposal)] = _newImpl;
upgrade_proposal_list.push(proposal);
emit UpgradeProposal(_newImpl, proposal);
return proposal;
}
/**
* Once proposal is accepted, anyone can activate that.
*/
function upgrade(IUpgradeProposal _proposal)
external
noReentry
{
IGovernedContract new_impl = upgrade_proposals[address(_proposal)];
require(new_impl != impl, "Already active!"); // in case it changes in the flight
require(address(new_impl) != address(0), "Not registered!");
require(_proposal.isAccepted(), "Not accepted!");
IGovernedContract old_impl = impl;
new_impl.migrate(old_impl);
impl = new_impl;
old_impl.destroy(new_impl);
// SECURITY: prevent downgrade attack
_cleanupProposal(_proposal);
// Return fee ASAP
_proposal.destroy();
emit Upgraded(new_impl, _proposal);
}
/**
* Map proposal to implementation
*/
function upgradeProposalImpl(IUpgradeProposal _proposal)
external view
returns(IGovernedContract new_impl)
{
new_impl = upgrade_proposals[address(_proposal)];
}
/**
* Lists all available upgrades
*/
function listUpgradeProposals()
external view
returns(IUpgradeProposal[] memory proposals)
{
uint len = upgrade_proposal_list.length;
proposals = new IUpgradeProposal[](len);
for (uint i = 0; i < len; ++i) {
proposals[i] = upgrade_proposal_list[i];
}
return proposals;
}
/**
* Once proposal is reject, anyone can start collect procedure.
*/
function collectUpgradeProposal(IUpgradeProposal _proposal)
external
noReentry
{
IGovernedContract new_impl = upgrade_proposals[address(_proposal)];
require(address(new_impl) != address(0), "Not registered!");
_proposal.collect();
delete upgrade_proposals[address(_proposal)];
_cleanupProposal(_proposal);
}
function _cleanupProposal(IUpgradeProposal _proposal) internal {
delete upgrade_proposals[address(_proposal)];
uint len = upgrade_proposal_list.length;
for (uint i = 0; i < len; ++i) {
if (upgrade_proposal_list[i] == _proposal) {
upgrade_proposal_list[i] = upgrade_proposal_list[len - 1];
upgrade_proposal_list.pop();
break;
}
}
}
/**
* Related to above
*/
function proxy() external view returns (address) {
return address(this);
}
/**
* SECURITY: prevent on-behalf-of calls
*/
function migrate(IGovernedContract) external pure {
revert("Good try");
}
/**
* SECURITY: prevent on-behalf-of calls
*/
function destroy(IGovernedContract) external pure {
revert("Good try");
}
/**
* Proxy all other calls to implementation.
*/
function ()
external
payable
senderOrigin
{
// SECURITY: senderOrigin() modifier is mandatory
IGovernedContract impl_m = impl;
// solium-disable-next-line security/no-inline-assembly
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize())
let res := call(sub(gas(), 10000), impl_m, callvalue(), ptr, calldatasize(), 0, 0)
// NOTE: returndatasize should allow repeatable calls
// what should save one opcode.
returndatacopy(ptr, 0, returndatasize())
switch res
case 0 {
revert(ptr, returndatasize())
}
default {
return(ptr, returndatasize())
}
}
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"address","name":"_impl","internalType":"address"},{"type":"address","name":"_sporkProxy","internalType":"address payable"}]},{"type":"event","name":"PairCreated","inputs":[{"type":"address","name":"token0","internalType":"address","indexed":true},{"type":"address","name":"token1","internalType":"address","indexed":true},{"type":"address","name":"pair","internalType":"address","indexed":false},{"type":"uint256","name":"allPairsLength","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpgradeProposal","inputs":[{"type":"address","name":"impl","internalType":"contract IGovernedContract","indexed":true},{"type":"address","name":"proposal","internalType":"contract IUpgradeProposal","indexed":false}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"impl","internalType":"contract IGovernedContract","indexed":true},{"type":"address","name":"proposal","internalType":"contract IUpgradeProposal","indexed":false}],"anonymous":false},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"collectUpgradeProposal","inputs":[{"type":"address","name":"_proposal","internalType":"contract IUpgradeProposal"}],"constant":false},{"type":"function","stateMutability":"pure","payable":false,"outputs":[],"name":"destroy","inputs":[{"type":"address","name":"","internalType":"contract IGovernedContract"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"emitPairCreated","inputs":[{"type":"address","name":"token0","internalType":"address"},{"type":"address","name":"token1","internalType":"address"},{"type":"address","name":"pair","internalType":"address"},{"type":"uint256","name":"allPairsLength","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IGovernedContract"}],"name":"impl","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"proposals","internalType":"contract IUpgradeProposal[]"}],"name":"listUpgradeProposals","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[],"name":"migrate","inputs":[{"type":"address","name":"","internalType":"contract IGovernedContract"}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"address","name":"","internalType":"contract IUpgradeProposal"}],"name":"proposeUpgrade","inputs":[{"type":"address","name":"_newImpl","internalType":"contract IGovernedContract"},{"type":"uint256","name":"_period","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"proxy","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IGovernedProxy"}],"name":"spork_proxy","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"upgrade","inputs":[{"type":"address","name":"_proposal","internalType":"contract IUpgradeProposal"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"new_impl","internalType":"contract IGovernedContract"}],"name":"upgradeProposalImpl","inputs":[{"type":"address","name":"_proposal","internalType":"contract IUpgradeProposal"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IUpgradeProposal"}],"name":"upgrade_proposal_list","inputs":[{"type":"uint256","name":"","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IGovernedContract"}],"name":"upgrade_proposals","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true}]
            

Deployed ByteCode

0x6080604052600436106100c15760003560e01c80638abf60771161007f578063c6a3c43c11610059578063c6a3c43c14610324578063ce5494bb14610137578063dd6a851d1461036d578063ec55688914610382576100c1565b80638abf607714610277578063a1b0e4761461028c578063b364595e146102bf576100c1565b8062f55d9d146101375780630900f0101461016c57806332e3a9051461019f5780635b6dee4c146101ee5780636d5b6c441461021a5780636fa09ab01461024d575b3233146100ff5760405162461bcd60e51b815260040180806020018281038252603c815260200180610e51603c913960400191505060405180910390fd5b6001546040516001600160a01b03909116903660008237600080368334866127105a03f13d6000833e808015610133573d83f35b3d83fd5b34801561014357600080fd5b5061016a6004803603602081101561015a57600080fd5b50356001600160a01b0316610397565b005b34801561017857600080fd5b5061016a6004803603602081101561018f57600080fd5b50356001600160a01b03166103cf565b3480156101ab57600080fd5b506101d2600480360360208110156101c257600080fd5b50356001600160a01b03166106f3565b604080516001600160a01b039092168252519081900360200190f35b6101d26004803603604081101561020457600080fd5b506001600160a01b03813516906020013561070e565b34801561022657600080fd5b506101d26004803603602081101561023d57600080fd5b50356001600160a01b0316610a4d565b34801561025957600080fd5b506101d26004803603602081101561027057600080fd5b5035610a6b565b34801561028357600080fd5b506101d2610a92565b34801561029857600080fd5b5061016a600480360360208110156102af57600080fd5b50356001600160a01b0316610aa1565b3480156102cb57600080fd5b506102d4610bce565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103105781810151838201526020016102f8565b505050509050019250505060405180910390f35b34801561033057600080fd5b5061016a6004803603608081101561034757600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610c68565b34801561037957600080fd5b506101d2610d02565b34801561038e57600080fd5b506101d2610d11565b6040805162461bcd60e51b8152602060048201526008602482015267476f6f642074727960c01b604482015290519081900360640190fd5b6000541561040e576040805162461bcd60e51b81526020600482015260076024820152665265656e74727960c81b604482015290519081900360640190fd5b600160008181556001600160a01b03808416825260036020526040909120549154918116911681141561047a576040805162461bcd60e51b815260206004820152600f60248201526e416c7265616479206163746976652160881b604482015290519081900360640190fd5b6001600160a01b0381166104c7576040805162461bcd60e51b815260206004820152600f60248201526e4e6f7420726567697374657265642160881b604482015290519081900360640190fd5b816001600160a01b0316635051a5ec6040518163ffffffff1660e01b815260040160206040518083038186803b15801561050057600080fd5b505afa158015610514573d6000803e3d6000fd5b505050506040513d602081101561052a57600080fd5b505161056d576040805162461bcd60e51b815260206004820152600d60248201526c4e6f742061636365707465642160981b604482015290519081900360640190fd5b6001546040805163ce5494bb60e01b81526001600160a01b03928316600482018190529151919284169163ce5494bb9160248082019260009290919082900301818387803b1580156105be57600080fd5b505af11580156105d2573d6000803e3d6000fd5b5050600180546001600160a01b0319166001600160a01b038681169182179092556040805162f55d9d60e01b8152600481019290925251918516935062f55d9d925060248082019260009290919082900301818387803b15801561063557600080fd5b505af1158015610649573d6000803e3d6000fd5b5050505061065683610d15565b826001600160a01b03166383197ef06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561069157600080fd5b505af11580156106a5573d6000803e3d6000fd5b5050604080516001600160a01b038781168252915191861693507f5d611f318680d00598bb735d61bacf0c514c6b50e1e5ad30040a4df2b12791c7925081900360200190a250506000805550565b6003602052600090815260409020546001600160a01b031681565b600032331461074e5760405162461bcd60e51b815260040180806020018281038252603c815260200180610e51603c913960400191505060405180910390fd5b6000541561078d576040805162461bcd60e51b81526020600482015260076024820152665265656e74727960c81b604482015290519081900360640190fd5b60016000819055546001600160a01b03848116911614156107e7576040805162461bcd60e51b815260206004820152600f60248201526e416c7265616479206163746976652160881b604482015290519081900360640190fd5b306001600160a01b0316836001600160a01b031663ec5568896040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561082c57600080fd5b505af1158015610840573d6000803e3d6000fd5b505050506040513d602081101561085657600080fd5b50516001600160a01b0316146108a2576040805162461bcd60e51b815260206004820152600c60248201526b57726f6e672070726f78792160a01b604482015290519081900360640190fd5b60025460408051638abf607760e01b815290516000926001600160a01b031691638abf6077916004808301926020929190829003018186803b1580156108e757600080fd5b505afa1580156108fb573d6000803e3d6000fd5b505050506040513d602081101561091157600080fd5b5051604080516362877ccd60e01b81526001600160a01b038781166004830152602482018790523360448301529151929350600092918416916362877ccd913491606480830192602092919082900301818588803b15801561097257600080fd5b505af1158015610986573d6000803e3d6000fd5b50505050506040513d602081101561099d57600080fd5b50516001600160a01b0380821660008181526003602090815260408083208054958c166001600160a01b031996871681179091556004805460018101825594527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9093018054909516841790945583519283529251939450927f812eb2689eecf94cfb55caf4a123ea76c6d93eef07dd54a5273b7a4949f7d763929181900390910190a260008055949350505050565b6001600160a01b039081166000908152600360205260409020541690565b60048181548110610a7857fe5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031681565b60005415610ae0576040805162461bcd60e51b81526020600482015260076024820152665265656e74727960c81b604482015290519081900360640190fd5b600160009081556001600160a01b03808316825260036020526040909120541680610b44576040805162461bcd60e51b815260206004820152600f60248201526e4e6f7420726567697374657265642160881b604482015290519081900360640190fd5b816001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b7f57600080fd5b505af1158015610b93573d6000803e3d6000fd5b5050506001600160a01b038316600090815260036020526040902080546001600160a01b031916905550610bc682610d15565b505060008055565b60045460408051828152602080840282010190915260609190818015610bfe578160200160208202803883390190505b50915060005b81811015610c635760048181548110610c1957fe5b9060005260206000200160009054906101000a90046001600160a01b0316838281518110610c4357fe5b6001600160a01b0390921660209283029190910190910152600101610c04565b505090565b6001546001600160a01b03163314610cb15760405162461bcd60e51b8152600401808060200182810382526033815260200180610e1e6033913960400191505060405180910390fd5b604080516001600160a01b03848116825260208201849052825181871693918816927f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e992908290030190a350505050565b6002546001600160a01b031681565b3090565b6001600160a01b038116600090815260036020526040812080546001600160a01b0319169055600454905b81811015610e1857826001600160a01b031660048281548110610d5f57fe5b6000918252602090912001546001600160a01b03161415610e105760046001830381548110610d8a57fe5b600091825260209091200154600480546001600160a01b039092169183908110610db057fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506004805480610de957fe5b600082815260209020810160001990810180546001600160a01b0319169055019055610e18565b600101610d40565b50505056fe456e6572676973776170466163746f7279476f7665726e656450726f78793a20464f5242494444454e2c206e6f7420696d706c456e6572676973776170466163746f7279476f7665726e656450726f78793a20464f5242494444454e2c206e6f742061206469726563742063616c6ca265627a7a723158203eaed7da232570349a05558146d429022e18a41ed75bf9d0e59381f55755e9ec64736f6c63430005100032