Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ProxyAdmin
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an
* explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.
*/
contract ProxyAdmin is Ownable {
// Constructor
constructor() {
signSubmittedInPA = 0;
signVerifiedInPA = false;
vadiVaultOwnerInPA = msg.sender;
vadiAdminOneInPA = address(0x05013606e33CE24d2cBD59B605FE73EA2C54A60E);
vadiAdminTwoInPA = address(0xc2559ddeFF38acCd85735d95275c8e29cBd0EFbc);
controllersInPA[vadiAdminOneInPA] = true;
controllersInPA[vadiAdminTwoInPA] = true;
adminListInPA.push(vadiAdminOneInPA);
adminListInPA.push(vadiAdminTwoInPA);
}
//--------------- Control management for VadiRaise
mapping(address => bool) controllersInPA;
mapping(address => bool) signedAdminsInPA;
address public vadiVaultOwnerInPA;
address public vadiAdminOneInPA;
address public vadiAdminTwoInPA;
uint8 public signSubmittedInPA;
address[] adminListInPA;
address[] signedVadiAddressesInPA;
bool public signVerifiedInPA ;
// --------------------------- Events ---------------------------
event SufficientSignaturesSubmitted();
event newInternalOperationCanBePerformedNow();
// Registering admin and vadiVaultOwnerInPA signatures
function submitSignaturesInPA() public {
require(
controllersInPA[msg.sender] || msg.sender == vadiVaultOwnerInPA,
"Only VadiVaultOwner or Admin can execute this function"
);
require(
signSubmittedInPA < 2,
"Got 2 out of 3 signatures, you can continue with the internal operation."
);
require(
!signedAdminsInPA[msg.sender],
"Duplicate signatures are not allowed"
);
signSubmittedInPA++;
signedVadiAddressesInPA.push(msg.sender);
signedAdminsInPA[msg.sender] = true;
if (signSubmittedInPA == 2) {
signVerifiedInPA = true;
emit SufficientSignaturesSubmitted();
emit newInternalOperationCanBePerformedNow();
}
}
// Setting VadiVaultOwner Address
function setVadiVaultOwnerInPA(address payable _vadiVaultOwner) external {
require(
controllersInPA[msg.sender],
"Only Vadi Admins can execute this function"
);
require(
signVerifiedInPA,
"The Admins must sign to set new address for vadiVault Owner."
);
require(
_vadiVaultOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(_vadiVaultOwner);
vadiVaultOwnerInPA = _vadiVaultOwner;
signSubmittedInPA = 0;
signVerifiedInPA = false;
clearAdminSignaturesInPA();
signedVadiAddressesInPA.pop();
signedVadiAddressesInPA.pop();
}
// Clear admin signatures
function clearAdminSignaturesInPA() internal {
for (uint8 i = 0; i < 2; i++) {
if (signedAdminsInPA[signedVadiAddressesInPA[i]]) {
signedAdminsInPA[signedVadiAddressesInPA[i]] = false;
}
}
}
function addAdminsInPA(address _admin) external onlyOwner {
require(
adminListInPA.length < 2,
"Vadi have only two admins. Can't add third admin"
);
controllersInPA[_admin] = true;
if(adminListInPA.length == 0){
adminListInPA.push(_admin);
vadiAdminOneInPA = _admin;
} else if (adminListInPA.length == 1 && vadiAdminOneInPA == address(0)) {
address locationTwo = vadiAdminTwoInPA;
vadiAdminOneInPA = _admin;
adminListInPA.pop();
adminListInPA.push(_admin);
adminListInPA.push(locationTwo);
} else if (adminListInPA.length == 1 && vadiAdminTwoInPA == address(0)) {
vadiAdminTwoInPA = _admin;
adminListInPA.push(_admin);
}
}
function removeAdminsInPA(address _admin) external onlyOwner {
controllersInPA[_admin] = false;
for (uint256 i = 0; i < adminListInPA.length; i++) {
if (adminListInPA[i] == _admin)
{
removeInPA(i);
if (_admin == vadiAdminOneInPA) vadiAdminOneInPA = address(0);
if (_admin == vadiAdminTwoInPA) vadiAdminTwoInPA = address(0);
}
}
}
function removeInPA(uint256 index) internal onlyOwner {
adminListInPA[index] = adminListInPA[adminListInPA.length - 1];
adminListInPA.pop();
}
function getAdminListInPA() public view returns (address[] memory) {
return adminListInPA;
}
function getSignedAdminListInPA() public view returns (address[] memory) {
return signedVadiAddressesInPA;
}
//// Proxy Admin Functions
/**
* @dev Returns the current implementation of `proxy`.
*
* Requirements:
*
* - This contract must be the admin of `proxy`.
*/
function getProxyImplementation(TransparentUpgradeableProxy proxy)
public
view
virtual
returns (address)
{
// We need to manually run the static call since the getter cannot be flagged as view
// bytes4(keccak256("implementation()")) == 0x5c60da1b
(bool success, bytes memory returndata) = address(proxy).staticcall(
hex"5c60da1b"
);
require(success);
return abi.decode(returndata, (address));
}
/**
* @dev Returns the current admin of `proxy`.
*
* Requirements:
*
* - This contract must be the admin of `proxy`.
*/
function getProxyAdmin(TransparentUpgradeableProxy proxy)
public
view
virtual
returns (address)
{
// We need to manually run the static call since the getter cannot be flagged as view
// bytes4(keccak256("admin()")) == 0xf851a440
(bool success, bytes memory returndata) = address(proxy).staticcall(
hex"f851a440"
);
require(success);
return abi.decode(returndata, (address));
}
/**
* @dev Changes the admin of `proxy` to `newAdmin`.
*
* Requirements:
*
* - This contract must be the current admin of `proxy`.
*/
function changeProxyAdmin(
TransparentUpgradeableProxy proxy,
address newAdmin
) public virtual {
require(
controllersInPA[msg.sender] || msg.sender == vadiVaultOwnerInPA,
"Only VadiVaultOwner or Admin can execute this function"
);
require(
signVerifiedInPA ,
"The Admins must sign before changing admin of Proxy contract."
);
proxy.changeAdmin(newAdmin);
signSubmittedInPA = 0;
signVerifiedInPA = false;
clearAdminSignaturesInPA();
signedVadiAddressesInPA.pop();
signedVadiAddressesInPA.pop();
}
/**
* @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.
*
* Requirements:
*
* - This contract must be the admin of `proxy`.
*/
function upgrade(TransparentUpgradeableProxy proxy, address implementation)
public
virtual
{
require(
controllersInPA[msg.sender] || msg.sender == vadiVaultOwnerInPA,
"Only VadiVaultOwner or Admin can execute this function"
);
require(
signVerifiedInPA ,
"The Admins must sign before issuing new contracts."
);
proxy.upgradeTo(implementation);
signSubmittedInPA = 0;
signVerifiedInPA = false;
clearAdminSignaturesInPA();
signedVadiAddressesInPA.pop();
signedVadiAddressesInPA.pop();
}
/**
* @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See
* {TransparentUpgradeableProxy-upgradeToAndCall}.
*
* Requirements:
*
* - This contract must be the admin of `proxy`.
*/
function upgradeAndCall(
TransparentUpgradeableProxy proxy,
address implementation,
bytes memory data
) public payable virtual {
require(
controllersInPA[msg.sender] || msg.sender == vadiVaultOwnerInPA,
"Only VadiVaultOwner or Admin can execute this function"
);
require(
signVerifiedInPA ,
"The Admins must sign before issuing new contracts."
);
proxy.upgradeToAndCall{value: msg.value}(implementation, data);
signSubmittedInPA = 0;
signVerifiedInPA = false;
clearAdminSignaturesInPA();
signedVadiAddressesInPA.pop();
signedVadiAddressesInPA.pop();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)
pragma solidity ^0.8.0;
import "../ERC1967/ERC1967Proxy.sol";
/**
* @dev This contract implements a proxy that is upgradeable by an admin.
*
* To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
* clashing], which can potentially be used in an attack, this contract uses the
* https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
* things that go hand in hand:
*
* 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
* that call matches one of the admin functions exposed by the proxy itself.
* 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the
* implementation. If the admin tries to call a function on the implementation it will fail with an error that says
* "admin cannot fallback to proxy target".
*
* These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing
* the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due
* to sudden errors when trying to call a function from the proxy implementation.
*
* Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,
* you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.
*/
contract TransparentUpgradeableProxy is ERC1967Proxy {
/**
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
* optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
*/
constructor(
address _logic,
address admin_,
bytes memory _data
) payable ERC1967Proxy(_logic, _data) {
assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
_changeAdmin(admin_);
}
/**
* @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.
*/
modifier ifAdmin() {
if (msg.sender == _getAdmin()) {
_;
} else {
_fallback();
}
}
/**
* @dev Returns the current admin.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function admin() external ifAdmin returns (address admin_) {
admin_ = _getAdmin();
}
/**
* @dev Returns the current implementation.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/
function implementation() external ifAdmin returns (address implementation_) {
implementation_ = _implementation();
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.
*/
function changeAdmin(address newAdmin) external virtual ifAdmin {
_changeAdmin(newAdmin);
}
/**
* @dev Upgrade the implementation of the proxy.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.
*/
function upgradeTo(address newImplementation) external ifAdmin {
_upgradeToAndCall(newImplementation, bytes(""), false);
}
/**
* @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified
* by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the
* proxied contract.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.
*/
function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
_upgradeToAndCall(newImplementation, data, true);
}
/**
* @dev Returns the current admin.
*/
function _admin() internal view virtual returns (address) {
return _getAdmin();
}
/**
* @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.
*/
function _beforeFallback() internal virtual override {
require(msg.sender != _getAdmin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target");
super._beforeFallback();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)
pragma solidity ^0.8.0;
import "../Proxy.sol";
import "./ERC1967Upgrade.sol";
/**
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
* implementation address that can be changed. This address is stored in storage in the location specified by
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
* implementation behind the proxy.
*/
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
/**
* @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
*
* If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
* function call, and allows initializating the storage of the proxy like a Solidity constructor.
*/
constructor(address _logic, bytes memory _data) payable {
assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
_upgradeToAndCall(_logic, _data, false);
}
/**
* @dev Returns the current implementation address.
*/
function _implementation() internal view virtual override returns (address impl) {
return ERC1967Upgrade._getImplementation();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/Proxy.sol)
pragma solidity ^0.8.0;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overriden so it returns the address to which the fallback function
* and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
/**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_beforeFallback();
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
* is empty.
*/
receive() external payable virtual {
_fallback();
}
/**
* @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
* call, or as part of the Solidity `fallback` or `receive` functions.
*
* If overriden should call `super._beforeFallback()`.
*/
function _beforeFallback() internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeacon.sol";
import "../../utils/Address.sol";
import "../../utils/StorageSlot.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*
* @custom:oz-upgrades-unsafe-allow delegatecall
*/
abstract contract ERC1967Upgrade {
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
Address.functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallSecure(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
address oldImplementation = _getImplementation();
// Initial upgrade and setup call
_setImplementation(newImplementation);
if (data.length > 0 || forceCall) {
Address.functionDelegateCall(newImplementation, data);
}
// Perform rollback test if not already in progress
StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);
if (!rollbackTesting.value) {
// Trigger rollback using upgradeTo from the new implementation
rollbackTesting.value = true;
Address.functionDelegateCall(
newImplementation,
abi.encodeWithSignature("upgradeTo(address)", oldImplementation)
);
rollbackTesting.value = false;
// Check rollback was effective
require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades");
// Finally reset to the new implementation and log the upgrade
_upgradeTo(newImplementation);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Emitted when the beacon is upgraded.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
Address.isContract(IBeacon(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(
address newBeacon,
bytes memory data,
bool forceCall
) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly {
r.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"SufficientSignaturesSubmitted","type":"event"},{"anonymous":false,"inputs":[],"name":"newInternalOperationCanBePerformedNow","type":"event"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"addAdminsInPA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdminListInPA","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"}],"name":"getProxyAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"}],"name":"getProxyImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSignedAdminListInPA","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"removeAdminsInPA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_vadiVaultOwner","type":"address"}],"name":"setVadiVaultOwnerInPA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signSubmittedInPA","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signVerifiedInPA","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"submitSignaturesInPA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"implementation","type":"address"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"vadiAdminOneInPA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vadiAdminTwoInPA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vadiVaultOwnerInPA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5061001a33610144565b600580546008805460ff19908116909155600380546001600160a01b031990811633179091556004805482167305013606e33ce24d2cbd59b605fe73ea2c54a60e9081179091556001600160a81b031990931673c2559ddeff38accd85735d95275c8e29cbd0efbc178455600160208190527f6d5bdb5a23d294b1305b0686b331a652526e57286330ad560013758bf8335fc180548416821790557f95096deae150d37b83de8cc3aa39fb66c0b46474a063beba758bbcfac2fe46e38054909316811790925560068054808401825560008290527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9081018054841690951790945593548454928301909455910180549091166001600160a01b0392909216919091179055610194565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611670806101a36000396000f3fe6080604052600436106101145760003560e01c80638da5cb5b116100a0578063dc93448f11610064578063dc93448f146102df578063de59782d14610312578063e514cb4614610332578063f2fde38b14610347578063f3b7dead1461036757600080fd5b80638da5cb5b1461024e57806395b8af3e1461026c5780639623609d1461028c57806399a88ec41461029f578063b623358d146102bf57600080fd5b80636cf28108116100e75780636cf28108146101b7578063715018a6146101d75780637eff275e146101ec578063860360081461020c57806388edd8a21461022c57600080fd5b8063204e1c7a1461011957806321112df2146101565780632449d4ea1461016d5780633f31bad41461018d575b600080fd5b34801561012557600080fd5b50610139610134366004611273565b610387565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016257600080fd5b5061016b610418565b005b34801561017957600080fd5b5061016b610188366004611273565b61066f565b34801561019957600080fd5b506008546101a79060ff1681565b604051901515815260200161014d565b3480156101c357600080fd5b50600454610139906001600160a01b031681565b3480156101e357600080fd5b5061016b6108ef565b3480156101f857600080fd5b5061016b610207366004611297565b610923565b34801561021857600080fd5b5061016b610227366004611273565b610ac4565b34801561023857600080fd5b50610241610c80565b60405161014d91906112d0565b34801561025a57600080fd5b506000546001600160a01b0316610139565b34801561027857600080fd5b50600354610139906001600160a01b031681565b61016b61029a366004611333565b610ce2565b3480156102ab57600080fd5b5061016b6102ba366004611297565b610e34565b3480156102cb57600080fd5b50600554610139906001600160a01b031681565b3480156102eb57600080fd5b5060055461030090600160a01b900460ff1681565b60405160ff909116815260200161014d565b34801561031e57600080fd5b5061016b61032d366004611273565b610ec8565b34801561033e57600080fd5b50610241610fc1565b34801561035357600080fd5b5061016b610362366004611273565b611021565b34801561037357600080fd5b50610139610382366004611273565b61107a565b6000806000836001600160a01b03166040516103ad90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146103e8576040519150601f19603f3d011682016040523d82523d6000602084013e6103ed565b606091505b5091509150816103fc57600080fd5b808060200190518101906104109190611409565b949350505050565b3360009081526001602052604090205460ff168061044057506003546001600160a01b031633145b6104655760405162461bcd60e51b815260040161045c90611426565b60405180910390fd5b6005546002600160a01b90910460ff16106104f95760405162461bcd60e51b815260206004820152604860248201527f476f742032206f7574206f662033207369676e6174757265732c20796f75206360448201527f616e20636f6e74696e756520776974682074686520696e7465726e616c206f7060648201526732b930ba34b7b71760c11b608482015260a40161045c565b3360009081526002602052604090205460ff16156105655760405162461bcd60e51b8152602060048201526024808201527f4475706c6963617465207369676e61747572657320617265206e6f7420616c6c6044820152631bddd95960e21b606482015260840161045c565b60058054600160a01b900460ff1690601461057f83611492565b82546101009290920a60ff8181021990931691831602179091556007805460018181019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018054336001600160a01b031990911681179091556000908152600260208190526040909120805460ff1916909217909155600554600160a01b90049091169003905061066d576008805460ff191660011790556040517fd3d447fdb5140694c169c0fd6166f66bfbb05c0602fedbfa81ceb1985ace444090600090a16040517f1ca9046bbf155602941e5576066bd1f736ce6fc606d93a2669c1761ec9a527e490600090a15b565b6000546001600160a01b031633146106995760405162461bcd60e51b815260040161045c906114b1565b6006546002116107045760405162461bcd60e51b815260206004820152603060248201527f566164692068617665206f6e6c792074776f2061646d696e732e2043616e277460448201526f1030b232103a3434b9321030b236b4b760811b606482015260840161045c565b6001600160a01b03811660009081526001602081905260408220805460ff19169091179055600654900361079057600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0383166001600160a01b0319918216811790925560048054909116909117905550565b60065460011480156107ab57506004546001600160a01b0316155b1561087057600554600480546001600160a01b0319166001600160a01b038481169190911790915560068054919092169190806107ea576107ea6114e6565b600082815260208120600019908301810180546001600160a01b031990811690915592019092556006805460018181018355938290527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f908101805484166001600160a01b03978816179055815493840190915591909101805490911691909216179055565b600654600114801561088b57506005546001600160a01b0316155b156108ec57600580546001600160a01b0383166001600160a01b03199182168117909255600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805490911690911790555b50565b6000546001600160a01b031633146109195760405162461bcd60e51b815260040161045c906114b1565b61066d60006110a0565b3360009081526001602052604090205460ff168061094b57506003546001600160a01b031633145b6109675760405162461bcd60e51b815260040161045c90611426565b60085460ff166109df5760405162461bcd60e51b815260206004820152603d60248201527f5468652041646d696e73206d757374207369676e206265666f7265206368616e60448201527f67696e672061646d696e206f662050726f787920636f6e74726163742e000000606482015260840161045c565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b50506005805460ff60a01b1916905550506008805460ff19169055610a5a6110f0565b6007805480610a6b57610a6b6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610a9e57610a9e6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b3360009081526001602052604090205460ff16610b365760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c7920566164692041646d696e732063616e2065786563757465207468696044820152693990333ab731ba34b7b760b11b606482015260840161045c565b60085460ff16610bae5760405162461bcd60e51b815260206004820152603c60248201527f5468652041646d696e73206d757374207369676e20746f20736574206e65772060448201527f6164647265737320666f7220766164695661756c74204f776e65722e00000000606482015260840161045c565b6001600160a01b038116610bd45760405162461bcd60e51b815260040161045c906114fc565b610bdd816110a0565b600380546001600160a01b0319166001600160a01b0383161790556005805460ff60a01b191690556008805460ff19169055610c176110f0565b6007805480610c2857610c286114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610c5b57610c5b6114e6565b600082815260209020810160001990810180546001600160a01b031916905501905550565b60606006805480602002602001604051908101604052809291908181526020018280548015610cd857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610cba575b5050505050905090565b3360009081526001602052604090205460ff1680610d0a57506003546001600160a01b031633145b610d265760405162461bcd60e51b815260040161045c90611426565b60085460ff16610d485760405162461bcd60e51b815260040161045c90611542565b60405163278f794360e11b81526001600160a01b03841690634f1ef286903490610d789086908690600401611594565b6000604051808303818588803b158015610d9157600080fd5b505af1158015610da5573d6000803e3d6000fd5b50506005805460ff60a01b1916905550506008805460ff1916905550610dc96110f0565b6007805480610dda57610dda6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610e0d57610e0d6114e6565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b3360009081526001602052604090205460ff1680610e5c57506003546001600160a01b031633145b610e785760405162461bcd60e51b815260040161045c90611426565b60085460ff16610e9a5760405162461bcd60e51b815260040161045c90611542565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe690602401610a09565b6000546001600160a01b03163314610ef25760405162461bcd60e51b815260040161045c906114b1565b6001600160a01b0381166000908152600160205260408120805460ff191690555b600654811015610fbd57816001600160a01b031660068281548110610f3a57610f3a6115f2565b6000918252602090912001546001600160a01b031603610fab57610f5d816111a9565b6004546001600160a01b0390811690831603610f8457600480546001600160a01b03191690555b6005546001600160a01b0390811690831603610fab57600580546001600160a01b03191690555b80610fb581611608565b915050610f13565b5050565b60606007805480602002602001604051908101604052809291908181526020018280548015610cd8576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610cba575050505050905090565b6000546001600160a01b0316331461104b5760405162461bcd60e51b815260040161045c906114b1565b6001600160a01b0381166110715760405162461bcd60e51b815260040161045c906114fc565b6108ec816110a0565b6000806000836001600160a01b03166040516103ad906303e1469160e61b815260040190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b60028160ff1610156108ec576002600060078360ff1681548110611119576111196115f2565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16156111975760006002600060078460ff1681548110611162576111626115f2565b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff19169115159190911790555b806111a181611492565b9150506110f3565b6000546001600160a01b031633146111d35760405162461bcd60e51b815260040161045c906114b1565b600680546111e390600190611621565b815481106111f3576111f36115f2565b600091825260209091200154600680546001600160a01b03909216918390811061121f5761121f6115f2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506006805480610c5b57610c5b6114e6565b6001600160a01b03811681146108ec57600080fd5b60006020828403121561128557600080fd5b81356112908161125e565b9392505050565b600080604083850312156112aa57600080fd5b82356112b58161125e565b915060208301356112c58161125e565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156113115783516001600160a01b0316835292840192918401916001016112ec565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561134857600080fd5b83356113538161125e565b925060208401356113638161125e565b9150604084013567ffffffffffffffff8082111561138057600080fd5b818601915086601f83011261139457600080fd5b8135818111156113a6576113a661131d565b604051601f8201601f19908116603f011681019083821181831017156113ce576113ce61131d565b816040528281528960208487010111156113e757600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561141b57600080fd5b81516112908161125e565b60208082526036908201527f4f6e6c7920566164695661756c744f776e6572206f722041646d696e2063616e6040820152751032bc32b1baba32903a3434b990333ab731ba34b7b760511b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff81036114a8576114a861147c565b60010192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603160045260246000fd5b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526032908201527f5468652041646d696e73206d757374207369676e206265666f7265206973737560408201527134b733903732bb9031b7b73a3930b1ba399760711b606082015260800190565b60018060a01b038316815260006020604081840152835180604085015260005b818110156115d0578581018301518582016060015282016115b4565b506000606082860101526060601f19601f830116850101925050509392505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161161a5761161a61147c565b5060010190565b818103818111156116345761163461147c565b9291505056fea2646970667358221220b47526c41c81971df4f5faf7437b193a280ff731238264ed19f84982753dfa4c64736f6c63430008110033
Deployed Bytecode
0x6080604052600436106101145760003560e01c80638da5cb5b116100a0578063dc93448f11610064578063dc93448f146102df578063de59782d14610312578063e514cb4614610332578063f2fde38b14610347578063f3b7dead1461036757600080fd5b80638da5cb5b1461024e57806395b8af3e1461026c5780639623609d1461028c57806399a88ec41461029f578063b623358d146102bf57600080fd5b80636cf28108116100e75780636cf28108146101b7578063715018a6146101d75780637eff275e146101ec578063860360081461020c57806388edd8a21461022c57600080fd5b8063204e1c7a1461011957806321112df2146101565780632449d4ea1461016d5780633f31bad41461018d575b600080fd5b34801561012557600080fd5b50610139610134366004611273565b610387565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016257600080fd5b5061016b610418565b005b34801561017957600080fd5b5061016b610188366004611273565b61066f565b34801561019957600080fd5b506008546101a79060ff1681565b604051901515815260200161014d565b3480156101c357600080fd5b50600454610139906001600160a01b031681565b3480156101e357600080fd5b5061016b6108ef565b3480156101f857600080fd5b5061016b610207366004611297565b610923565b34801561021857600080fd5b5061016b610227366004611273565b610ac4565b34801561023857600080fd5b50610241610c80565b60405161014d91906112d0565b34801561025a57600080fd5b506000546001600160a01b0316610139565b34801561027857600080fd5b50600354610139906001600160a01b031681565b61016b61029a366004611333565b610ce2565b3480156102ab57600080fd5b5061016b6102ba366004611297565b610e34565b3480156102cb57600080fd5b50600554610139906001600160a01b031681565b3480156102eb57600080fd5b5060055461030090600160a01b900460ff1681565b60405160ff909116815260200161014d565b34801561031e57600080fd5b5061016b61032d366004611273565b610ec8565b34801561033e57600080fd5b50610241610fc1565b34801561035357600080fd5b5061016b610362366004611273565b611021565b34801561037357600080fd5b50610139610382366004611273565b61107a565b6000806000836001600160a01b03166040516103ad90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146103e8576040519150601f19603f3d011682016040523d82523d6000602084013e6103ed565b606091505b5091509150816103fc57600080fd5b808060200190518101906104109190611409565b949350505050565b3360009081526001602052604090205460ff168061044057506003546001600160a01b031633145b6104655760405162461bcd60e51b815260040161045c90611426565b60405180910390fd5b6005546002600160a01b90910460ff16106104f95760405162461bcd60e51b815260206004820152604860248201527f476f742032206f7574206f662033207369676e6174757265732c20796f75206360448201527f616e20636f6e74696e756520776974682074686520696e7465726e616c206f7060648201526732b930ba34b7b71760c11b608482015260a40161045c565b3360009081526002602052604090205460ff16156105655760405162461bcd60e51b8152602060048201526024808201527f4475706c6963617465207369676e61747572657320617265206e6f7420616c6c6044820152631bddd95960e21b606482015260840161045c565b60058054600160a01b900460ff1690601461057f83611492565b82546101009290920a60ff8181021990931691831602179091556007805460018181019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018054336001600160a01b031990911681179091556000908152600260208190526040909120805460ff1916909217909155600554600160a01b90049091169003905061066d576008805460ff191660011790556040517fd3d447fdb5140694c169c0fd6166f66bfbb05c0602fedbfa81ceb1985ace444090600090a16040517f1ca9046bbf155602941e5576066bd1f736ce6fc606d93a2669c1761ec9a527e490600090a15b565b6000546001600160a01b031633146106995760405162461bcd60e51b815260040161045c906114b1565b6006546002116107045760405162461bcd60e51b815260206004820152603060248201527f566164692068617665206f6e6c792074776f2061646d696e732e2043616e277460448201526f1030b232103a3434b9321030b236b4b760811b606482015260840161045c565b6001600160a01b03811660009081526001602081905260408220805460ff19169091179055600654900361079057600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0383166001600160a01b0319918216811790925560048054909116909117905550565b60065460011480156107ab57506004546001600160a01b0316155b1561087057600554600480546001600160a01b0319166001600160a01b038481169190911790915560068054919092169190806107ea576107ea6114e6565b600082815260208120600019908301810180546001600160a01b031990811690915592019092556006805460018181018355938290527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f908101805484166001600160a01b03978816179055815493840190915591909101805490911691909216179055565b600654600114801561088b57506005546001600160a01b0316155b156108ec57600580546001600160a01b0383166001600160a01b03199182168117909255600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805490911690911790555b50565b6000546001600160a01b031633146109195760405162461bcd60e51b815260040161045c906114b1565b61066d60006110a0565b3360009081526001602052604090205460ff168061094b57506003546001600160a01b031633145b6109675760405162461bcd60e51b815260040161045c90611426565b60085460ff166109df5760405162461bcd60e51b815260206004820152603d60248201527f5468652041646d696e73206d757374207369676e206265666f7265206368616e60448201527f67696e672061646d696e206f662050726f787920636f6e74726163742e000000606482015260840161045c565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b50506005805460ff60a01b1916905550506008805460ff19169055610a5a6110f0565b6007805480610a6b57610a6b6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610a9e57610a9e6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b3360009081526001602052604090205460ff16610b365760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c7920566164692041646d696e732063616e2065786563757465207468696044820152693990333ab731ba34b7b760b11b606482015260840161045c565b60085460ff16610bae5760405162461bcd60e51b815260206004820152603c60248201527f5468652041646d696e73206d757374207369676e20746f20736574206e65772060448201527f6164647265737320666f7220766164695661756c74204f776e65722e00000000606482015260840161045c565b6001600160a01b038116610bd45760405162461bcd60e51b815260040161045c906114fc565b610bdd816110a0565b600380546001600160a01b0319166001600160a01b0383161790556005805460ff60a01b191690556008805460ff19169055610c176110f0565b6007805480610c2857610c286114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610c5b57610c5b6114e6565b600082815260209020810160001990810180546001600160a01b031916905501905550565b60606006805480602002602001604051908101604052809291908181526020018280548015610cd857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610cba575b5050505050905090565b3360009081526001602052604090205460ff1680610d0a57506003546001600160a01b031633145b610d265760405162461bcd60e51b815260040161045c90611426565b60085460ff16610d485760405162461bcd60e51b815260040161045c90611542565b60405163278f794360e11b81526001600160a01b03841690634f1ef286903490610d789086908690600401611594565b6000604051808303818588803b158015610d9157600080fd5b505af1158015610da5573d6000803e3d6000fd5b50506005805460ff60a01b1916905550506008805460ff1916905550610dc96110f0565b6007805480610dda57610dda6114e6565b600082815260209020810160001990810180546001600160a01b03191690550190556007805480610e0d57610e0d6114e6565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b3360009081526001602052604090205460ff1680610e5c57506003546001600160a01b031633145b610e785760405162461bcd60e51b815260040161045c90611426565b60085460ff16610e9a5760405162461bcd60e51b815260040161045c90611542565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe690602401610a09565b6000546001600160a01b03163314610ef25760405162461bcd60e51b815260040161045c906114b1565b6001600160a01b0381166000908152600160205260408120805460ff191690555b600654811015610fbd57816001600160a01b031660068281548110610f3a57610f3a6115f2565b6000918252602090912001546001600160a01b031603610fab57610f5d816111a9565b6004546001600160a01b0390811690831603610f8457600480546001600160a01b03191690555b6005546001600160a01b0390811690831603610fab57600580546001600160a01b03191690555b80610fb581611608565b915050610f13565b5050565b60606007805480602002602001604051908101604052809291908181526020018280548015610cd8576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610cba575050505050905090565b6000546001600160a01b0316331461104b5760405162461bcd60e51b815260040161045c906114b1565b6001600160a01b0381166110715760405162461bcd60e51b815260040161045c906114fc565b6108ec816110a0565b6000806000836001600160a01b03166040516103ad906303e1469160e61b815260040190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b60028160ff1610156108ec576002600060078360ff1681548110611119576111196115f2565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16156111975760006002600060078460ff1681548110611162576111626115f2565b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff19169115159190911790555b806111a181611492565b9150506110f3565b6000546001600160a01b031633146111d35760405162461bcd60e51b815260040161045c906114b1565b600680546111e390600190611621565b815481106111f3576111f36115f2565b600091825260209091200154600680546001600160a01b03909216918390811061121f5761121f6115f2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506006805480610c5b57610c5b6114e6565b6001600160a01b03811681146108ec57600080fd5b60006020828403121561128557600080fd5b81356112908161125e565b9392505050565b600080604083850312156112aa57600080fd5b82356112b58161125e565b915060208301356112c58161125e565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156113115783516001600160a01b0316835292840192918401916001016112ec565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561134857600080fd5b83356113538161125e565b925060208401356113638161125e565b9150604084013567ffffffffffffffff8082111561138057600080fd5b818601915086601f83011261139457600080fd5b8135818111156113a6576113a661131d565b604051601f8201601f19908116603f011681019083821181831017156113ce576113ce61131d565b816040528281528960208487010111156113e757600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561141b57600080fd5b81516112908161125e565b60208082526036908201527f4f6e6c7920566164695661756c744f776e6572206f722041646d696e2063616e6040820152751032bc32b1baba32903a3434b990333ab731ba34b7b760511b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff81036114a8576114a861147c565b60010192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603160045260246000fd5b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526032908201527f5468652041646d696e73206d757374207369676e206265666f7265206973737560408201527134b733903732bb9031b7b73a3930b1ba399760711b606082015260800190565b60018060a01b038316815260006020604081840152835180604085015260005b818110156115d0578581018301518582016060015282016115b4565b506000606082860101526060601f19601f830116850101925050509392505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161161a5761161a61147c565b5060010190565b818103818111156116345761163461147c565b9291505056fea2646970667358221220b47526c41c81971df4f5faf7437b193a280ff731238264ed19f84982753dfa4c64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 32 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.